ReactOS 0.4.16-dev-334-g4d9f67c
CrossNt.h File Reference
#include <ntddk.h>
#include <stddef.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include "ntddk_ex.h"
#include "tools.h"
#include "rwlock.h"
#include "misc.h"
#include "CrNtDecl.h"
#include "CrNtStubs.h"
Include dependency graph for CrossNt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DECL_FUNC_PTR(_type, _cconv, _name)   _type (_cconv * _name)
 
#define WinVer_Is351   (MajorVersion==0x03)
 
#define WinVer_IsNT   (MajorVersion==0x04)
 
#define WinVer_Is2k   (MajorVersion==0x05 && MinorVersion==0x00)
 
#define WinVer_IsXP   (MajorVersion==0x05 && MinorVersion==0x01)
 
#define WinVer_IsXPp   (MajorVersion==0x05 && MinorVersion>=0x01)
 
#define WinVer_IsdNET   (MajorVersion==0x05 && MinorVersion==0x02)
 
#define WinVer_IsdNETp   ((MajorVersion==0x05 && MinorVersion>=0x02) || (MajorVersion>0x05))
 
#define WinVer_IsVista   (MajorVersion==0x06 && MinorVersion==0x00)
 
#define WinVer_Id()   ((MajorVersion << 8) | MinorVersion)
 
#define WinVer_351   (0x0351)
 
#define WinVer_NT   (0x0400)
 
#define WinVer_ROS   (0x0401)
 
#define WinVer_2k   (0x0500)
 
#define WinVer_XP   (0x0501)
 
#define WinVer_dNET   (0x0502)
 
#define WinVer_Vista   (0x0600)
 
#define CROSSNT_DECL_API
 

Typedefs

typedef PULONG MinorVersion OPTIONAL
 
typedef OUT PVOID SystemInfoBuffer
 
typedef OUT PVOID IN ULONG SystemInfoBufferSize
 

Functions

