15#define KMT_STRINGIZE(x) #x
18#define location(file, line) do { ErrorFileAndLine = file ":" KMT_STRINGIZE(line); } while (0)
19#define error_value(Error, value) do { location(__FILE__, __LINE__); Error = value; } while (0)
20#define error(Error) error_value(Error, GetLastError())
21#define error_goto(Error, label) do { error(Error); goto label; } while (0)
22#define error_value_goto(Error, value, label) do { error_value(Error, value); goto label; } while (0)
37 OUT SC_HANDLE *ServiceHandle);
42 IN OUT SC_HANDLE *ServiceHandle);
49 OUT SC_HANDLE *ServiceHandle,
55 IN OUT SC_HANDLE *ServiceHandle);
60 IN OUT SC_HANDLE *ServiceHandle);
63 IN OUT SC_HANDLE *ServiceHandle);
66#ifdef KMT_FLT_USER_MODE
73KmtFltCreateAndStartService(
77 _Out_ SC_HANDLE *ServiceHandle,
124 _Inout_ SC_HANDLE *ServiceHandle);
127 _Inout_ SC_HANDLE *ServiceHandle);
static WCHAR ServiceName[]
DWORD KmtFltCloseService(_Inout_ SC_HANDLE *ServiceHandle)
DWORD KmtFltDeleteService(_In_opt_z_ PCWSTR ServiceName, _Inout_ SC_HANDLE *ServiceHandle)
DWORD KmtServiceCleanup(BOOLEAN IgnoreErrors)
DWORD KmtServiceInit(VOID)
DWORD KmtCloseService(IN OUT SC_HANDLE *ServiceHandle)
DWORD KmtDeleteService(IN PCWSTR ServiceName OPTIONAL, IN OUT SC_HANDLE *ServiceHandle)
DWORD KmtCreateService(IN PCWSTR ServiceName, IN PCWSTR ServicePath, IN PCWSTR DisplayName OPTIONAL, OUT SC_HANDLE *ServiceHandle)
DWORD KmtStopService(IN PCWSTR ServiceName OPTIONAL, IN OUT SC_HANDLE *ServiceHandle)
DWORD KmtStartService(IN PCWSTR ServiceName OPTIONAL, IN OUT SC_HANDLE *ServiceHandle)
DWORD KmtCreateAndStartService(IN PCWSTR ServiceName, IN PCWSTR ServicePath, IN PCWSTR DisplayName OPTIONAL, OUT SC_HANDLE *ServiceHandle, IN BOOLEAN RestartIfRunning)
DWORD KmtFltReplyMessage(_In_ HANDLE hPort, _In_reads_bytes_(ReplyBufferSize) PFILTER_REPLY_HEADER ReplyBuffer, _In_ DWORD ReplyBufferSize)
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 KmtFltGetMessageResult(_In_ HANDLE hPort, _In_ LPOVERLAPPED Overlapped, _Out_ LPDWORD BytesTransferred)
DWORD KmtFltGetMessage(_In_ HANDLE hPort, _Out_writes_bytes_(MessageBufferSize) PFILTER_MESSAGE_HEADER MessageBuffer, _In_ DWORD MessageBufferSize, _In_opt_ LPOVERLAPPED Overlapped)
DWORD KmtFltUnload(_In_z_ PCWSTR ServiceName)
DWORD KmtFltConnect(_In_z_ PCWSTR ServiceName, _Out_ HANDLE *hPort)
#define _In_reads_bytes_(size)
#define _Out_writes_bytes_(size)
#define _Out_writes_bytes_to_opt_(size, count)
PULONG MinorVersion OPTIONAL
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR _Out_opt_ PULONG BytesTransferred
_In_ DWORD _In_ DWORD _In_ DWORD _Out_ LPDWORD lpBytesReturned