CreateRemoteThread function kernel32
int
CreateRemoteThread(
- int hProcess,
- Pointer<
SECURITY_ATTRIBUTES> lpThreadAttributes, - int dwStackSize,
- Pointer<
NativeFunction< lpStartAddress,ThreadProc> > - Pointer<
NativeType> lpParameter, - int dwCreationFlags,
- Pointer<
Uint32> lpThreadId,
Creates a thread that runs in the virtual address space of another process. Use the CreateRemoteThreadEx function to create a thread that runs in the virtual address space of another process and optionally specify extended attributes.
HANDLE CreateRemoteThread(
HANDLE hProcess,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
SIZE_T dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter,
DWORD dwCreationFlags,
LPDWORD lpThreadId
);
Implementation
int CreateRemoteThread(
int hProcess,
Pointer<SECURITY_ATTRIBUTES> lpThreadAttributes,
int dwStackSize,
Pointer<NativeFunction<ThreadProc>> lpStartAddress,
Pointer lpParameter,
int dwCreationFlags,
Pointer<Uint32> lpThreadId) =>
_CreateRemoteThread(hProcess, lpThreadAttributes, dwStackSize,
lpStartAddress, lpParameter, dwCreationFlags, lpThreadId);