ReactOS 0.4.15-dev-7931-gfd331f1
env_spec_w32.h File Reference
#include <windows.h>
#include "platform.h"
#include "udferr_usr.h"
#include "assert.h"
Include dependency graph for env_spec_w32.h:

Go to the source code of this file.

Classes

struct  _SKIN_API
 
struct  _UNICODE_STRING
 
struct  _ANSI_STRING
 
struct  _DEVICE_OBJECT
 
struct  _PACKET
 
struct  _FILE_BOTH_DIR_INFORMATION
 
struct  _TIME_FIELDS
 
struct  _FSRTL_COMMON_FCB_HEADER
 
struct  _SECTION_OBJECT_POINTERS
 
struct  _IO_STATUS_BLOCK
 

Macros

#define MAXIMUM_FILENAME_LENGTH   MAX_PATH
 
#define PAGE_SHIFT   12
 
#define PAGE_SIZE   (ULONG)0x1000
 
#define PHYSICAL_ADDRESS   LARGE_INTEGER
 
#define OS_SUCCESS(a)   NT_SUCCESS(a)
 
#define OSSTATUS   NTSTATUS
 
#define ERESEOURCE   ULONG
 
#define PERESEOURCE   PULONG
 
#define KEVENT   ULONG
 
#define PKEVENT   PULONG
 
#define NTSTATUS   LONG
 
#define NT_SUCCESS(x)   ( (NTSTATUS)(x)>=0 )
 
#define PsGetCurrentThread()   GetCurrentThreadId()
 
#define PsGetVersion(a, b, c, d)
 
#define SkinLoad(path)   {;}
 
#define SkinPrintf   printf
 
#define SkinGetCmdLine   GetCommandLineW
 
#define SkinNotify(op, state, ctx)   {;}
 
#define SkinAsk(op, state, ctx, def)   (def)
 
#define UserPrint(x)
 
#define KdPrint(x)   {NOTHING;}
 
#define MmPrint(_x_)   {NOTHING;}
 
#define TmPrint(_x_)   {NOTHING;}
 
#define PerfPrint(_x_)   {NOTHING;}
 
#define AdPrint(_x_)   {NOTHING;}
 
#define ThPrint(_x_)   {NOTHING;}
 
#define ExtPrint(_x_)   {NOTHING;}
 
#define DbgTouch(a)
 
#define ASSERT(_x_)   assert(_x_)
 
#define UDFTouch(a)
 
#define NonPagedPool   0
 
#define PagedPool   1
 
#define NonPagedPoolCacheAligned   4
 
#define KdDump(a, b)
 
#define DbgMoveMemory   RtlMoveMemory
 
#define DbgCompareMemory   RtlCompareMemory
 
#define DbgCopyMemory   RtlCopyMemory
 
#define DbgAllocatePool   ExAllocatePool
 
#define DbgAllocatePoolWithTag(a, b, c)   ExAllocatePool(a,b)
 
#define DbgFreePool   ExFreePool
 
#define ExAllocatePoolWithTag(hernya, size, tag)   GlobalAlloc(GMEM_DISCARDABLE, (size))
 
#define ExAllocatePool(hernya, size)   GlobalAlloc(GMEM_DISCARDABLE, (size))
 
#define ExFreePool(addr)   GlobalFree((PVOID)(addr))
 
#define PtrOffset(BASE, OFFSET)   ((ULONG)((ULONG)(OFFSET) - (ULONG)(BASE)))
 
#define DO_UNLOAD_PENDING   0x00000001
 
#define DO_VERIFY_VOLUME   0x00000002
 
#define DO_BUFFERED_IO   0x00000004
 
#define DO_EXCLUSIVE   0x00000008
 
#define DO_DIRECT_IO   0x00000010
 
#define DO_MAP_IO_BUFFER   0x00000020
 
#define DO_DEVICE_HAS_NAME   0x00000040
 
#define DO_DEVICE_INITIALIZING   0x00000080
 
#define DO_SYSTEM_BOOT_PARTITION   0x00000100
 
#define DO_LONG_TERM_REQUESTS   0x00000200
 
#define DO_NEVER_LAST_DEVICE   0x00000400
 
#define DO_SHUTDOWN_REGISTERED   0x00000800
 
#define INVALID_PACKET   0x01
 
#define UDFInitPacket(x)   STATUS_SUCCESS
 
#define try_return(S)   { S; goto try_exit; }
 
#define NOTHING
 
#define FlagOn(x, f)   ((x) & (f))
 
#define RtlCompareMemory(s1, s2, l)   MyRtlCompareMemory(s1,s2,l)
 
#define KeSetEvent(pEvt, foo, foo2)   {NOTHING;}
 
#define KeInitializeEvent(pEvt, foo, foo2)   {NOTHING;}
 
#define KeWaitForSingleObject(pEvt, foo, a, b, c)   {NOTHING;}
 
#define DbgWaitForSingleObject(o, to)   KeWaitForSingleObject(o, Executive, KernelMode, FALSE, to);
 
#define KeDelayExecutionThread(mode, foo, t)   { Sleep( abs((LONG)(((t)->QuadPart)/10000)) ); }
 
#define UDFBreakPoint()   DbgBreakPoint()
 
#define BrutePoint()   {}
 
#define ValidateFileInfo(fi)   {}
 
#define KeQuerySystemTime(t)   GetSystemTimeAsFileTime((LPFILETIME)(t));
 
#define KeRaiseIrql(irql, oldIrql)
 
#define KeLowerIrql(oldIrql)   {;}
 
#define KeInitializeSpinLock(sl)
 
#define KeAcquireSpinLock(sl, irql)
 
#define ExAcquireResourceExclusiveLite(res, wait)
 
#define ExAcquireResourceSharedLite(res, wait)
 
#define KeReleaseSpinLock(sl, irql)
 
#define ExGetCurrentResourceThread()   0
 
#define ExReleaseResourceForThreadLite(res, thrdID)
 
#define ExDeleteResourceLite(res)
 
#define ExConvertExclusiveToSharedLite(res)   {/* do nothing */}
 
#define UDFAcquireResourceExclusive(Resource, CanWait)    ExAcquireResourceExclusiveLite((Resource),(CanWait))
 
#define UDFAcquireResourceShared(Resource, CanWait)    ExAcquireResourceSharedLite((Resource),(CanWait))
 
#define UDFReleaseResource(Resource)    ExReleaseResourceForThreadLite((Resource), ExGetCurrentResourceThread())
 
#define UDFDeleteResource(Resource)    ExDeleteResourceLite((Resource))
 
#define UDFConvertExclusiveToSharedLite(Resource)    ExConvertExclusiveToSharedLite((Resource))
 
#define UDFInitializeResourceLite(Resource)    ExInitializeResourceLite((Resource))
 
#define UDFAcquireSharedStarveExclusive(Resource, CanWait)    ExAcquireSharedStarveExclusive((Resource),(CanWait))
 
#define UDFAcquireSharedWaitForExclusive(Resource, CanWait)    ExAcquireSharedWaitForExclusive((Resource),(CanWait))
 
#define UDFInterlockedIncrement(addr)    ((*addr)++)
 
#define UDFInterlockedDecrement(addr)    ((*addr)--)
 
#define PASSIVE_LEVEL   0
 
#define LOW_LEVEL   0
 
#define APC_LEVEL   1
 
#define DISPATCH_LEVEL   2
 
#define PROFILE_LEVEL   27
 
#define CLOCK1_LEVEL   28
 
#define CLOCK2_LEVEL   28
 
#define IPI_LEVEL   29
 
#define POWER_LEVEL   30
 
#define HIGH_LEVEL   31
 
#define SYNCH_LEVEL   (IPI_LEVEL-1)
 
#define KeGetCurrentIrql()   PASSIVE_LEVEL
 
#define ExSystemTimeToLocalTime(SysTime, LocTime)   FileTimeToLocalFileTime((PFILETIME)(SysTime), (PFILETIME)(LocTime))
 
