12#define CsrAcquireProcessLock() \
13 RtlEnterCriticalSection(&CsrProcessLock);
15#define CsrReleaseProcessLock() \
16 RtlLeaveCriticalSection(&CsrProcessLock);
18#define ProcessStructureListLocked() \
19 (CsrProcessLock.OwningThread == NtCurrentTeb()->ClientId.UniqueThread)
21#define CsrAcquireWaitLock() \
22 RtlEnterCriticalSection(&CsrWaitListsLock);
24#define CsrReleaseWaitLock() \
25 RtlLeaveCriticalSection(&CsrWaitListsLock);
27#define CsrAcquireNtSessionLock() \
28 RtlEnterCriticalSection(&CsrNtSessionLock);
30#define CsrReleaseNtSessionLock() \
31 RtlLeaveCriticalSection(&CsrNtSessionLock);
34#define CSR_SERVER_DLL_MAX 4
44#define NUMBER_THREAD_HASH_BUCKETS 257
69#if (NTDDI_VERSION < NTDDI_WS03)
70CSR_API(CsrSrvIdentifyAlertableThread);
_In_opt_ PWSTR _In_ PWSTR _Inout_ PULONG ParameterValue
static const WCHAR Message[]
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
PULONG MinorVersion OPTIONAL
VOID NTAPI CsrLockedReferenceThread(IN PCSR_THREAD CsrThread)
VOID NTAPI CsrReleaseCapturedArguments(IN PCSR_API_MESSAGE ApiMessage)
PCSR_PROCESS CsrRootProcess
BOOLEAN NTAPI CsrSbTerminateSession(IN PSB_API_MSG ApiMessage)
PCSR_PROCESS NTAPI CsrAllocateProcess(VOID)
UNICODE_STRING CsrApiPortName
NTSTATUS NTAPI CsrInsertThread(IN PCSR_PROCESS Process, IN PCSR_THREAD Thread)
BOOLEAN NTAPI ProtectHandle(IN HANDLE ObjectHandle)
VOID NTAPI CsrReferenceNtSession(IN PCSR_NT_SESSION Session)
NTSTATUS NTAPI CsrSbApiPortInitialize(VOID)
NTSTATUS NTAPI CsrSbApiHandleConnectionRequest(IN PSB_API_MSG Message)
VOID NTAPI CsrSbApiRequestThread(IN PVOID Parameter)
NTSTATUS NTAPI CsrCreateSessionObjectDirectory(IN ULONG SessionId)
NTSTATUS NTAPI CsrSrvCreateSharedSection(IN PCHAR ParameterValue)
NTSTATUS NTAPI CsrApiRequestThread(IN PVOID Parameter)
ULONG CsrTotalPerProcessDataLength
BOOLEAN NTAPI UnProtectHandle(IN HANDLE ObjectHandle)
NTSTATUS NTAPI CsrInitializeNtSessionList(VOID)
VOID NTAPI CsrRemoveProcess(IN PCSR_PROCESS CsrProcess)
VOID NTAPI CsrInsertProcess(IN PCSR_PROCESS ParentProcess OPTIONAL, IN PCSR_PROCESS CsrProcess)
NTSTATUS NTAPI CsrLoadServerDll(IN PCHAR DllString, IN PCHAR EntryPoint OPTIONAL, IN ULONG ServerId)
VOID NTAPI CsrLockedDereferenceThread(IN PCSR_THREAD CsrThread)
RTL_CRITICAL_SECTION CsrWaitListsLock
UNICODE_STRING CsrDirectoryName
NTSTATUS NTAPI CsrApiHandleConnectionRequest(IN PCSR_API_MESSAGE ApiMessage)
NTSTATUS NTAPI CsrSrvAttachSharedSection(IN PCSR_PROCESS CsrProcess OPTIONAL, OUT PCSR_API_CONNECTINFO ConnectInfo)
VOID NTAPI CsrDeallocateProcess(IN PCSR_PROCESS CsrProcess)
HANDLE CsrInitializationEvent
VOID NTAPI CsrDeallocateThread(IN PCSR_THREAD CsrThread)
BOOLEAN NTAPI CsrSbCreateProcess(IN PSB_API_MSG ApiMessage)
PCSR_THREAD NTAPI CsrLocateThreadInProcess(IN PCSR_PROCESS CsrProcess OPTIONAL, IN PCLIENT_ID Cid)
NTSTATUS NTAPI CsrServerDllInitialization(IN PCSR_SERVER_DLL LoadedServerDll)
NTSTATUS NTAPI CsrCreateObjectDirectory(IN PCHAR ObjectDirectory)
#define CSR_SERVER_DLL_MAX
PCSR_THREAD NTAPI CsrLocateThreadByClientId(OUT PCSR_PROCESS *Process OPTIONAL, IN PCLIENT_ID ClientId)
BOOLEAN NTAPI CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock, IN PLIST_ENTRY WaitList, IN PVOID WaitArgument1, IN PVOID WaitArgument2, IN ULONG WaitFlags, IN BOOLEAN DereferenceThread)
NTSTATUS NTAPI CsrInitializeProcessStructure(VOID)
PVOID CsrSrvSharedSectionHeap
PCSR_THREAD NTAPI CsrAllocateThread(IN PCSR_PROCESS CsrProcess)
VOID NTAPI CsrLockedReferenceProcess(IN PCSR_PROCESS CsrProcess)
NTSTATUS NTAPI CsrApiPortInitialize(VOID)
BOOLEAN NTAPI CsrSbForeignSessionComplete(IN PSB_API_MSG ApiMessage)
ULONG CsrMaxApiRequestThreads
PVOID * CsrSrvSharedStaticServerData
PCSR_SERVER_DLL CsrLoadedServerDll[CSR_SERVER_DLL_MAX]
HANDLE CsrObjectDirectory
NTSTATUS NTAPI CsrSetDirectorySecurity(IN HANDLE ObjectDirectory)
UNICODE_STRING CsrSbApiPortName
BOOLEAN NTAPI CsrSbCreateSession(IN PSB_API_MSG ApiMessage)
SYSTEM_BASIC_INFORMATION CsrNtSysInfo
NTSTATUS NTAPI CsrCreateLocalSystemSD(OUT PSECURITY_DESCRIPTOR *LocalSystemSd)
LIST_ENTRY CsrThreadHashTable[NUMBER_THREAD_HASH_BUCKETS]
BOOLEAN NTAPI CsrCaptureArguments(IN PCSR_THREAD CsrThread, IN PCSR_API_MESSAGE ApiMessage)
RTL_CRITICAL_SECTION CsrProcessLock
VOID NTAPI CsrDereferenceNtSession(IN PCSR_NT_SESSION Session, IN NTSTATUS ExitStatus)
VOID NTAPI CsrLockedDereferenceProcess(PCSR_PROCESS CsrProcess)
#define NUMBER_THREAD_HASH_BUCKETS
_Out_ PCLIENT_ID ClientId
_Inout_opt_ PVOID Parameter