GetThreadIdealProcessorEx

Retrieves the processor number of the ideal processor for the specified thread.

Syntax

BOOL GetThreadIdealProcessorEx(
         HANDLE hThread,
         PPROCESSOR_NUMBER lpIdealProcessor
)  

Parameters

hThread
Type: HANDLE 

[in] A handle to the thread for which to retrieve the ideal processor. This handle must have been created with the THREAD_QUERY_LIMITED_INFORMATION access right. For more information, see Thread Security and Access Rights.

lpIdealProcessor
Type: PPROCESSOR_NUMBER 

[out] Points to PROCESSOR_NUMBER structure to receive the number of the ideal processor.

Return value

Type: BOOL 

If the function succeeds, it returns a nonzero value.If the function fails, it returns zero. To get extended error information, use GetLastError.

Requirements

Header: Declared in processthreadsapi.h.

Library: Use kernelx.lib.