27 out of 38 rated this helpful - Rate this topic

GetCurrentProcessorNumber function

Applies to: desktop apps only

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

Minimum supported server

Windows Server 2003

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Multiple Processors
Process and Thread Functions
Processes

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Delphi Syntax
how to use this function delphi?
Syntax in Deplhi
whats the syntax of this function for delphi?
C# syntax
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
public static extern int GetCurrentProcessorNumber();
vb.net syntax
<DllImport("kernel32.dll", CharSet:=CharSet.Auto)> _
Public Shared Function GetCurrentProcessorNumber() As Integer End Function