Export (0) Print
Expand All
Expand Minimize

GetCurrentProcessorNumber function

Retrieves the number of the processor the current thread was running on during the call to this function.

Syntax


DWORD WINAPI GetCurrentProcessorNumber(void);

Parameters

This function has no parameters.

Return value

The function returns the current processor number.

Remarks

This function is used to provide information for estimating process performance.

On systems with more than 64 logical processors, the GetCurrentProcessorNumber function returns the processor number within the processor group to which the logical processor is assigned. Use the GetCurrentProcessorNumberEx function to retrieve the processor group and number of the current processor.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinBase.h on Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 (include Windows.h);
Processthreadsapi.h on Windows 8 and Windows Server 2012

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Multiple Processors
Process and Thread Functions
Processes

 

 

Community Additions

ADD
Show:
© 2014 Microsoft