#define ExLocalTimeToSystemTime(LocTime, SysTime)   LocalFileTimeToFileTime((PFILETIME)(LocTime), (PFILETIME)(SysTime))
 
#define UDFPhWriteVerifySynchronous   UDFPhWriteSynchronous
 
#define INVALID_HANDLE_VALUE   ((HANDLE)(-1))
 
#define ANSI_DOS_STAR   ('<')
 
#define ANSI_DOS_QM   ('>')
 
#define ANSI_DOS_DOT   ('"')
 
#define DOS_STAR   (L'<')
 
#define DOS_QM   (L'>')
 
#define DOS_DOT   (L'"')
 
#define InitializeListHead(ListHead)
 
#define IsListEmpty(ListHead)    ((ListHead)->Flink == (ListHead))
 
#define RemoveHeadList(ListHead)
 
#define RemoveTailList(ListHead)
 
#define RemoveEntryList(Entry)
 
#define InsertTailList(ListHead, Entry)
 
#define InsertHeadList(ListHead, Entry)
 

Typedefs

typedef ULONG KSPIN_LOCK
 
typedef KSPIN_LOCKPKSPIN_LOCK
 
typedef int(* PSKIN_INIT) (HINSTANCE hInstance, HINSTANCE hPrevInstance, int nCmdShow)
 
typedef int(* PSKIN_PRINTF) (const char *Message,...)
 
typedef PWCHAR(__stdcallPSKIN_GETCMDLINE) (VOID)
 
typedef ULONG(__stdcallPSKIN_MSG) (ULONG MsgId, ULONG MsgSubId, PVOID DataIn, ULONG DataInLen, PVOID DataOut, ULONG DataInOut)
 
typedef struct _SKIN_API SKIN_API
 
typedef struct _SKIN_APIPSKIN_API
 
typedef struct _UNICODE_STRING UNICODE_STRING
 
typedef UNICODE_STRINGPUNICODE_STRING
 
typedef struct _ANSI_STRING ANSI_STRING
 
typedef ANSI_STRINGPANSI_STRING
 
typedef struct _DEVICE_OBJECT DEVICE_OBJECT
 
typedef struct _DEVICE_OBJECTPDEVICE_OBJECT
 
typedef struct _PACKET PACKET
 
typedef struct _PACKETPPACKET
 
typedef struct _FILE_BOTH_DIR_INFORMATION FILE_BOTH_DIR_INFORMATION
 
typedef struct _FILE_BOTH_DIR_INFORMATIONPFILE_BOTH_DIR_INFORMATION
 
typedef UCHAR KIRQL
 
typedef KIRQLPKIRQL
 
typedef ULONG ERESOURCE
 
typedef ERESOURCEPERESOURCE
 
typedef struct _TIME_FIELDS TIME_FIELDS
 
typedef TIME_FIELDSPTIME_FIELDS
 
typedef struct _FSRTL_COMMON_FCB_HEADER FSRTL_COMMON_FCB_HEADER
 
typedef struct _FSRTL_COMMON_FCB_HEADERPFSRTL_COMMON_FCB_HEADER
 
typedef struct _SECTION_OBJECT_POINTERS SECTION_OBJECT_POINTERS
 
typedef SECTION_OBJECT_POINTERSPSECTION_OBJECT_POINTERS
 
typedef struct _IO_STATUS_BLOCK IO_STATUS_BLOCK
 
typedef struct _IO_STATUS_BLOCKPIO_STATUS_BLOCK
 

Functions

VOID PrintDbgConsole (PCHAR DebugMessage,...)
 
ULONG MyRtlCompareMemory (PVOID s1, PVOID s2, ULONG len)
 
ULONG RtlCompareUnicodeString (PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
 
NTSTATUS RtlUpcaseUnicodeString (PUNICODE_STRING dst, PUNICODE_STRING src, BOOLEAN Alloc)
 
NTSTATUS RtlAppendUnicodeToString (IN PUNICODE_STRING Str1, IN PWSTR Str2)
 
NTSTATUS MyInitUnicodeString (IN PUNICODE_STRING Str1, IN PCWSTR Str2)
 
NTSTATUS ExInitializeResourceLite (PULONG res)
 
int __inline UDFInterlockedExchangeAdd (PLONG addr, LONG i)
 
BOOLEAN RtlTimeFieldsToTime (IN PTIME_FIELDS TimeFields, IN PLARGE_INTEGER Time)
 
BOOLEAN RtlTimeToTimeFields (IN PLARGE_INTEGER Time, IN PTIME_FIELDS TimeFields)
 
NTSTATUS UDFPhReadSynchronous (PDEVICE_OBJECT DeviceObject, PVOID Buffer, ULONG Length, LONGLONG Offset, PULONG ReadBytes, ULONG Flags)
 
NTSTATUS UDFPhWriteSynchronous (PDEVICE_OBJECT DeviceObject, PVOID Buffer, ULONG Length, LONGLONG Offset, PULONG WrittenBytes, ULONG Flags)
 
NTSTATUS UDFPhSendIOCTL (IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, OUT PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN OverrideVerify, OUT PVOID Iosb OPTIONAL)
 
VOID set_image_size (HANDLE h, int64 len)
 
ULONG write (HANDLE h, PCHAR buff, ULONG len)
 
HANDLE my_open (struct _UDFVolumeControlBlock *Vcb, PWCHAR fn)
 
void my_exit (int rc)
 
uint64 udf_lseek64 (HANDLE fd, uint64 offset, int whence)
 
int64 get_file_size (HANDLE h)
 
int64 set_file_pointer (HANDLE h, int64 sz)
 
ULONG MyLockVolume (HANDLE h, ULONG *pLockMode)
 
ULONG MyUnlockVolume (HANDLE h, ULONG *pLockMode)
 
ULONG UDFGetDevType (PDEVICE_OBJECT DeviceObject)
 
BOOLEAN ProbeMemory (PVOID MemPtr, ULONG Length, BOOLEAN ForWrite)
 

Variables

ULONG LockMode
 
BOOLEAN open_as_device
 
BOOLEAN opt_invalidate_volume
 

Macro Definition Documentation

◆ AdPrint

#define AdPrint (   _x_)    {NOTHING;}

Definition at line 292 of file env_spec_w32.h.

◆ ANSI_DOS_DOT

#define ANSI_DOS_DOT   ('"')

Definition at line 910 of file env_spec_w32.h.

◆ ANSI_DOS_QM

#define ANSI_DOS_QM   ('>')

Definition at line 909 of file env_spec_w32.h.

◆ ANSI_DOS_STAR

#define ANSI_DOS_STAR   ('<')

Definition at line 908 of file env_spec_w32.h.

◆ APC_LEVEL

#define APC_LEVEL   1

Definition at line 695 of file env_spec_w32.h.

◆ ASSERT

#define ASSERT (   _x_)    assert(_x_)

Definition at line 302 of file env_spec_w32.h.

◆ BrutePoint

#define BrutePoint ( )    {}

Definition at line 504 of file env_spec_w32.h.

◆ CLOCK1_LEVEL

#define CLOCK1_LEVEL   28

Definition at line 699 of file env_spec_w32.h.

◆ CLOCK2_LEVEL

#define CLOCK2_LEVEL   28

Definition at line 700 of file env_spec_w32.h.

◆ DbgAllocatePool

#define DbgAllocatePool   ExAllocatePool

Definition at line 332 of file env_spec_w32.h.

◆ DbgAllocatePoolWithTag

#define DbgAllocatePoolWithTag (   a,
  b,
  c 
)    ExAllocatePool(a,b)

Definition at line 333 of file env_spec_w32.h.

◆ DbgCompareMemory

#define DbgCompareMemory   RtlCompareMemory

Definition at line 330 of file env_spec_w32.h.

◆ DbgCopyMemory

#define DbgCopyMemory   RtlCopyMemory

Definition at line 331 of file env_spec_w32.h.

◆ DbgFreePool

#define DbgFreePool   ExFreePool

