[CSRSRV]
[reactos.git] / include / reactos / subsys / csr / csrsrv.h
index ae0db7d..0815360 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "csrmsg.h"
 
+
 /* TYPES **********************************************************************/
 
 // Used in ntdll/csr/connect.c
@@ -38,7 +39,6 @@ typedef struct _CSR_PROCESS
     CLIENT_ID ClientId;
     LIST_ENTRY ListLink;
     LIST_ENTRY ThreadList;
-    struct _CSR_PROCESS *Parent;
     PCSR_NT_SESSION NtSession;
     ULONG ExpectedVersion;
     HANDLE ClientPort;
@@ -102,7 +102,7 @@ typedef enum _CSR_PROCESS_FLAGS
 
 typedef enum _CSR_THREAD_FLAGS
 {
-    CsrThreadAltertable     = 0x1,
+    CsrThreadAlertable      = 0x1,
     CsrThreadInTermination  = 0x2,
     CsrThreadTerminated     = 0x4,
     CsrThreadIsServerThread = 0x10
@@ -127,6 +127,16 @@ typedef enum _CSR_DEBUG_FLAGS
     CsrDebugProcessChildren = 2
 } CSR_PROCESS_DEBUG_FLAGS, *PCSR_PROCESS_DEBUG_FLAGS;
 
+typedef enum _CSR_REPLY_CODE
+{
+    CsrReplyImmediately = 0,
+    CsrReplyPending     = 1,
+    CsrReplyDeadClient  = 2,
+    CsrReplyAlreadySent = 3
+} CSR_REPLY_CODE, *PCSR_REPLY_CODE;
+
+
+/* FUNCTION TYPES AND STRUCTURES **********************************************/
 
 /*
  * Wait block
@@ -145,13 +155,13 @@ BOOLEAN
 
 typedef struct _CSR_WAIT_BLOCK
 {
-    ULONG Size;
+    ULONG Size;                     // Size of the wait block (variable-sized)
     LIST_ENTRY WaitList;
     LIST_ENTRY UserWaitList;
     PVOID WaitContext;
     PCSR_THREAD WaitThread;
     CSR_WAIT_FUNCTION WaitFunction;
-    CSR_API_MESSAGE WaitApiMessage;
+    CSR_API_MESSAGE WaitApiMessage; // Variable-sized CSR API message
 } CSR_WAIT_BLOCK, *PCSR_WAIT_BLOCK;
 
 
@@ -162,13 +172,12 @@ typedef
 NTSTATUS
 (NTAPI *PCSR_API_ROUTINE)(
     IN OUT PCSR_API_MESSAGE ApiMessage,
-    OUT PULONG Reply
+    IN OUT PCSR_REPLY_CODE  ReplyCode OPTIONAL
 );
 
 #define CSR_API(n)                                          \
     NTSTATUS NTAPI n(IN OUT PCSR_API_MESSAGE ApiMessage,    \
-                     OUT PULONG Reply)
-                     // IN OUT PCSR_REPLY_STATUS ReplyStatus)
+                     IN OUT PCSR_REPLY_CODE  ReplyCode OPTIONAL)
 
 typedef
 NTSTATUS
@@ -228,8 +237,6 @@ typedef struct _CSR_SERVER_DLL
 } CSR_SERVER_DLL, *PCSR_SERVER_DLL;
 
 
-/* FUNCTION TYPES *************************************************************/
-
 typedef
 NTSTATUS
 (NTAPI *PCSR_SERVER_DLL_INIT_CALLBACK)(IN PCSR_SERVER_DLL LoadedServerDll);