10#define KMT_FLT_USER_MODE
26 OUT SC_HANDLE *ServiceHandle);
66 _Out_ SC_HANDLE *ServiceHandle)
99 _Inout_ SC_HANDLE *ServiceHandle)
121 if (EnableDriverLoadPrivlege)
243 _Inout_ SC_HANDLE *ServiceHandle)
451 WCHAR DefaultInstance[128];
458 StringCbCopyW(KeyPath,
sizeof(KeyPath),
L"SYSTEM\\CurrentControlSet\\Services\\");
477 StringCbCatW(DefaultInstance,
sizeof(DefaultInstance),
L" Instance");
ACPI_SIZE strlen(const char *String)
static VOID FreeMemory(PCREATE_DATA Data)
static WCHAR ServiceName[]
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
static const WCHAR Message[]
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
_Must_inspect_result_ _Inout_ PFLT_VOLUME _In_ PCUNICODE_STRING Altitude
struct _KMTFLT_MESSAGE_HEADER KMTFLT_MESSAGE_HEADER
static WCHAR TestServiceName[MAX_PATH]
DWORD KmtFltCloseService(_Inout_ SC_HANDLE *ServiceHandle)
DWORD KmtFltSendToDriver(_In_ HANDLE hPort, _In_ DWORD Message)
DWORD EnablePrivilege(_In_ HANDLE hToken, _In_z_ LPWSTR lpPrivName, _In_ BOOL bEnable)
DWORD KmtFltCreateService(_In_z_ PCWSTR ServiceName, _In_z_ PCWSTR DisplayName, _Out_ SC_HANDLE *ServiceHandle)
DWORD KmtFltRunKernelTest(_In_ HANDLE hPort, _In_z_ PCSTR TestName)
DWORD KmtFltSendUlongToDriver(_In_ HANDLE hPort, _In_ DWORD Message, _In_ DWORD Value)
DWORD EnablePrivilegeInCurrentProcess(_In_z_ LPWSTR lpPrivName, _In_ BOOL bEnable)
struct _KMTFLT_MESSAGE_HEADER * PKMTFLT_MESSAGE_HEADER
DWORD KmtFltDisconnectComms(_In_ HANDLE hPort)
DWORD KmtFltSendBufferToDriver(_In_ HANDLE hPort, _In_ DWORD Message, _In_reads_bytes_(BufferSize) LPVOID InBuffer, _In_ DWORD BufferSize, _Out_writes_bytes_to_opt_(OutBufferSize, *BytesReturned) LPVOID OutBuffer, _In_ DWORD OutBufferSize, _Out_opt_ LPDWORD BytesReturned)
DWORD KmtFltSendStringToDriver(_In_ HANDLE hPort, _In_ DWORD Message, _In_ PCSTR String)
DWORD KmtpCreateService(IN PCWSTR ServiceName, IN PCWSTR ServicePath, IN PCWSTR DisplayName OPTIONAL, IN DWORD ServiceType, OUT SC_HANDLE *ServiceHandle)
DWORD KmtFltAddAltitude(_In_z_ LPWSTR Altitude)
DWORD KmtFltUnloadDriver(_In_ HANDLE *hPort, _In_ BOOLEAN DisonnectComms)
DWORD KmtFltSendWStringToDriver(_In_ HANDLE hPort, _In_ DWORD Message, _In_ PCWSTR String)
DWORD KmtFltConnectComms(_Out_ HANDLE *hPort)
DWORD KmtFltLoadDriver(_In_ BOOLEAN EnableDriverLoadPrivlege, _In_ BOOLEAN RestartIfRunning, _In_ BOOLEAN ConnectComms, _Out_ HANDLE *hPort)
DWORD KmtFltDeleteService(_In_opt_z_ PCWSTR ServiceName, _Inout_ SC_HANDLE *ServiceHandle)
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
void __cdecl __debugbreak(void)
DWORD KmtCloseService(IN OUT SC_HANDLE *ServiceHandle)
DWORD KmtDeleteService(IN PCWSTR ServiceName OPTIONAL, IN OUT SC_HANDLE *ServiceHandle)
DWORD KmtFltDisconnect(_In_ HANDLE hPort)
DWORD KmtFltLoad(_In_z_ PCWSTR ServiceName)
DWORD KmtFltSendMessage(_In_ HANDLE hPort, _In_reads_bytes_(dwInBufferSize) LPVOID InBuffer, _In_ DWORD InBufferSize, _Out_writes_bytes_to_opt_(dutBufferSize, *BytesReturned) LPVOID OutBuffer, _In_ DWORD OutBufferSize, _Out_opt_ LPDWORD BytesReturned)
DWORD KmtFltUnload(_In_z_ PCWSTR ServiceName)
DWORD KmtFltConnect(_In_z_ PCWSTR ServiceName, _Out_ HANDLE *hPort)
#define _In_reads_bytes_(s)
#define _Out_writes_bytes_to_opt_(s, c)
#define KEY_CREATE_SUB_KEY
#define REG_OPTION_NON_VOLATILE
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
PULONG MinorVersion OPTIONAL
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
DWORD WINAPI GetLastError(void)
#define ERROR_SERVICE_ALREADY_RUNNING
#define SE_LOAD_DRIVER_NAME
#define HKEY_LOCAL_MACHINE
#define SERVICE_FILE_SYSTEM_DRIVER
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED