Debugging Tools for Windows

GetKdContext

The GetKdContext function returns the total number of processors and the number of the current processor in the structure ppi points to.

ULONG 
  GetKdContext (
    PPROCESSORINFO ppi
    );

Parameters

ppi
Points to the following structure:

typedef struct _tagPROCESSORINFO {
  USHORT  Processor;           // current processor
  USHORT  NumberProcessors;    // total number of processors
} PROCESSORINFO, *PPROCESSORINFO;

Return Value

The total number of processors.

Requirements

Headers: Defined in wdbgexts.h. If you are writing a WdbgExts extension, include wdbgexts.h. If you are writing a DbgEng extension that calls this function, include wdbgexts.h before dbgeng.h (see Writing DbgEng Extension Code for details).

Build machine: CAPEBUILD