#include "csrmsg.h"
+
/* TYPES **********************************************************************/
// Used in ntdll/csr/connect.c
CLIENT_ID ClientId;
LIST_ENTRY ListLink;
LIST_ENTRY ThreadList;
- struct _CSR_PROCESS *Parent;
PCSR_NT_SESSION NtSession;
ULONG ExpectedVersion;
HANDLE ClientPort;
typedef enum _CSR_THREAD_FLAGS
{
- CsrThreadAltertable = 0x1,
+ CsrThreadAlertable = 0x1,
CsrThreadInTermination = 0x2,
CsrThreadTerminated = 0x4,
CsrThreadIsServerThread = 0x10
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
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;
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
} CSR_SERVER_DLL, *PCSR_SERVER_DLL;
-/* FUNCTION TYPES *************************************************************/
-
typedef
NTSTATUS
(NTAPI *PCSR_SERVER_DLL_INIT_CALLBACK)(IN PCSR_SERVER_DLL LoadedServerDll);