+#ifdef HAVE_WINSOCK
+ {
+ int *i;
+ char *newConfigFile;
+ ldap_debug = 0xffff;
+ if ( is_NT_Service ) CommenceStartupProcessing( NTservice, slap_set_shutdown );
+ i = (int*)getRegParam( NULL, "Port" );
+ if ( i != NULL )
+ {
+ port = *i;
+ Debug ( LDAP_DEBUG_ANY, "new port from registry is: %d\n", port, 0, 0 );
+ }
+#ifdef HAVE_TLS
+ i = (int*)getRegParam( NULL, "TLSPort" );
+ if ( i != NULL )
+ {
+ tls_port = *i;
+ Debug ( LDAP_DEBUG_ANY, "new TLS port from registry is: %d\n", tls_port, 0, 0 );
+ }
+#endif
+ i = (int*)getRegParam( NULL, "DebugLevel" );
+ if ( i != NULL )
+ {
+ slap_debug = *i;
+ Debug( LDAP_DEBUG_ANY, "new debug level from registry is: %d\n", slap_debug, 0, 0 );
+ }
+ newConfigFile = (char*)getRegParam( NULL, "ConfigFile" );
+ if ( newConfigFile != NULL )
+ {
+ configfile = newConfigFile;
+ Debug ( LDAP_DEBUG_ANY, "new config file from registry is: %s\n", configfile, 0, 0 );
+ }
+ }
+#endif
+
+ while ( (i = getopt( argc, argv,
+ "d:f:h:p:s:u"
+#ifdef LOG_LOCAL4
+ "l:"
+#endif
+#ifdef SLAPD_BDB2
+ "t"
+#endif
+#if defined(HAVE_SETUID) && defined(HAVE_SETGID)
+ "u:g:"
+#endif
+#ifdef LDAP_CONNECTIONLESS
+ "c"
+#endif
+#ifdef HAVE_WINSOCK
+ "n:"
+#endif
+#ifdef HAVE_TLS
+ "P:"
+#endif
+ )) != EOF ) {