Definition at line 334 of file env_spec_w32.h.

◆ DbgMoveMemory

#define DbgMoveMemory   RtlMoveMemory

Definition at line 329 of file env_spec_w32.h.

◆ DbgTouch

#define DbgTouch (   a)

Definition at line 297 of file env_spec_w32.h.

◆ DbgWaitForSingleObject

#define DbgWaitForSingleObject (   o,
  to 
)    KeWaitForSingleObject(o, Executive, KernelMode, FALSE, to);

Definition at line 479 of file env_spec_w32.h.

◆ DISPATCH_LEVEL

#define DISPATCH_LEVEL   2

Definition at line 696 of file env_spec_w32.h.

◆ DO_BUFFERED_IO

#define DO_BUFFERED_IO   0x00000004

Definition at line 394 of file env_spec_w32.h.

◆ DO_DEVICE_HAS_NAME

#define DO_DEVICE_HAS_NAME   0x00000040

Definition at line 398 of file env_spec_w32.h.

◆ DO_DEVICE_INITIALIZING

#define DO_DEVICE_INITIALIZING   0x00000080

Definition at line 399 of file env_spec_w32.h.

◆ DO_DIRECT_IO

#define DO_DIRECT_IO   0x00000010

Definition at line 396 of file env_spec_w32.h.

◆ DO_EXCLUSIVE

#define DO_EXCLUSIVE   0x00000008

Definition at line 395 of file env_spec_w32.h.

◆ DO_LONG_TERM_REQUESTS

#define DO_LONG_TERM_REQUESTS   0x00000200

Definition at line 401 of file env_spec_w32.h.

◆ DO_MAP_IO_BUFFER

#define DO_MAP_IO_BUFFER   0x00000020

Definition at line 397 of file env_spec_w32.h.

◆ DO_NEVER_LAST_DEVICE

#define DO_NEVER_LAST_DEVICE   0x00000400

Definition at line 402 of file env_spec_w32.h.

◆ DO_SHUTDOWN_REGISTERED

#define DO_SHUTDOWN_REGISTERED   0x00000800

Definition at line 403 of file env_spec_w32.h.

◆ DO_SYSTEM_BOOT_PARTITION

#define DO_SYSTEM_BOOT_PARTITION   0x00000100

Definition at line 400 of file env_spec_w32.h.

◆ DO_UNLOAD_PENDING

#define DO_UNLOAD_PENDING   0x00000001

Definition at line 392 of file env_spec_w32.h.

◆ DO_VERIFY_VOLUME

#define DO_VERIFY_VOLUME   0x00000002

Definition at line 393 of file env_spec_w32.h.

◆ DOS_DOT

#define DOS_DOT   (L'"')

Definition at line 914 of file env_spec_w32.h.

◆ DOS_QM

#define DOS_QM   (L'>')

Definition at line 913 of file env_spec_w32.h.

◆ DOS_STAR

#define DOS_STAR   (L'<')

Definition at line 912 of file env_spec_w32.h.

◆ ERESEOURCE

#define ERESEOURCE   ULONG

Definition at line 66 of file env_spec_w32.h.

◆ ExAcquireResourceExclusiveLite

#define ExAcquireResourceExclusiveLite (   res,
  wait 
)
Value:
{ \
ULONG isLocked = TRUE; \
while(isLocked) AcquireXLock(*(res), isLocked, TRUE);\
}
#define TRUE
Definition: types.h:120
#define AcquireXLock(gLock, oldValue, newValue)
Definition: tools.h:185
GLuint res
Definition: glext.h:9613
uint32_t ULONG
Definition: typedefs.h:59

Definition at line 615 of file env_spec_w32.h.

◆ ExAcquireResourceSharedLite

#define ExAcquireResourceSharedLite (   res,
  wait 
)
Value:
{ \
ULONG isLocked = TRUE; \
while(isLocked) AcquireXLock(*(res), isLocked, TRUE);\
}

Definition at line 621 of file env_spec_w32.h.

◆ ExAllocatePool

#define ExAllocatePool (   hernya,
  size 
)    GlobalAlloc(GMEM_DISCARDABLE, (size))

Definition at line 351 of file env_spec_w32.h.

◆ ExAllocatePoolWithTag

#define ExAllocatePoolWithTag (   hernya,
  size,
  tag 
)    GlobalAlloc(GMEM_DISCARDABLE, (size))

Definition at line 350 of file env_spec_w32.h.

◆ ExConvertExclusiveToSharedLite

#define ExConvertExclusiveToSharedLite (   res)    {/* do nothing */}

Definition at line 652 of file env_spec_w32.h.

◆ ExDeleteResourceLite

#define ExDeleteResourceLite (   res)
Value:
{ \
*(res) = 0; \
}

Definition at line 647 of file env_spec_w32.h.

◆ ExFreePool

#define ExFreePool (   addr)    GlobalFree((PVOID)(addr))

Definition at line 352 of file env_spec_w32.h.

◆ ExGetCurrentResourceThread

#define ExGetCurrentResourceThread ( )    0

Definition at line 633 of file env_spec_w32.h.

◆ ExLocalTimeToSystemTime

#define ExLocalTimeToSystemTime (   LocTime,
  SysTime 
)    LocalFileTimeToFileTime((PFILETIME)(LocTime), (PFILETIME)(SysTime))

Definition at line 738 of file env_spec_w32.h.

◆ ExReleaseResourceForThreadLite

#define ExReleaseResourceForThreadLite (   res,
  thrdID 
)
Value:
{ \
ULONG isLocked; \
AcquireXLock(*(res), isLocked, FALSE); \
}
#define FALSE
Definition: types.h:117

Definition at line 635 of file env_spec_w32.h.

◆ ExSystemTimeToLocalTime

#define ExSystemTimeToLocalTime (   SysTime,
  LocTime 
)    FileTimeToLocalFileTime((PFILETIME)(SysTime), (PFILETIME)(LocTime))

Definition at line 729 of file env_spec_w32.h.

◆ ExtPrint

#define ExtPrint (   _x_)    {NOTHING;}

Definition at line 294 of file env_spec_w32.h.

◆ FlagOn

#define FlagOn (   x,
  f 
)    ((x) & (f))

Definition at line 463 of file env_spec_w32.h.

◆ HIGH_LEVEL

#define HIGH_LEVEL   31

Definition at line 703 of file env_spec_w32.h.

◆ InitializeListHead

#define InitializeListHead (   ListHead)
Value:
(\
(ListHead)->Flink = (ListHead)->Blink = (ListHead))

Definition at line 944 of file env_spec_w32.h.

◆ InsertHeadList

#define InsertHeadList (   ListHead,
  Entry 
)
Value:
{\
PLIST_ENTRY _EX_Flink;\
PLIST_ENTRY _EX_ListHead;\
_EX_ListHead = (ListHead);\
_EX_Flink = _EX_ListHead->Flink;\
(Entry)->Flink = _EX_Flink;\
(Entry)->Blink = _EX_ListHead;\
_EX_Flink->Blink = (Entry);\
_EX_ListHead->Flink = (Entry);\
}
base of all file and directory entries
Definition: entries.h:83
Definition: typedefs.h:120
struct _LIST_ENTRY * Blink
Definition: typedefs.h:122
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121

Definition at line 1022 of file env_spec_w32.h.

◆ InsertTailList

#define InsertTailList (   ListHead,
  Entry 
)
Value:
{\
PLIST_ENTRY _EX_Blink;\
PLIST_ENTRY _EX_ListHead;\
_EX_ListHead = (ListHead);\
_EX_Blink = _EX_ListHead->Blink;\
(Entry)->Flink = _EX_ListHead;\
(Entry)->Blink = _EX_Blink;\
_EX_Blink->Flink = (Entry);\
_EX_ListHead->Blink = (Entry);\
}

Definition at line 1003 of file env_spec_w32.h.

◆ INVALID_HANDLE_VALUE

#define INVALID_HANDLE_VALUE   ((HANDLE)(-1))

Definition at line 903 of file env_spec_w32.h.

