Kernel32OpenThread(GenericAccessRights, Boolean, UInt32) Method
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", SetLastError = true)]
public static SafeAccessTokenHandle OpenThread(
GenericAccessRights desiredAccess,
bool inheritHandle,
uint threadId
)
<DllImportAttribute("Kernel32.dll", SetLastError := true>]
Public Shared Function OpenThread (
desiredAccess As GenericAccessRights,
inheritHandle As Boolean,
threadId As UInteger
) As SafeAccessTokenHandle
Dim desiredAccess As GenericAccessRights
Dim inheritHandle As Boolean
Dim threadId As UInteger
Dim returnValue As SafeAccessTokenHandle
returnValue = Kernel32.OpenThread(desiredAccess,
inheritHandle, threadId)
public:
[DllImportAttribute(L"Kernel32.dll", SetLastError = true)]
static SafeAccessTokenHandle^ OpenThread(
GenericAccessRights desiredAccess,
bool inheritHandle,
unsigned int threadId
)
[<DllImportAttribute("Kernel32.dll", SetLastError = true)>]
static member OpenThread :
desiredAccess : GenericAccessRights *
inheritHandle : bool *
threadId : uint32 -> SafeAccessTokenHandle
No code example is currently available or this language may not be supported.
- desiredAccess GenericAccessRights
-
The access to the thread object.
This access right is checked against the security descriptor for the thread.
- inheritHandle Boolean
-
If this value is , processes created by this process will inherit the handle.
Otherwise, the processes do not inherit this handle.
- threadId UInt32
-
The identifier of the thread to be opened.
SafeAccessTokenHandle
If the function succeeds, the return value is an open handle to the specified thread.
If the function fails, the return value is
Zero.
To get extended error information, call
GetLastWin32Error.