NTSTATUS NTAPI CrNtInit (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 
PVOID NTAPI CrNtGetModuleBase (IN PCHAR pModuleName)
 
PVOID NTAPI CrNtFindModuleBaseByPtr (IN PVOID ptrInSection, IN PCHAR ptrExportedName)
 
PVOID NTAPI CrNtGetProcAddress (PVOID ModuleBase, PCHAR pFunctionName)
 
typedef DECL_FUNC_PTR (BOOLEAN, __stdcall, ptrCrNtPsGetVersion)(PULONG MajorVersion OPTIONAL
 
typedef DECL_FUNC_PTR (NTSTATUS, __stdcall, ptrCrNtNtQuerySystemInformation)(IN SYSTEM_INFORMATION_CLASS SystemInfoClass
 

Variables

ptrCrNtPsGetVersion CrNtPsGetVersion
 
ptrCrNtNtQuerySystemInformation CrNtNtQuerySystemInformation
 
ULONG MajorVersion
 
ULONG MinorVersion
 
ULONG BuildNumber
 
ULONG SPVersion
 
HANDLE g_hNtosKrnl
 
HANDLE g_hHal
 

Macro Definition Documentation

◆ CROSSNT_DECL_API

#define CROSSNT_DECL_API

Definition at line 141 of file CrossNt.h.

◆ DECL_FUNC_PTR

#define DECL_FUNC_PTR (   _type,
  _cconv,
  _name 
)    _type (_cconv * _name)

Definition at line 63 of file CrossNt.h.

◆ WinVer_2k

#define WinVer_2k   (0x0500)

Definition at line 113 of file CrossNt.h.

◆ WinVer_351

#define WinVer_351   (0x0351)

Definition at line 110 of file CrossNt.h.

◆ WinVer_dNET

#define WinVer_dNET   (0x0502)

Definition at line 115 of file CrossNt.h.

◆ WinVer_Id

#define WinVer_Id ( )    ((MajorVersion << 8) | MinorVersion)

Definition at line 108 of file CrossNt.h.

◆ WinVer_Is2k

#define WinVer_Is2k   (MajorVersion==0x05 && MinorVersion==0x00)

Definition at line 101 of file CrossNt.h.

◆ WinVer_Is351

#define WinVer_Is351   (MajorVersion==0x03)

Definition at line 99 of file CrossNt.h.

◆ WinVer_IsdNET

#define WinVer_IsdNET   (MajorVersion==0x05 && MinorVersion==0x02)

Definition at line 104 of file CrossNt.h.

◆ WinVer_IsdNETp

#define WinVer_IsdNETp   ((MajorVersion==0x05 && MinorVersion>=0x02) || (MajorVersion>0x05))

Definition at line 105 of file CrossNt.h.

◆ WinVer_IsNT

#define WinVer_IsNT   (MajorVersion==0x04)

Definition at line 100 of file CrossNt.h.

◆ WinVer_IsVista

#define WinVer_IsVista   (MajorVersion==0x06 && MinorVersion==0x00)

Definition at line 106 of file CrossNt.h.

◆ WinVer_IsXP

#define WinVer_IsXP   (MajorVersion==0x05 && MinorVersion==0x01)

Definition at line 102 of file CrossNt.h.

◆ WinVer_IsXPp

#define WinVer_IsXPp   (MajorVersion==0x05 && MinorVersion>=0x01)

Definition at line 103 of file CrossNt.h.

◆ WinVer_NT

#define WinVer_NT   (0x0400)

Definition at line 111 of file CrossNt.h.

◆ WinVer_ROS

#define WinVer_ROS   (0x0401)

Definition at line 112 of file CrossNt.h.

◆ WinVer_Vista

#define WinVer_Vista   (0x0600)

Definition at line 116 of file CrossNt.h.

◆ WinVer_XP

#define WinVer_XP   (0x0501)

Definition at line 114 of file CrossNt.h.

Typedef Documentation

◆ OPTIONAL

Definition at line 68 of file CrossNt.h.

◆ SystemInfoBuffer

Definition at line 78 of file CrossNt.h.

◆ SystemInfoBufferSize

Definition at line 79 of file CrossNt.h.

Function Documentation

◆ CrNtFindModuleBaseByPtr()

PVOID NTAPI CrNtFindModuleBaseByPtr ( IN PVOID  ptrInSection,
IN PCHAR  ptrExportedName 
)

◆ CrNtGetModuleBase()

PVOID NTAPI CrNtGetModuleBase ( IN PCHAR  pModuleName)

◆ CrNtGetProcAddress()

PVOID NTAPI CrNtGetProcAddress ( PVOID  ModuleBase,
PCHAR  pFunctionName 
)

◆ CrNtInit()

NTSTATUS NTAPI CrNtInit ( IN PDRIVER_OBJECT  DriverObject,
IN PUNICODE_STRING  RegistryPath 
)

◆ DECL_FUNC_PTR() [1/2]

typedef DECL_FUNC_PTR ( BOOLEAN  ,
__stdcall  ,
ptrCrNtPsGetVersion   
)

◆ DECL_FUNC_PTR() [2/2]

typedef DECL_FUNC_PTR ( NTSTATUS  ,
__stdcall  ,
ptrCrNtNtQuerySystemInformation   
)

Variable Documentation

◆ BuildNumber

ULONG BuildNumber
extern

Definition at line 6 of file ros_glue.cpp.

◆ CrNtNtQuerySystemInformation

ptrCrNtNtQuerySystemInformation CrNtNtQuerySystemInformation

Definition at line 84 of file CrossNt.h.

◆ CrNtPsGetVersion

ptrCrNtPsGetVersion CrNtPsGetVersion

Definition at line 74 of file CrossNt.h.

◆ g_hHal

HANDLE g_hHal
extern

◆ g_hNtosKrnl

HANDLE g_hNtosKrnl
extern

◆ MajorVersion

ULONG MajorVersion
extern

Definition at line 4 of file ros_glue.cpp.

◆ MinorVersion

ULONG MinorVersion
extern

Definition at line 5 of file ros_glue.cpp.

◆ SPVersion

ULONG SPVersion
extern