ReactOS 0.4.17-dev-470-gf9e3448
NtGetCurrentProcessorNumberEx.c File Reference
#include "precomp.h"
#include <winnls.h>
Include dependency graph for NtGetCurrentProcessorNumberEx.c:

Go to the source code of this file.

Typedefs

typedef NTSTATUS NTAPI FN_NtGetCurrentProcessorNumberEx(_Out_ PPROCESSOR_NUMBER)
 

Functions

 START_TEST (NtGetCurrentProcessorNumberEx)
 

Variables

FN_NtGetCurrentProcessorNumberExpNtGetCurrentProcessorNumberEx
 

Typedef Documentation

◆ FN_NtGetCurrentProcessorNumberEx

typedef NTSTATUS NTAPI FN_NtGetCurrentProcessorNumberEx(_Out_ PPROCESSOR_NUMBER)

Definition at line 14 of file NtGetCurrentProcessorNumberEx.c.

Function Documentation

◆ START_TEST()

Definition at line 19 of file NtGetCurrentProcessorNumberEx.c.

20{
21 PROCESSOR_NUMBER ProcessorNumber;
23
24 HINSTANCE hinstNtdll = GetModuleHandleA("ntdll.dll");
25 pNtGetCurrentProcessorNumberEx = (FN_NtGetCurrentProcessorNumberEx*)GetProcAddress(hinstNtdll, "NtGetCurrentProcessorNumberEx");
27 {
28 skip("NtGetCurrentProcessorNumberEx is not available\n");
29 return;
30 }
31
32 memset(&ProcessorNumber, 0xAA, sizeof(ProcessorNumber));
33 Status = pNtGetCurrentProcessorNumberEx(&ProcessorNumber);
35 ok(ProcessorNumber.Group < 64, "Processor group is out of range");
36 ok(ProcessorNumber.Number < 64, "Processor number is out of range");
37 ok(ProcessorNumber.Reserved == 0, "Reserved field is not zero");
38
41
42 Status = pNtGetCurrentProcessorNumberEx((PVOID)(ULONG_PTR)0xDEADDEADDEADDEADull);
44}
FN_NtGetCurrentProcessorNumberEx * pNtGetCurrentProcessorNumberEx
NTSTATUS NTAPI FN_NtGetCurrentProcessorNumberEx(_Out_ PPROCESSOR_NUMBER)
#define ok_eq_hex(value, expected)
Definition: apitest.h:134
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
LONG NTSTATUS
Definition: precomp.h:26
#define NULL
Definition: types.h:112
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
#define STATUS_ACCESS_VIOLATION
Status
Definition: gdiplustypes.h:24
PROCESSOR_NUMBER
Definition: ntbasedef.h:654
#define memset(x, y, z)
Definition: compat.h:39
#define STATUS_SUCCESS
Definition: shellext.h:65
uint32_t ULONG_PTR
Definition: typedefs.h:65

Variable Documentation

◆ pNtGetCurrentProcessorNumberEx

FN_NtGetCurrentProcessorNumberEx* pNtGetCurrentProcessorNumberEx

Definition at line 17 of file NtGetCurrentProcessorNumberEx.c.

Referenced by START_TEST().