| 931 | namespace Threads |
| 932 | { |
| 933 | BOOL WINAPI KbCreateUserThread( |
| 934 | ULONG ProcessId, |
| 935 | WdkTypes::PVOID ThreadRoutine, |
| 936 | WdkTypes::PVOID Argument, |
| 937 | BOOL CreateSuspended, |
| 938 | OUT OPTIONAL WdkTypes::CLIENT_ID* ClientId, |
| 939 | OUT OPTIONAL WdkTypes::HANDLE* hThread |
| 940 | ) { |
| 941 | if (!ProcessId) return FALSE; |
| 942 | KB_CREATE_USER_THREAD_IN Input = {}; |
| 943 | KB_CREATE_USER_SYSTEM_THREAD_OUT Output = {}; |
| 944 | Input.ProcessId = ProcessId; |
| 945 | Input.ThreadRoutine = ThreadRoutine; |
| 946 | Input.Argument = Argument; |
| 947 | Input.CreateSuspended = CreateSuspended; |
| 948 | BOOL Status = KbSendRequest(Ctls::KbCreateUserThread, &Input, sizeof(Input), &Output, sizeof(Output)); |
| 949 | if (ClientId) *ClientId = Output.ClientId; |
| 950 | if (hThread) |
| 951 | *hThread = Output.hThread; |
| 952 | else |
| 953 | Descriptors::KbCloseHandle(Output.hThread); |
| 954 | return Status; |
| 955 | } |
| 956 | |
| 957 | BOOL WINAPI KbCreateSystemThread( |
| 958 | ULONG ProcessId, |
nothing calls this directly
no test coverage detected