32#if (NTDDI_VERSION < NTDDI_WS03)
33 CsrSrvIdentifyAlertableThread
34 CsrSrvSetPriorityClass
46#if (NTDDI_VERSION < NTDDI_WS03)
65 "IdentifyAlertableThread",
95 LoadedServerDll->NameTable = CsrServerApiNameTable;
97 LoadedServerDll->SizeOfProcessData = 0;
98 LoadedServerDll->ConnectCallback =
NULL;
99 LoadedServerDll->DisconnectCallback =
NULL;
207 EntryPoint ? EntryPoint :
"ServerDllInitialization");
213 (
PVOID)&ServerDllInitProcedure);
231 Status = ServerDllInitProcedure(ServerDll);
237 DPRINT1(
"CSRSS: Exception 0x%lx while calling Server DLL entrypoint %Z!%Z()\n",
238 Status, &DllName, &EntryPointString);
376 if (*SizeValue ==
',')
514#if (NTDDI_VERSION < NTDDI_WS03)
533CSR_API(CsrSrvIdentifyAlertableThread)
653 DPRINT1(
"CsrUnhandledExceptionFilter called\n");
658 sizeof(DebuggerInfo),
685 DPRINT1(
"CsrUnhandledExceptionFilter(): RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE) failed, Status = 0x%08lx\n",
Status);
693 ErrorParameters[0] = (
ULONG_PTR)&ErrorSource;
694 ErrorParameters[1] = ExceptionInfo->ExceptionRecord->ExceptionCode;
695 ErrorParameters[2] = (
ULONG_PTR)ExceptionInfo->ExceptionRecord->ExceptionAddress;
696 ErrorParameters[3] = (
ULONG_PTR)ExceptionInfo->ContextRecord;
710 ExceptionInfo->ExceptionRecord->ExceptionCode);
NTSTATUS NTAPI NtUnmapViewOfSection(IN HANDLE ProcessHandle, IN PVOID BaseAddress)
NTSTATUS NTAPI NtCreateSection(OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN PLARGE_INTEGER MaximumSize OPTIONAL, IN ULONG SectionPageProtection OPTIONAL, IN ULONG AllocationAttributes, IN HANDLE FileHandle OPTIONAL)
NTSTATUS NTAPI NtMapViewOfSection(IN HANDLE SectionHandle, IN HANDLE ProcessHandle, IN OUT PVOID *BaseAddress, IN ULONG_PTR ZeroBits, IN SIZE_T CommitSize, IN OUT PLARGE_INTEGER SectionOffset OPTIONAL, IN OUT PSIZE_T ViewSize, IN SECTION_INHERIT InheritDisposition, IN ULONG AllocationType, IN ULONG Protect)
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
_In_opt_ PWSTR _In_ PWSTR _Inout_ PULONG ParameterValue
#define CSRSRV_SERVERDLL_INDEX
#define CSRSRV_FIRST_API_NUMBER
BOOLEAN NTAPI CsrValidateMessageBuffer(IN PCSR_API_MESSAGE ApiMessage, IN PVOID *Buffer, IN ULONG ElementCount, IN ULONG ElementSize)
#define CsrGetClientThread()
struct _CSR_SERVER_DLL CSR_SERVER_DLL
NTSTATUS(NTAPI * PCSR_API_ROUTINE)(IN OUT PCSR_API_MESSAGE ApiMessage, IN OUT PCSR_REPLY_CODE ReplyCode OPTIONAL)
NTSTATUS(NTAPI * PCSR_SERVER_DLL_INIT_CALLBACK)(IN PCSR_SERVER_DLL LoadedServerDll)
#define CSR_SERVER_DLL_INIT(n)
#define NT_SUCCESS(StatCode)
enum _EXCEPTION_DISPOSITION EXCEPTION_DISPOSITION
#define ROUND_UP(n, align)
@ SystemKernelDebuggerInformation
NTSTATUS NTAPI NtRaiseHardError(IN NTSTATUS ErrorStatus, IN ULONG NumberOfParameters, IN ULONG UnicodeStringParameterMask, IN PULONG_PTR Parameters, IN ULONG ValidResponseOptions, OUT PULONG Response)
#define EXCEPTION_EXECUTE_HANDLER
#define EXCEPTION_CONTINUE_EXECUTION
NTSTATUS NTAPI LdrUnloadDll(_In_ PVOID BaseAddress)
NTSTATUS NTAPI DECLSPEC_HOTPATCH LdrLoadDll(_In_opt_ PWSTR SearchPath, _In_opt_ PULONG DllCharacteristics, _In_ PUNICODE_STRING DllName, _Out_ PVOID *BaseAddress)
NTSTATUS NTAPI LdrGetProcedureAddress(_In_ PVOID BaseAddress, _In_opt_ _When_(Ordinal==0, _Notnull_) PANSI_STRING Name, _In_opt_ _When_(Name==NULL, _In_range_(>, 0)) ULONG Ordinal, _Out_ PVOID *ProcedureAddress)
#define SE_SHUTDOWN_PRIVILEGE
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
NTSYSAPI NTSTATUS NTAPI RtlAdjustPrivilege(_In_ ULONG Privilege, _In_ BOOLEAN NewValue, _In_ BOOLEAN ForThread, _Out_ PBOOLEAN OldValue)
#define PAGE_EXECUTE_READ
#define SECTION_ALL_ACCESS
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI PVOID NTAPI RtlCreateHeap(IN ULONG Flags, IN PVOID HeapBase OPTIONAL, IN ULONG ReserveSize OPTIONAL, IN ULONG CommitSize OPTIONAL, IN PVOID Lock OPTIONAL, IN PRTL_HEAP_PARAMETERS Parameters OPTIONAL)
NTSTATUS NTAPI NtTerminateProcess(HANDLE ProcessHandle, LONG ExitStatus)
#define NtCurrentProcess()
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
NTSYSAPI NTSTATUS NTAPI RtlCharToInteger(PCSZ String, ULONG Base, PULONG Value)
#define PAGE_EXECUTE_READWRITE
#define UNREFERENCED_PARAMETER(P)
#define STATUS_TOO_MANY_NAMES
#define STATUS_SYSTEM_PROCESS_TERMINATED
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionInformation()
LONG NTAPI RtlUnhandledExceptionFilter(IN struct _EXCEPTION_POINTERS *ExceptionInfo)
PULONG MinorVersion OPTIONAL
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
PCSR_CONNECT_CALLBACK ConnectCallback
PVOID ReadOnlySharedMemoryHeap
PVOID ReadOnlySharedMemoryBase
PVOID * ReadOnlyStaticServerData
ULONG CsrTotalPerProcessDataLength
NTSTATUS NTAPI CsrServerDllInitialization(IN PCSR_SERVER_DLL LoadedServerDll)
#define CSR_SERVER_DLL_MAX
SYSTEM_BASIC_INFORMATION CsrNtSysInfo
EXCEPTION_DISPOSITION NTAPI CsrUnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo)
BOOLEAN CsrServerApiServerValidTable[CsrpMaxApiNumber]
PCSR_API_ROUTINE CsrServerApiDispatchTable[CsrpMaxApiNumber]
NTSTATUS NTAPI CsrSrvCreateSharedSection(IN PCHAR ParameterValue)
NTSTATUS NTAPI CsrLoadServerDll(IN PCHAR DllString, IN PCHAR EntryPoint OPTIONAL, IN ULONG ServerId)
NTSTATUS NTAPI CsrSrvAttachSharedSection(IN PCSR_PROCESS CsrProcess OPTIONAL, OUT PCSR_API_CONNECTINFO ConnectInfo)
VOID NTAPI CsrSetCallingSpooler(ULONG Reserved)
ULONG CsrSrvSharedSectionSize
PVOID CsrSrvSharedSectionHeap
PVOID * CsrSrvSharedStaticServerData
HANDLE CsrSrvSharedSection
PCSR_SERVER_DLL CsrLoadedServerDll[CSR_SERVER_DLL_MAX]
PVOID CsrSrvSharedSectionBase
#define STATUS_INVALID_PARAMETER
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_Reserved_ PVOID Reserved
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO