ReactOS 0.4.15-dev-7677-g8209aa5
env_spec_nt.h
Go to the documentation of this file.
1
2// Copyright (C) Alexander Telyatnikov, Ivan Keliukh, Yegor Anchishkin, SKIF Software, 1999-2013. Kiev, Ukraine
3// All rights reserved
4// This file was released under the GPLv2 on June 2015.
6
7#ifndef __ENV_SPEC_NT_NATIVE__H__
8#define __ENV_SPEC_NT_NATIVE__H__
9
10#ifdef NT_NATIVE_MODE
11
12#include "zw_2_nt.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif //__cplusplus
17
18#ifndef MAX_PATH
19#define MAX_PATH 260
20#endif //MAX_PATH
21
23GetOsVersion(
27 PUNICODE_STRING CSDVersion OPTIONAL
28 );
29
30#define PsGetVersion(a,b,c,d) GetOsVersion(a,b,c,d)
31
32#define InterlockedIncrement(addr) \
33 ((*addr)++)
34#define InterlockedDecrement(addr) \
35 ((*addr)--)
36int
37__inline
39 LONG Old = (*addr);
40 (*addr) += i;
41 return Old;
42}
43
44#define DeviceIoControl(h, ctlc, ib, is, ob, os, r, ov) MyDeviceIoControl(h, ctlc, ib, is, ob, os, r, ov)
45
47MyDeviceIoControl(
48 HANDLE hDevice,
50 PVOID lpInBuffer,
51 DWORD nInBufferSize,
52 PVOID lpOutBuffer,
53 DWORD nOutBufferSize,
56 );
57
58#define OemToCharW(ansi_s, uni_s) (swprintf(uni_s, L"%S", ansi_s))
59#define MultiByteToWideChar(cp, f, ansi_s, a_sz, uni_s, u_sz) (swprintf(uni_s, L"%S", ansi_s))
60
61VOID
62Sleep(
63 ULONG t
64 );
65
66#define GlobalAlloc(foo, size) MyGlobalAlloc( size );
67#define GlobalFree(ptr) MyGlobalFree( ptr );
68
69extern "C"
70PVOID MyGlobalAlloc(ULONG Size);
71
72extern "C"
73VOID MyGlobalFree(PVOID Addr);
74
75#define ExitProcess(Status) NtTerminateProcess( NtCurrentProcess(), Status );
76
77extern "C"
78VOID
80 PCHAR DebugMessage,
81 ...
82 );
83
84extern "C"
86EnvFileOpenW(
88 HANDLE* ph
89 );
90
91extern "C"
93EnvFileOpenA(
94 PCHAR Name,
95 HANDLE* ph
96 );
97
98extern "C"
100EnvFileClose(
102 );
103
104extern "C"
106EnvFileGetSizeByHandle(
108 PLONGLONG lpFileSize
109 );
110
111extern "C"
113EnvFileGetSizeA(
114 PCHAR Name,
115 PLONGLONG lpFileSize
116 );
117
118extern "C"
120EnvFileGetSizeW(
121 PWCHAR Name,
122 PLONGLONG lpFileSize
123 );
124
125extern "C"
127EnvFileExistsA(PCHAR Name);
128
129extern "C"
131EnvFileExistsW(PWCHAR Name);
132
133extern "C"
135EnvFileWrite(
136 HANDLE h,
137 PVOID ioBuffer,
140 );
141
142extern "C"
144EnvFileRead(
145 HANDLE h,
146 PVOID ioBuffer,
148 PULONG bytesRead
149 );
150
151#define ENV_FILE_CURRENT 1
152#define ENV_FILE_END 2
153#define ENV_FILE_BEGIN 3
154
155extern "C"
157EnvFileSetPointer(
159 LONGLONG lDistanceToMove,
160 LONGLONG* lResultPointer,
161 DWORD dwMoveMethod
162 );
163
164extern "C"
166EnvFileDeleteW(
167 PWCHAR fName
168 );
169
170#define PrintDbgConsole PrintNtConsole
171
172#ifdef __cplusplus
173};
174#endif //__cplusplus
175
176#endif //NT_NATIVE_MODE
177
178#endif //__ENV_SPEC_NT_NATIVE__H__
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
ULONG BuildNumber
Definition: ros_glue.cpp:6
ULONG MajorVersion
Definition: ros_glue.cpp:4
ULONG MinorVersion
Definition: ros_glue.cpp:5
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble GLdouble t
Definition: gl.h:2047
GLenum GLsizei GLuint GLint * bytesWritten
Definition: glext.h:11123
GLenum const GLvoid * addr
Definition: glext.h:9621
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define InterlockedExchangeAdd
Definition: interlocked.h:181
_In_ HANDLE hFile
Definition: mswsock.h:90
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED lpOverlapped
Definition: mswsock.h:93
__GNU_EXTENSION typedef __int64 * PLONGLONG
Definition: ntbasedef.h:382
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
long LONG
Definition: pedump.c:60
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
uint32_t * PULONG
Definition: typedefs.h:59
int64_t LONGLONG
Definition: typedefs.h:68
int32_t * PLONG
Definition: typedefs.h:58
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
#define PrintNtConsole(x)
Definition: atapi.h:1629
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_In_ DWORD _In_ DWORD _In_ DWORD _Out_ LPDWORD lpBytesReturned
Definition: winddi.h:1705
_In_ DWORD dwIoControlCode
Definition: winddi.h:1700