Export (0) Print
Expand All

OpenThread (Compact 2013)

3/28/2014

This function opens an existing thread object.


HANDLE OpenThread(
  DWORD dwDesiredAccess,
  BOOL bInheritHandle,
  DWORD dwThreadId
);

dwDesiredAccess

[in] Access to the thread object. This access right is checked against the security descriptor for the thread. This parameter can be one or more of the thread access rights.

bInheritHandle

[in] Indicates whether the new process inherits the handle.

dwThreadId

[in] Identifier of the thread to open.

An open handle to the specified thread indicates success. NULL indicates failure. To get extended error information, call GetLastError.

The handle returned by OpenThread can be used in any function that requires a handle to a thread, such as the wait functions, provided you requested the appropriate access rights. The handle is granted access to the thread object only to the extent it was specified in the dwDesiredAccess parameter.

When you are finished with the handle, be sure to close it by using the CloseHandle function.

Header

winbase.h

Library

coredll.lib

Show:
© 2014 Microsoft