◆ INVALID_PACKET

#define INVALID_PACKET   0x01

Definition at line 444 of file env_spec_w32.h.

◆ IPI_LEVEL

#define IPI_LEVEL   29

Definition at line 701 of file env_spec_w32.h.

◆ IsListEmpty

#define IsListEmpty (   ListHead)     ((ListHead)->Flink == (ListHead))

Definition at line 954 of file env_spec_w32.h.

◆ KdDump

#define KdDump (   a,
  b 
)
Value:
if((a)!=NULL) { \
ULONG i; \
for(i=0; i<(b); i++) { \
ULONG c; \
c = (ULONG)(*(((PUCHAR)(a))+i)); \
KdPrint(("%2.2x ",c)); \
if ((i & 0x0f) == 0x0f) KdPrint(("\n")); \
} \
KdPrint(("\n")); \
}
#define NULL
Definition: types.h:112
#define KdPrint(x)
Definition: env_spec_w32.h:288
GLdouble n
Definition: glext.h:7729
const GLubyte * c
Definition: glext.h:8905
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
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 c
Definition: ke_i.h:80
#define b
Definition: ke_i.h:79
unsigned char * PUCHAR
Definition: typedefs.h:53

Definition at line 312 of file env_spec_w32.h.

◆ KdPrint

#define KdPrint (   x)    {NOTHING;}

Definition at line 288 of file env_spec_w32.h.

◆ KeAcquireSpinLock

#define KeAcquireSpinLock (   sl,
  irql 
)
Value:
{ \
ULONG isLocked = TRUE; \
while(isLocked) AcquireXLock(*(sl), isLocked, TRUE);\
}

Definition at line 609 of file env_spec_w32.h.

◆ KeDelayExecutionThread

#define KeDelayExecutionThread (   mode,
  foo,
  t 
)    { Sleep( abs((LONG)(((t)->QuadPart)/10000)) ); }

Definition at line 484 of file env_spec_w32.h.

◆ KeGetCurrentIrql

#define KeGetCurrentIrql ( )    PASSIVE_LEVEL

Definition at line 706 of file env_spec_w32.h.

◆ KeInitializeEvent

#define KeInitializeEvent (   pEvt,
  foo,
  foo2 
)    {NOTHING;}

Definition at line 477 of file env_spec_w32.h.

◆ KeInitializeSpinLock

#define KeInitializeSpinLock (   sl)
Value:
{ \
*(sl) = 0; \
}

Definition at line 604 of file env_spec_w32.h.

◆ KeLowerIrql

#define KeLowerIrql (   oldIrql)    {;}

Definition at line 602 of file env_spec_w32.h.

◆ KeQuerySystemTime

#define KeQuerySystemTime (   t)    GetSystemTimeAsFileTime((LPFILETIME)(t));

Definition at line 570 of file env_spec_w32.h.

◆ KeRaiseIrql

#define KeRaiseIrql (   irql,
  oldIrql 
)
Value:
{ \
*oldIrql = 0; \
}

Definition at line 597 of file env_spec_w32.h.

◆ KeReleaseSpinLock

#define KeReleaseSpinLock (   sl,
  irql 
)
Value:
{ \
ULONG isLocked; \
AcquireXLock(*(sl), isLocked, FALSE); \
}

Definition at line 627 of file env_spec_w32.h.

◆ KeSetEvent

#define KeSetEvent (   pEvt,
  foo,
  foo2 
)    {NOTHING;}

Definition at line 476 of file env_spec_w32.h.

◆ KEVENT

Definition at line 69 of file env_spec_w32.h.

◆ KeWaitForSingleObject

#define KeWaitForSingleObject (   pEvt,
  foo,
  a,
  b,
  c 
)    {NOTHING;}

Definition at line 478 of file env_spec_w32.h.

◆ LOW_LEVEL

#define LOW_LEVEL   0

Definition at line 694 of file env_spec_w32.h.

◆ MAXIMUM_FILENAME_LENGTH

#define MAXIMUM_FILENAME_LENGTH   MAX_PATH

Definition at line 41 of file env_spec_w32.h.

◆ MmPrint

#define MmPrint (   _x_)    {NOTHING;}

Definition at line 289 of file env_spec_w32.h.

◆ NonPagedPool

#define NonPagedPool   0

Definition at line 307 of file env_spec_w32.h.

◆ NonPagedPoolCacheAligned

#define NonPagedPoolCacheAligned   4

Definition at line 310 of file env_spec_w32.h.

◆ NOTHING

#define NOTHING

Definition at line 461 of file env_spec_w32.h.

◆ NT_SUCCESS

#define NT_SUCCESS (   x)    ( (NTSTATUS)(x)>=0 )

Definition at line 79 of file env_spec_w32.h.

◆ NTSTATUS

Definition at line 77 of file env_spec_w32.h.

◆ OS_SUCCESS

#define OS_SUCCESS (   a)    NT_SUCCESS(a)

Definition at line 56 of file env_spec_w32.h.

◆ OSSTATUS

#define OSSTATUS   NTSTATUS

Definition at line 57 of file env_spec_w32.h.

◆ PAGE_SHIFT

#define PAGE_SHIFT   12

Definition at line 45 of file env_spec_w32.h.

◆ PAGE_SIZE

#define PAGE_SIZE   (ULONG)0x1000

Definition at line 49 of file env_spec_w32.h.

◆ PagedPool

#define PagedPool   1

Definition at line 308 of file env_spec_w32.h.

◆ PASSIVE_LEVEL

#define PASSIVE_LEVEL   0

Definition at line 693 of file env_spec_w32.h.

◆ PERESEOURCE

#define PERESEOURCE   PULONG

Definition at line 67 of file env_spec_w32.h.

◆ PerfPrint

#define PerfPrint (   _x_)    {NOTHING;}

Definition at line 291 of file env_spec_w32.h.

◆ PHYSICAL_ADDRESS

Definition at line 53 of file env_spec_w32.h.

◆ PKEVENT

Definition at line 70 of file env_spec_w32.h.

◆ POWER_LEVEL

#define POWER_LEVEL   30

Definition at line 702 of file env_spec_w32.h.

◆ PROFILE_LEVEL

#define PROFILE_LEVEL   27

Definition at line 698 of file env_spec_w32.h.

◆ PsGetCurrentThread

#define PsGetCurrentThread ( )    GetCurrentThreadId()

Definition at line 81 of file env_spec_w32.h.

◆ PsGetVersion

#define PsGetVersion (   a,
  b,
  c,
  d 
)
Value:
{ \
OSVERSIONINFO OsVer; \
OsVer.dwOSVersionInfoSize = sizeof(OsVer); \
GetVersionEx(&OsVer); \
if(a) (*(a)) = OsVer.dwMajorVersion; \
if(b) (*(b)) = OsVer.dwMinorVersion; \
if(c) (*(c)) = OsVer.dwBuildNumber; \
if(d) (d)->Buffer = L""; \
if(d) (d)->Length = 0; \
if(d) (d)->MaximumLength = 0; \
}
Definition: bufpool.h:45
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define d
Definition: ke_i.h:81
#define a
Definition: ke_i.h:78
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define L(x)
Definition: ntvdm.h:50
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:237
ULONG dwMajorVersion
Definition: rtltypes.h:238
ULONG dwBuildNumber
Definition: rtltypes.h:240
ULONG dwMinorVersion
Definition: rtltypes.h:239
_In_ WDFDMATRANSACTION _In_ size_t MaximumLength

Definition at line 83 of file env_spec_w32.h.

◆ PtrOffset

#define PtrOffset (   BASE,
  OFFSET 
)    ((ULONG)((ULONG)(OFFSET) - (ULONG)(BASE)))

Definition at line 384 of file env_spec_w32.h.

◆ RemoveEntryList

#define RemoveEntryList (   Entry)
Value:
{\
PLIST_ENTRY _EX_Blink;\
PLIST_ENTRY _EX_Flink;\
_EX_Flink = (Entry)->Flink;\
_EX_Blink = (Entry)->Blink;\
_EX_Blink->Flink = _EX_Flink;\
_EX_Flink->Blink = _EX_Blink;\
}

Definition at line 986 of file env_spec_w32.h.

◆ RemoveHeadList

#define RemoveHeadList (   ListHead)
Value:
(ListHead)->Flink;\
{RemoveEntryList((ListHead)->Flink)}
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986

Definition at line 964 of file env_spec_w32.h.

◆ RemoveTailList

#define RemoveTailList (   ListHead)
Value:
(ListHead)->Blink;\
{RemoveEntryList((ListHead)->Blink)}

Definition at line 975 of file env_spec_w32.h.

◆ RtlCompareMemory

#define RtlCompareMemory (   s1,
  s2,
  l 
)    MyRtlCompareMemory(s1,s2,l)

Definition at line 465 of file env_spec_w32.h.

◆ SkinAsk

#define SkinAsk (   op,
  state,
  ctx,
  def 
)    (def)

Definition at line 178 of file env_spec_w32.h.

◆ SkinGetCmdLine

#define SkinGetCmdLine   GetCommandLineW

Definition at line 176 of file env_spec_w32.h.

◆ SkinLoad

#define SkinLoad (   path)    {;}

Definition at line 158 of file env_spec_w32.h.

◆ SkinNotify

#define SkinNotify (   op,
  state,
  ctx 
)    {;}

Definition at line 177 of file env_spec_w32.h.

◆ SkinPrintf

#define SkinPrintf   printf

Definition at line 173 of file env_spec_w32.h.

◆ SYNCH_LEVEL

#define SYNCH_LEVEL   (IPI_LEVEL-1)

Definition at line 704 of file env_spec_w32.h.

◆ ThPrint

#define ThPrint (   _x_)    {NOTHING;}

Definition at line 293 of file env_spec_w32.h.

◆ TmPrint

#define TmPrint (   _x_)    {NOTHING;}

Definition at line 290 of file env_spec_w32.h.

◆ try_return

#define try_return (   S)    { S; goto try_exit; }

Definition at line 460 of file env_spec_w32.h.

◆ UDFAcquireResourceExclusive

#define UDFAcquireResourceExclusive (   Resource,
  CanWait 
)     ExAcquireResourceExclusiveLite((Resource),(CanWait))

Definition at line 656 of file env_spec_w32.h.

◆ UDFAcquireResourceShared

#define UDFAcquireResourceShared (   Resource,
  CanWait 
)     ExAcquireResourceSharedLite((Resource),(CanWait))

Definition at line 658 of file env_spec_w32.h.

◆ UDFAcquireSharedStarveExclusive

#define UDFAcquireSharedStarveExclusive (   Resource,
  CanWait 
)     ExAcquireSharedStarveExclusive((Resource),(CanWait))

Definition at line 669 of file env_spec_w32.h.

◆ UDFAcquireSharedWaitForExclusive

#define UDFAcquireSharedWaitForExclusive (   Resource,
  CanWait 
)     ExAcquireSharedWaitForExclusive((Resource),(CanWait))

Definition at line 671 of file env_spec_w32.h.

◆ UDFBreakPoint

#define UDFBreakPoint ( )    DbgBreakPoint()

Definition at line 498 of file env_spec_w32.h.

◆ UDFConvertExclusiveToSharedLite

#define UDFConvertExclusiveToSharedLite (   Resource)     ExConvertExclusiveToSharedLite((Resource))

Definition at line 665 of file env_spec_w32.h.

◆ UDFDeleteResource

#define UDFDeleteResource (   Resource)     ExDeleteResourceLite((Resource))

Definition at line 663 of file env_spec_w32.h.

◆ UDFInitializeResourceLite

#define UDFInitializeResourceLite (   Resource)     ExInitializeResourceLite((Resource))

Definition at line 667 of file env_spec_w32.h.

◆ UDFInitPacket

#define UDFInitPacket (   x)    STATUS_SUCCESS

Definition at line 457 of file env_spec_w32.h.

◆ UDFInterlockedDecrement

#define UDFInterlockedDecrement (   addr)     ((*addr)--)

Definition at line 677 of file env_spec_w32.h.

◆ UDFInterlockedIncrement

#define UDFInterlockedIncrement (   addr)     ((*addr)++)

Definition at line 675 of file env_spec_w32.h.

◆ UDFPhWriteVerifySynchronous

#define UDFPhWriteVerifySynchronous   UDFPhWriteSynchronous

Definition at line 796 of file env_spec_w32.h.

◆ UDFReleaseResource

Definition at line 661 of file env_spec_w32.h.

◆ UDFTouch

#define UDFTouch (   a)

Definition at line 303 of file env_spec_w32.h.

◆ UserPrint

#define UserPrint (   x)
Value:
{ \
}
#define SkinPrintf
Definition: env_spec_w32.h:173
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Definition at line 202 of file env_spec_w32.h.

◆ ValidateFileInfo

#define ValidateFileInfo (   fi)    {}

Definition at line 516 of file env_spec_w32.h.

Typedef Documentation

◆ ANSI_STRING

◆ DEVICE_OBJECT

◆ ERESOURCE

typedef ULONG ERESOURCE

Definition at line 594 of file env_spec_w32.h.

◆ FILE_BOTH_DIR_INFORMATION

◆ FSRTL_COMMON_FCB_HEADER

◆ IO_STATUS_BLOCK

◆ KIRQL

typedef UCHAR KIRQL

Definition at line 591 of file env_spec_w32.h.

◆ KSPIN_LOCK

typedef ULONG KSPIN_LOCK

Definition at line 72 of file env_spec_w32.h.

◆ PACKET

◆ PANSI_STRING

Definition at line 380 of file env_spec_w32.h.

◆ PDEVICE_OBJECT

◆ PERESOURCE

Definition at line 595 of file env_spec_w32.h.

◆ PFILE_BOTH_DIR_INFORMATION

◆ PFSRTL_COMMON_FCB_HEADER

◆ PIO_STATUS_BLOCK

Definition at line 34 of file change.c.

◆ PKIRQL

typedef KIRQL* PKIRQL

Definition at line 592 of file env_spec_w32.h.

◆ PKSPIN_LOCK

Definition at line 73 of file env_spec_w32.h.

◆ PPACKET

typedef struct _PACKET * PPACKET

◆ PSECTION_OBJECT_POINTERS

◆ PSKIN_API

◆ PSKIN_GETCMDLINE

typedef PWCHAR(__stdcall * PSKIN_GETCMDLINE) (VOID)

Definition at line 120 of file env_spec_w32.h.

◆ PSKIN_INIT

typedef int(* PSKIN_INIT) (HINSTANCE hInstance, HINSTANCE hPrevInstance, int nCmdShow)

Definition at line 107 of file env_spec_w32.h.

◆ PSKIN_MSG

typedef ULONG(__stdcall * PSKIN_MSG) (ULONG MsgId, ULONG MsgSubId, PVOID DataIn, ULONG DataInLen, PVOID DataOut, ULONG DataInOut)

Definition at line 125 of file env_spec_w32.h.

◆ PSKIN_PRINTF

typedef int(* PSKIN_PRINTF) (const char *Message,...)

Definition at line 114 of file env_spec_w32.h.

◆ PTIME_FIELDS

Definition at line 720 of file env_spec_w32.h.

◆ PUNICODE_STRING

typedef PUNICODE_STRING

Definition at line 373 of file env_spec_w32.h.

◆ SECTION_OBJECT_POINTERS

◆ SKIN_API

◆ TIME_FIELDS

◆ UNICODE_STRING

Function Documentation

◆ ExInitializeResourceLite()

◆ get_file_size()

int64 get_file_size ( HANDLE  h)

Definition at line 262 of file env_spec_w32.cpp.

265{
266 LONG hsz = 0;
267 LONG lsz;
268
269 lsz = SetFilePointer(h, 0, &hsz, FILE_END);
270 return (((int64)hsz) << 32) | lsz;
271} // end get_file_size()
#define SetFilePointer
Definition: compat.h:743
long long int64
Definition: platform.h:13
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
long LONG
Definition: pedump.c:60
#define FILE_END
Definition: winbase.h:114

◆ my_exit()

void my_exit ( int  rc)

Referenced by my_open(), and UDFGetDiskInfo().

◆ my_open()

HANDLE my_open ( struct _UDFVolumeControlBlock Vcb,
PWCHAR  fn 
)

◆ MyInitUnicodeString()

NTSTATUS MyInitUnicodeString ( IN PUNICODE_STRING  Str1,
IN PCWSTR  Str2 
)

Definition at line 863 of file Sys_spec_lib.cpp.

867{
868
869 USHORT i;
870
871#if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
872
873 __asm push ebx
874 __asm push esi
875
876 __asm xor ebx,ebx
877 __asm mov esi,Str2
878Scan_1:
879 __asm cmp [word ptr esi+ebx],0
880 __asm je EO_Scan
881 __asm add ebx,2
882 __asm jmp Scan_1
883EO_Scan:
884 __asm mov i,bx
885
886 __asm pop esi
887 __asm pop ebx
888
889#else // NO X86 optimization, use generic C/C++
890
891 i=0;
892 while(Str2[i]) {
893 i++;
894 }
895 i *= sizeof(WCHAR);
896
897#endif // _X86_
898
899 Str1->MaximumLength = STRING_BUFFER_ALIGN((Str1->Length = i) + sizeof(WCHAR));
900 Str1->Buffer = (PWCHAR)MyAllocatePool__(NonPagedPool, Str1->MaximumLength);
901 if(!Str1->Buffer)
903 RtlCopyMemory(Str1->Buffer, Str2, i);
904 Str1->Buffer[i/sizeof(WCHAR)] = 0;
905 return STATUS_SUCCESS;
906
907} // end MyInitUnicodeString()
#define STRING_BUFFER_ALIGN(sz)
static void xor(unsigned char *dst, const unsigned char *a, const unsigned char *b, const int count)
Definition: crypt_des.c:251
#define NonPagedPool
Definition: env_spec_w32.h:307
const WCHAR * word
Definition: lex.c:36
#define MyAllocatePool__(type, size)
Definition: mem_tools.h:149
static PVOID ptr
Definition: dispmode.c:27
#define cmp(status, error)
Definition: error.c:114
unsigned short USHORT
Definition: pedump.c:61
static calc_node_t * pop(void)
Definition: rpn_ieee.c:90
static void push(calc_node_t *op)
Definition: rpn_ieee.c:113
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl ebx
Definition: synth_sse3d.h:83
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx movl TEMP incl eax andl eax ecx incl ebx testl eax jnz xchgl ecx incl TEMP esi
Definition: synth_sse3d.h:103
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint16_t * PWCHAR
Definition: typedefs.h:56
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by UDFBlankMount(), UDFCommonCreate(), UDFCompleteMount(), and UDFFirstOpenFile().

◆ MyLockVolume()

ULONG MyLockVolume ( HANDLE  h,
ULONG pLockMode 
)

Definition at line 374 of file env_spec_w32.cpp.

378{
379 ULONG RC;
380 ULONG returned;
381
382 (*pLockMode) = -1;
383#ifndef CDRW_W32
385 if(RC) {
386 (*pLockMode) = IOCTL_UDF_LOCK_VOLUME_BY_PID;
387 return STATUS_SUCCESS;
388 }
389#endif //CDRW_W32
390
391 RC = DeviceIoControl(h,FSCTL_LOCK_VOLUME,NULL,0,NULL,0,&returned,NULL);
392 if(RC) {
393 (*pLockMode) = FSCTL_LOCK_VOLUME;
394 return STATUS_SUCCESS;
395 }
396 return STATUS_UNSUCCESSFUL;
397} // MyLockVolume()
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: deviceio.c:136
#define FSCTL_LOCK_VOLUME
Definition: nt_native.h:832
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define IOCTL_UDF_LOCK_VOLUME_BY_PID
Definition: udfpubl.h:42

Referenced by my_open().

◆ MyRtlCompareMemory()

ULONG MyRtlCompareMemory ( PVOID  s1,
PVOID  s2,
ULONG  len 
)

Definition at line 9 of file string_lib.cpp.

14{
15 ULONG i;
16
17 for(i=0; i<len; i++) {
18 if( ((char*)s1)[i] != ((char*)s2)[i] )
19 break;
20 }
21 return i;
22}
GLenum GLsizei len
Definition: glext.h:6722
struct S1 s1
struct S2 s2

◆ MyUnlockVolume()

ULONG MyUnlockVolume ( HANDLE  h,
ULONG pLockMode 
)

Definition at line 401 of file env_spec_w32.cpp.

405{
406 ULONG returned;
407
408#ifndef CDRW_W32
409 if((*pLockMode) == IOCTL_UDF_LOCK_VOLUME_BY_PID) {
411 }
412#endif //CDRW_W32
413
414 return DeviceIoControl(h,FSCTL_UNLOCK_VOLUME,NULL,0,NULL,0,&returned,NULL);
415
416} // MyUnlockVolume()
#define FSCTL_UNLOCK_VOLUME
Definition: nt_native.h:833
#define IOCTL_UDF_UNLOCK_VOLUME_BY_PID
Definition: udfpubl.h:43

◆ PrintDbgConsole()

VOID PrintDbgConsole ( PCHAR  DebugMessage,
  ... 
)

Definition at line 866 of file env_spec_w32.cpp.

870{
871} // end ClassDebugPrint()

◆ ProbeMemory()

BOOLEAN ProbeMemory ( PVOID  MemPtr,
ULONG  Length,
BOOLEAN  ForWrite 
)

Definition at line 1119 of file env_spec_w32.cpp.

1124{
1125 ULONG i;
1126 UCHAR a;
1127 if(!MemPtr && !Length)
1128 return TRUE;
1129 if(!MemPtr || !Length)
1130 return FALSE;
1131 _SEH2_TRY {
1132 a = ((PCHAR)MemPtr)[Length-1];
1133 if(ForWrite) {
1134 ((PCHAR)MemPtr)[Length-1] = a;
1135 }
1136 for(i=0; i<Length; i+=PAGE_SIZE) {
1137 a = ((PCHAR)MemPtr)[i];
1138 if(ForWrite) {
1139 ((PCHAR)MemPtr)[i] = a;
1140 }
1141 }
1143 return FALSE;
1144 } _SEH2_END;
1145 return TRUE;
1146} // end ProbeMemory()
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define PCHAR
Definition: match.c:90
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
unsigned char UCHAR
Definition: xmlstorage.h:181

◆ RtlAppendUnicodeToString()

NTSTATUS RtlAppendUnicodeToString ( IN PUNICODE_STRING  Str1,
IN PWSTR  Str2 
)

Definition at line 62 of file string_lib.cpp.

66{
67 PWCHAR tmp;
68 USHORT i;
69
70#ifdef _X86_
71
72 __asm push ebx
73 __asm push esi
74 __asm xor ebx,ebx
75 __asm mov esi,Str2
76Scan_1:
77 __asm cmp [word ptr esi+ebx],0
78 __asm je EO_Scan
79 __asm add ebx,2
80 __asm jmp Scan_1
81EO_Scan:
82 __asm mov i,bx
83 __asm pop esi
84 __asm pop ebx
85
86#else // NO X86 optimization, use generic C/C++
87
88 i=0;
89 while(Str2[i]) {
90 i++;
91 }
92 i *= sizeof(WCHAR);
93
94#endif // _X86_
95
96 tmp = Str1->Buffer;
97 ASSERT(Str1->MaximumLength);
98 if((Str1->Length+i+sizeof(WCHAR)) > Str1->MaximumLength) {
99 PWCHAR tmp2 = (PWCHAR)ExAllocatePoolWithTag(NonPagedPool, STRING_BUFFER_ALIGN(i + Str1->Length + sizeof(WCHAR))*2, 'ilTS');
100 if(!tmp2)
102 memcpy(tmp2, tmp, Str1->MaximumLength);
103 ExFreePool(tmp);
104 tmp = tmp2;
105 Str1->MaximumLength = STRING_BUFFER_ALIGN(i + sizeof(WCHAR))*2;
106 Str1->Buffer = tmp;
107 }
108 RtlCopyMemory(((PCHAR)tmp)+Str1->Length, Str2, i);
109 i+=Str1->Length;
110 tmp[(i / sizeof(WCHAR))] = 0;
111 Str1->Length = i;
112
113 return STATUS_SUCCESS;
114
115#undef UDF_UNC_STR_TAG
116
117} // end RtlAppendUnicodeToString()
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ASSERT(a)
Definition: mode.c:44
#define STRING_BUFFER_ALIGN(sz)
Definition: string_lib.cpp:25
char * PCHAR
Definition: typedefs.h:51

Referenced by _Success_(), _test_key_name(), AddKbLayoutsToRegistry(), AppendUserEnvironmentVariable(), AtapiRegCheckParameterValue(), AVrfpLoadAndInitializeProvider(), BaseInitApphelp(), BuildLm20LogonProfileBuffer(), BuildSubSysCommandLine(), CmpAddDriverToList(), CreateClassDeviceObject(), CreateProcessInternalW(), CsrApiPortInitialize(), CsrpConnectToServer(), CsrSbApiPortInitialize(), DriverEntry(), EnumerateDevices(), ExpandSymbolicLink(), ExpLoadInitialProcess(), Ext2QueryRegistrySettings(), FltpOpenFilterServicesKey(), GetComputerNameExW(), InitFunctionPtrs(), InitializeProvider(), InitTestData(), InsertAudioDevice(), IntCreateNewRegistryPath(), IntCreateRegistryPath(), IntGdiAddFontResourceEx(), IntGdiLoadFontsFromMemory(), IoOpenDeviceRegistryKey(), IopCreateDeviceInstancePath(), IopGetDriverNames(), IopInitializeBuiltinDriver(), IopOpenInterfaceKey(), IopQueryBusDescription(), IopQueryDeviceDescription(), IopUnloadDriver(), IoQueryDeviceDescription(), IoRegisterDeviceInterface(), KsCacheMedium(), KsCreateBusEnumObject(), KspCreateObjectType(), LDEVOBJ_pLoadDriver(), LdrpInitializeProcess(), LogMessage(), NdisOpenProtocolConfiguration(), NtUserGetKeyboardLayoutName(), PnpRootCreateDevice(), ReadRegistryEntries(), RegOpenUserClassesRoot(), RtlFormatCurrentUserKeyPath(), RtlpGetRegistryHandle(), SdbpMatchExe(), SdbpOpenKey(), SdbUnregisterDatabase(), SearchForLegacyDrivers(), SeiInitPaths(), SmpInvokeAutoChk(), SmpParseCommandLine(), START_TEST(), UDFRegCheckParameterValue(), UserpFormatMessages(), vfatGetFCBForFile(), vfatMakeFullName(), ViCreateDriveLetter(), ViLoadImagesFromRegistry(), W32kDosPathNameToNtPathName(), WinLdrAddDriverToList(), and WinLdrGetNLSNames().

◆ RtlCompareUnicodeString()

ULONG RtlCompareUnicodeString ( PUNICODE_STRING  s1,
PUNICODE_STRING  s2,
BOOLEAN  UpCase 
)

Definition at line 31 of file string_lib.cpp.

36{
37 ULONG i;
38
39 if(s1->Length != s2->Length) return (-1);
40 i = memcmp(s1->Buffer, s2->Buffer, (s1->Length) ? (s1->Length) : (s2->Length));
41 return i;
42}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112

Referenced by _test_key_name(), ApphelpShimCacheCompareRoutine(), CheckForDeviceDesc(), CmpCompareSubkeys(), CmpDoCompareKeyName(), CmpFindNameInList(), CmpFindValueByNameFromCache(), CmpIsHiveAlreadyLoaded(), CmpValidateLexicalOrder(), CompareFileName(), CNtObjectFolder::CompareIDs(), CompareTreeKeys(), DeleteSymbolicLinkNameFromMemory(), Ext2FillEntry(), Ext2ParseRegistryVolumeParams(), Ext2QueryDirectory(), Ext2SearchMcbWithoutLock(), FindMatchingCreateItem(), FltpAttachToFileSystemDevice(), FsRtlCompareNodeAndKey(), FxVerifyAllocateDebugInfo(), has_nfs_prefix(), InitFunctionPtrs(), IntFindAliasHeader(), IntFindWindow(), IntGetAliasEntry(), IntInsertAliasEntry(), IntInsertAliasHeader(), IopMapDetectedDeviceId(), IopMapPeripheralId(), IsBatteryAlreadyOnList(), KernelModeTest(), LocateAdapterBindingByName(), map_sec_flavor(), MatchFontName(), MiniLocateDevice(), MountMgrMountedDeviceRemoval(), MountMgrNextDriveLetterWorker(), MountMgrNotifyNameChange(), MsfsCreate(), MsfsCreateMailslot(), NdisCompareUnicodeString(), nfs41_SetFileInformation(), NtUserFindExistingCursorIcon(), NtUserFindWindowEx(), RemoveBatteryFromList(), RtlGetNtProductType(), RtlSetEnvironmentVariable(), SmpFindRegistryValue(), SmpSaveRegistryValue(), START_TEST(), Test_KeyNameInformation(), TestFltRegisterFilter(), TestFsRtlAddToTunnelCache(), TestIoCreateFile(), TestIrpHandler(), TestSymlinks(), UDFBuildHashEntry(), UDFCompareFileInfo(), UDFCompareVcb(), UDFFindFile(), UDFIsNameInExpression(), VfatVerify(), WinLdrLoadNLSData(), and wmain().

◆ RtlTimeFieldsToTime()

BOOLEAN RtlTimeFieldsToTime ( IN PTIME_FIELDS  TimeFields,
IN PLARGE_INTEGER  Time 
)

Definition at line 875 of file env_spec_w32.cpp.

879{
880 SYSTEMTIME st;
881
882 st.wYear = TimeFields->Year;
883 st.wMonth = TimeFields->Month;
884 st.wDayOfWeek = 0;
885 st.wDay = TimeFields->Day;
886 st.wHour = TimeFields->Hour;
890
891 return SystemTimeToFileTime(&st, (PFILETIME)Time);
892} // end RtlTimeFieldsToTime()
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
Definition: time.c:158
static PLARGE_INTEGER Time
Definition: time.c:105
static PTIME_FIELDS TimeFields
Definition: time.c:104
WORD wYear
Definition: winbase.h:905
WORD wMilliseconds
Definition: winbase.h:912
WORD wMonth
Definition: winbase.h:906
WORD wHour
Definition: winbase.h:909
WORD wSecond
Definition: winbase.h:911
WORD wMinute
Definition: winbase.h:910
WORD wDay
Definition: winbase.h:908
WORD wDayOfWeek
Definition: winbase.h:907
USHORT Milliseconds
Definition: env_spec_w32.h:717

Referenced by _Success_(), ConvertSystemTimeToFileTime(), DosDateTimeToFileTime(), DriverEntry(), ExpSetTimeZoneInformation(), FatFatDateToNtTime(), FatFatTimeToNtTime(), FsdDosDateTimeToSystemTime(), MSTASK_ITaskTrigger_SetTrigger(), Phase1InitializationDiscard(), RtlCutoverTimeToSystemTime(), SetLocalTime(), SetSystemTime(), SystemTimeToFileTime(), and UDFTimeToNT().

◆ RtlTimeToTimeFields()

◆ RtlUpcaseUnicodeString()

◆ set_file_pointer()

int64 set_file_pointer ( HANDLE  h,
int64  sz 
)

Definition at line 274 of file env_spec_w32.cpp.

278{
279 ULONG hsz = (ULONG)(sz >> 32);
280 ULONG lsz = (ULONG)sz;
281
282 lsz = SetFilePointer(h, lsz, (PLONG)&hsz, FILE_BEGIN);
283 return (((int64)hsz) << 32) | lsz;
284} // end set_file_pointer()
#define FILE_BEGIN
Definition: compat.h:761
int32_t * PLONG
Definition: typedefs.h:58

◆ set_image_size()

VOID set_image_size ( HANDLE  h,
int64  len 
)

Definition at line 247 of file env_spec_w32.cpp.

251{
252 LONG offh = (ULONG)(len >> 32);
253 //( (LONGLONG)LBA >> (32-Vcb->BlockSizeBits) );
254
255 SetFilePointer((HANDLE)h, (ULONG)(len /*(LBA << Vcb->BlockSizeBits)*/ ), &offh, FILE_BEGIN);
257 offh = 0;
258 SetFilePointer((HANDLE)h, 0, &offh, FILE_BEGIN);
259} // end set_image_size()
BOOL WINAPI SetEndOfFile(HANDLE hFile)
Definition: fileinfo.c:1004

◆ udf_lseek64()

uint64 udf_lseek64 ( HANDLE  fd,
uint64  offset,
int  whence 
)

Definition at line 759 of file env_spec_w32.cpp.

763{
764 LONG offh = (ULONG)(offset>>32);
765 LONG offl;
766 offl = SetFilePointer(fd, (ULONG)offset, &offh, whence);
767 if(offl == -1 && offh == -1) {
768 return -1;
769 }
770 return (((uint64)offh) << 32) | (uint64)offl;
771} // end udf_lseek64()
unsigned long long uint64
Definition: platform.h:18
GLintptr offset
Definition: glext.h:5920
static int fd
Definition: io.c:51

◆ UDFGetDevType()

ULONG UDFGetDevType ( PDEVICE_OBJECT  DeviceObject)

◆ UDFInterlockedExchangeAdd()

int __inline UDFInterlockedExchangeAdd ( PLONG  addr,
LONG  i 
)

Definition at line 681 of file env_spec_w32.h.

681 {
682 LONG Old = (*addr);
683 (*addr) += i;
684 return Old;
685}

◆ UDFPhReadSynchronous()

NTSTATUS UDFPhReadSynchronous ( PDEVICE_OBJECT  DeviceObject,
PVOID  Buffer,
ULONG  Length,
LONGLONG  Offset,
PULONG  ReadBytes,
ULONG  Flags 
)

Definition at line 106 of file env_spec_w32.cpp.

114{
115
116#if !defined(LIBUDF) && !defined(LIBUDFFMT)
117
118 NTSTATUS RC;
119// UDFPrint(("UDFPhRead: Length: %x Lba: %lx\n",Length>>0xb,Offset>>0xb));
120 LONG HiOffs = (ULONG)(Offset >> 32);
121
123 if(RC == INVALID_SET_FILE_POINTER) {
124 if(GetLastError() != NO_ERROR) {
125 UDFPrint(("UDFPhReadSynchronous: error %x\n", GetLastError()));
126 return STATUS_END_OF_FILE;
127 }
128 }
130 if(NT_SUCCESS(RC) &&
131 (!(*ReadBytes))) {
132 RC = GetLastError();
133 return STATUS_END_OF_FILE;
134 }
135 return STATUS_SUCCESS;
136
137#else // LIBUDF
138
139 return _lphUdf->lpReadFunc(_lphUdf->lpParameter,
140 Buffer,
141 Length,
142 Offset,
143 ReadBytes);
144
145#endif //defined LIBUDF || defined LIBUDFFMT
146
147} // end UDFPhReadSynchronous()
LONG NTSTATUS
Definition: precomp.h:26
#define NO_ERROR
Definition: dderror.h:5
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define INVALID_SET_FILE_POINTER
Definition: compat.h:732
#define ReadFile(a, b, c, d, e)
Definition: compat.h:742
static NTSTATUS ReadBytes(IN PDEVICE_OBJECT LowerDevice, OUT PUCHAR Buffer, IN ULONG BufferSize, OUT PULONG_PTR FilledBytes)
Definition: detect.c:67
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
#define STATUS_END_OF_FILE
Definition: shellext.h:67
#define UDFPrint(Args)
Definition: udffs.h:223
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

◆ UDFPhSendIOCTL()

NTSTATUS UDFPhSendIOCTL ( IN ULONG  IoControlCode,
IN PDEVICE_OBJECT  DeviceObject,
IN PVOID  InputBuffer,
IN ULONG  InputBufferLength,
OUT PVOID  OutputBuffer,
IN ULONG  OutputBufferLength,
IN BOOLEAN  OverrideVerify,
OUT PVOID Iosb  OPTIONAL 
)

Definition at line 66 of file env_spec_w32.cpp.

76{
77 ULONG real_read;
78#if !defined(LIBUDF) && !defined(LIBUDFFMT)
79 ULONG ret;
80
84 &real_read,NULL);
85
86 if (!RC) {
87 ret = GetLastError();
88 }
89 return RC ? 1 : -1;
90
91#else // LIBUDF
92
93 ULONG RC = _lphUdf->lpIOCtlFunc(_lphUdf->lpParameter,IoControlCode,
96 &real_read);
97
98 return RC;
99
100#endif // LIBUDF
101
102} // end UDFPhSendIOCTL()
int ret
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
Definition: wdfio.h:325
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:320
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
Definition: wdfio.h:322
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:953

◆ UDFPhWriteSynchronous()

NTSTATUS UDFPhWriteSynchronous ( PDEVICE_OBJECT  DeviceObject,
PVOID  Buffer,
ULONG  Length,
LONGLONG  Offset,
PULONG  WrittenBytes,
ULONG  Flags 
)

Definition at line 151 of file env_spec_w32.cpp.

159{
160#if !defined(LIBUDF) && !defined(LIBUDFFMT)
161
163 LONG HiOffs = (ULONG)(Offset >> 32);
164 PVOID Buffer2 = NULL;
165 PVOID Buffer3 = NULL;
166
168 if(RC == INVALID_SET_FILE_POINTER) {
169 if(GetLastError() != NO_ERROR) {
170 UDFPrint(("UDFPhWriteSynchronous: error %x\n", GetLastError()));
171 return STATUS_END_OF_FILE;
172 }
173 }
174
175 Buffer2 = ExAllocatePool(NonPagedPool, Length+0x10000);
176 Buffer3 = (PVOID)( ((ULONG)Buffer2 + 0xffff) & ~0xffff);
177 RtlCopyMemory(Buffer3, Buffer, Length);
178
179 RC = WriteFile(DeviceObject->h,Buffer3,Length,WrittenBytes,NULL);
180 if(!RC ||
181 !(*WrittenBytes)) {
182 RC = GetLastError();
183 UDFPrint(("UDFPhWriteSynchronous: EOF, error %x\n", RC));
185 } else {
186 RC = STATUS_SUCCESS;
187 }
188
189 if(Buffer2) ExFreePool(Buffer2);
190
191 return RC;
192
193#else // LIBUDF
194
195 return _lphUdf->lpWriteFunc(_lphUdf->lpParameter,
196 Buffer,
197 Length,
198 Offset,
199 WrittenBytes);
200
201#endif // LIBUDF
202
203} // end UDFPhWriteSynchronous()
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
void * PVOID
Definition: typedefs.h:50

◆ write()

ULONG write ( HANDLE  h,
PCHAR  buff,
ULONG  len 
)

Variable Documentation

◆ LockMode

ULONG LockMode
extern

Definition at line 8 of file env_spec_w32.cpp.

◆ open_as_device

BOOLEAN open_as_device
extern

Definition at line 14 of file env_spec_w32.cpp.

◆ opt_invalidate_volume

BOOLEAN opt_invalidate_volume
extern

Definition at line 9 of file env_spec_w32.cpp.