[TFTPD] Fix compilation, and use the #define MAX_SERVERS where needed instead of...
[reactos.git] / base / services / rpcss / rpcss_main.c
index 7fd7cd4..adf0e7f 100644 (file)
  *     role of rpcss.exe in wine.
  */
 
-#include <stdio.h>
-#include <limits.h>
-#include <assert.h>
-
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
 #include "rpcss.h"
-#include "winnt.h"
-#include "irot_s.h"
-#include "epm_s.h"
 
-#include "wine/debug.h"
+#include <wine/debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(ole);
 
@@ -103,8 +94,15 @@ BOOL RPCSS_Initialize(void)
   if (status != RPC_S_OK)
     goto fail;
 
-  //exit_event = __wine_make_process_system();
+#ifndef __REACTOS__
+  exit_event = __wine_make_process_system();
+#else
   exit_event = CreateEventW(NULL, FALSE, FALSE, NULL); // never fires
+  {
+    HANDLE hStartEvent = CreateEventW(NULL, TRUE, FALSE, L"ScmCreatedEvent");
+    SetEvent(hStartEvent);
+  }
+#endif
 
   return TRUE;
 
@@ -127,7 +125,7 @@ BOOL RPCSS_Shutdown(void)
   return TRUE;
 }
 
-#if 0
+#ifndef __REACTOS__
 int main( int argc, char **argv )
 {
   /*