12#define WIN32_NO_STATUS
13#define WIN32_LEAN_AND_MEAN
26#define SvchostDbgPrint(lev, fmt, ...) \
27 DbgPrintEx(DPFLTR_SVCHOST_ID, \
29 "[SVCHOST] %lx.%lx: " fmt, \
30 GetCurrentProcessId(), \
31 GetCurrentThreadId(), \
34#define DBG_ERR(fmt, ...) SvchostDbgPrint(1, fmt, __VA_ARGS__)
35#define DBG_TRACE(fmt, ...) SvchostDbgPrint(4, fmt, __VA_ARGS__)
48#define SVCHOST_RPC_INIT_COMPLETE 1
49#define SVCHOST_NBT_INIT_COMPLETE 2
50#define SVCHOST_SID_INIT_COMPLETE 4
static WCHAR ServiceName[]
CLIPBOARD_GLOBALS Globals
enum _SECURITY_IMPERSONATION_LEVEL SECURITY_IMPERSONATION_LEVEL
WAITORTIMERCALLBACK PSVCHOST_STOP_CALLBACK
SID_IDENTIFIER_AUTHORITY Authority
PSVCHOST_SERVICE pService
struct _SVCHOST_SERVICE * pService
DWORD DefaultRpcStackSize
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
DWORD CoInitializeSecurityParam
DWORD AuthenticationCapabilities
DWORD AuthenticationLevel
LONG cServiceActiveThreadCount
PSVCHOST_STOP_CALLBACK pfnStopCallback
struct _SVCHOST_DLL SVCHOST_DLL
struct _SID_DATA SID_DATA
NTSTATUS NTAPI RpcpStopRpcServer(_In_ RPC_IF_HANDLE IfSpec)
DWORD WINAPI SvcNetBiosReset(_In_ UCHAR LanaNum)
VOID WINAPI MemInit(_In_ HANDLE Heap)
VOID(WINAPI * PSVCHOST_INIT_GLOBALS)(_In_ PSVCHOST_GLOBAL_DATA Globals)
NTSTATUS NTAPI RpcpStartRpcServer(_In_ PCWSTR IfName, _In_ RPC_IF_HANDLE IfSpec)
NTSTATUS NTAPI RpcpInitRpcServer(VOID)
PSVCHOST_GLOBAL_DATA g_pSvchostSharedGlobals
NTSTATUS NTAPI RpcpStopRpcServerEx(_In_ RPC_IF_HANDLE IfSpec)
VOID WINAPI SvchostBuildSharedGlobals(VOID)
VOID WINAPI SvcNetBiosClose(VOID)
VOID WINAPI SvcNetBiosOpen(VOID)
DWORD WINAPI RegQueryStringA(_In_ HKEY hKey, _In_ LPCWSTR pszValueName, _In_ DWORD dwExpectedType, _Out_ LPCSTR *ppszData)
BOOL WINAPI MemFree(_In_ LPVOID lpMem)
VOID WINAPI SvchostCharLowerW(_In_ LPCWSTR lpSrcStr)
struct _SVCHOST_SERVICE SVCHOST_SERVICE
NTSTATUS NTAPI ScCreateWellKnownSids(VOID)
struct _SVCHOST_OPTIONS * PSVCHOST_OPTIONS
struct _SVCHOST_CALLBACK_CONTEXT SVCHOST_CALLBACK_CONTEXT
struct _DOMAIN_SID_DATA DOMAIN_SID_DATA
DWORD WINAPI RegQueryString(_In_ HKEY hKey, _In_ LPCWSTR pszValueName, _In_ DWORD dwExpectedType, _Out_ PBYTE *ppbData)
DWORD WINAPI SvcRegisterStopCallback(_Out_ PHANDLE phNewWaitObject, _In_ PCWSTR ServiceName, _In_ HANDLE hObject, _In_ PSVCHOST_STOP_CALLBACK pfnStopCallback, _In_ PVOID pContext, _In_ ULONG dwFlags)
PVOID WINAPI MemAlloc(_In_ DWORD dwFlags, _In_ DWORD dwBytes)
struct _SVCHOST_OPTIONS SVCHOST_OPTIONS
struct _SVCHOST_CALLBACK_CONTEXT * PSVCHOST_CALLBACK_CONTEXT
BOOL WINAPI InitializeSecurity(_In_ DWORD dwParam, _In_ DWORD dwAuthnLevel, _In_ DWORD dwImpLevel, _In_ DWORD dwCapabilities)
struct _SVCHOST_SERVICE * PSVCHOST_SERVICE
DWORD WINAPI RegQueryDword(_In_ HKEY hKey, _In_ LPCWSTR pszValueName, _Out_ PDWORD pdwValue)
VOID WINAPI SvcNetBiosInit(VOID)
struct _SVCHOST_DLL * PSVCHOST_DLL
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags