ReactOS  0.4.12-dev-945-g5a2911d
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

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);\
}
#define TRUE
Definition: types.h:120
#define AcquireXLock(gLock, oldValue, newValue)
Definition: tools.h:185
GLuint res
Definition: glext.h:9613

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; \
}
GLuint res
Definition: glext.h:9613

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); \
}
GLuint res
Definition: glext.h:9613

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);\
}
struct _Entry Entry
Definition: kefuncs.h:640

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);\
}
struct _Entry Entry
Definition: kefuncs.h:640

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")); \
}
unsigned char * PUCHAR
Definition: retypes.h:3
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
smooth NULL
Definition: ftsmooth.c:416
#define b
Definition: ke_i.h:79
const GLubyte * c
Definition: glext.h:8905
#define c
Definition: ke_i.h:80
unsigned int ULONG
Definition: retypes.h:1
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define KdPrint(x)
Definition: env_spec_w32.h:288

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);\
}
#define TRUE
Definition: types.h:120
#define AcquireXLock(gLock, oldValue, newValue)
Definition: tools.h:185

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; \
}
#define a
Definition: ke_i.h:78
Definition: bufpool.h:45
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define d
Definition: ke_i.h:81
const GLubyte * c
Definition: glext.h:8905
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
static const WCHAR L[]
Definition: oid.c:1250
UnicodeString MaximumLength
Definition: rtlfuncs.h:2982
#define c
Definition: ke_i.h:80
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

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;\
}
struct _Entry Entry
Definition: kefuncs.h:640

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)}
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986

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:
{ \
SkinPrintf x ; \
}
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()
long long int64
Definition: platform.h:13
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
DWORD WINAPI DECLSPEC_HOTPATCH SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod)
Definition: fileinfo.c:204
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
878 Scan_1:
879  __asm cmp [word ptr esi+ebx],0
880  __asm je EO_Scan
881  __asm add ebx,2
882  __asm jmp Scan_1
883 EO_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()
int add
Definition: i386-dis.c:3122
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
static void xor(unsigned char *dst, const unsigned char *a, const unsigned char *b, const int count)
Definition: crypt_des.c:251
ecx edi ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx movl TEMP incl eax andl eax ecx incl ebx eax jnz xchgl ecx incl TEMP esi
Definition: synth_sse3d.h:103
uint16_t * PWCHAR
Definition: typedefs.h:54
#define cmp(status, error)
Definition: error.c:114
static calc_node_t * pop(void)
Definition: rpn_ieee.c:90
#define STRING_BUFFER_ALIGN(sz)
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
static PVOID ptr
Definition: dispmode.c:27
#define MyAllocatePool__(type, size)
Definition: mem_tools.h:149
__wchar_t WCHAR
Definition: xmlstorage.h:180
ecx edi ebx edx edi decl ecx esi eax jecxz decl eax andl ebx
Definition: synth_sse3d.h:83
unsigned short USHORT
Definition: pedump.c:61
const WCHAR * word
Definition: lex.c:78
static void push(calc_node_t *op)
Definition: rpn_ieee.c:113
return STATUS_SUCCESS
Definition: btrfs.c:2725
jmp_buf jmp
Definition: mach.c:36

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()
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
smooth NULL
Definition: ftsmooth.c:416
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define IOCTL_UDF_LOCK_VOLUME_BY_PID
Definition: udfpubl.h:42
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
unsigned int ULONG
Definition: retypes.h:1
return STATUS_SUCCESS
Definition: btrfs.c:2725

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 }
struct S2 s2
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
struct S1 s1
GLenum GLsizei len
Definition: glext.h:6722
unsigned int ULONG
Definition: retypes.h:1

◆ 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
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
smooth NULL
Definition: ftsmooth.c:416
#define IOCTL_UDF_LOCK_VOLUME_BY_PID
Definition: udfpubl.h:42
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
unsigned int ULONG
Definition: retypes.h:1

◆ 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 TRUE
Definition: types.h:120
_SEH2_TRY
Definition: create.c:4250
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 a
Definition: ke_i.h:78
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define PCHAR
Definition: match.c:90
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
unsigned char UCHAR
Definition: xmlstorage.h:181
#define PAGE_SIZE
Definition: env_spec_w32.h:49
_SEH2_END
Definition: create.c:4424
unsigned int ULONG
Definition: retypes.h:1
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ 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
76 Scan_1:
77  __asm cmp [word ptr esi+ebx],0
78  __asm je EO_Scan
79  __asm add ebx,2
80  __asm jmp Scan_1
81 EO_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()
signed char * PCHAR
Definition: retypes.h:7
int add
Definition: i386-dis.c:3122
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
static void xor(unsigned char *dst, const unsigned char *a, const unsigned char *b, const int count)
Definition: crypt_des.c:251
ecx edi ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx movl TEMP incl eax andl eax ecx incl ebx eax jnz xchgl ecx incl TEMP esi
Definition: synth_sse3d.h:103
uint16_t * PWCHAR
Definition: typedefs.h:54
#define cmp(status, error)
Definition: error.c:114
static calc_node_t * pop(void)
Definition: rpn_ieee.c:90
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
static PVOID ptr
Definition: dispmode.c:27
__wchar_t WCHAR
Definition: xmlstorage.h:180
ecx edi ebx edx edi decl ecx esi eax jecxz decl eax andl ebx
Definition: synth_sse3d.h:83
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned short USHORT
Definition: pedump.c:61
const WCHAR * word
Definition: lex.c:78
#define STRING_BUFFER_ALIGN(sz)
Definition: string_lib.cpp:25
static void push(calc_node_t *op)
Definition: rpn_ieee.c:113
return STATUS_SUCCESS
Definition: btrfs.c:2725
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
jmp_buf jmp
Definition: mach.c:36

Referenced by _Success_(), _test_key_name(), AddKbLayoutsToRegistry(), AppendUserEnvironmentVariable(), AtapiRegCheckParameterValue(), AVrfpLoadAndInitializeProvider(), BaseInitApphelp(), BuildSubSysCommandLine(), CdRomCheckRegistryForMediaChangeValue(), CmpAddDriverToList(), CmpFindDrivers(), CreateClassDeviceObject(), CreateProcessInternalW(), CsrApiPortInitialize(), CsrpConnectToServer(), CsrSbApiPortInitialize(), DriverEntry(), EngLoadImageEx(), ExpandSymbolicLink(), ExpLoadInitialProcess(), Ext2QueryRegistrySettings(), ExtractFont(), FFSQueryParameters(), FltpOpenFilterServicesKey(), GetComputerNameExW(), InitFunctionPtrs(), InitializeProvider(), InitTestData(), InsertAudioDevice(), IntCreateNewRegistryPath(), IntCreateRegistryPath(), IntGdiLoadFontsFromMemory(), IoOpenDeviceRegistryKey(), IopActionConfigureChildServices(), IopCreateDeviceInstancePath(), IopGetDriverObject(), IopInitializeDriverModule(), IopOpenInterfaceKey(), IopQueryBusDescription(), IopQueryDeviceDescription(), IoQueryDeviceDescription(), IoRegisterDeviceInterface(), KsCacheMedium(), KsCreateBusEnumObject(), KspCreateObjectType(), LdrpInitializeProcess(), LogMessage(), NdisOpenProtocolConfiguration(), OpenRegistryHandlesFromSymbolicLink(), ReadRegistryEntries(), RegOpenUserClassesRoot(), RfsdQueryParameters(), RtlFormatCurrentUserKeyPath(), RtlpGetRegistryHandle(), SdbpMatchExe(), SdbpOpenKey(), SdbUnregisterDatabase(), SearchForLegacyDrivers(), SeiInitPaths(), SmpInvokeAutoChk(), SmpParseCommandLine(), START_TEST(), UDFRegCheckParameterValue(), UserpFormatMessages(), vfatGetFCBForFile(), vfatMakeFullName(), ViCreateDriveLetter(), ViLoadImagesFromRegistry(), W32kDosPathNameToNtPathName(), and WinLdrAddDriverToList().

◆ 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 }
struct S2 s2
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
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
struct S1 s1
unsigned int ULONG
Definition: retypes.h:1

Referenced by _test_key_name(), ApphelpShimCacheCompareRoutine(), CheckForDeviceDesc(), CmpDoCompareKeyName(), CmpFindNameInList(), CmpFindValueByNameFromCache(), CmpIsHiveAlreadyLoaded(), CompareFileName(), CompareTreeKeys(), CSR_API(), DeleteSymbolicLinkNameFromMemory(), Ext2FillEntry(), Ext2ParseRegistryVolumeParams(), Ext2QueryDirectory(), Ext2SearchMcbWithoutLock(), FFSQueryDirectory(), FFSSearchMcb(), FFSv1ScanDir(), FFSv2ScanDir(), FindMatchingCreateItem(), FltpAttachToFileSystemDevice(), FsRtlCompareNodeAndKey(), HalpAssignDrive(), has_nfs_prefix(), InitFunctionPtrs(), IntFindAliasHeader(), IntFindWindow(), IntGetAliasEntry(), IntInsertAliasEntry(), IntInsertAliasHeader(), IopEnumerateDetectedDevices(), IopNotifyPlugPlayNotification(), IsBatteryAlreadyOnList(), KernelModeTest(), LocateAdapterBindingByName(), map_sec_flavor(), MatchFontName(), MiniLocateDevice(), MountMgrCreatePointWorker(), MountMgrMountedDeviceRemoval(), MountMgrNextDriveLetterWorker(), MountMgrNotifyNameChange(), MsfsCreate(), MsfsCreateMailslot(), NdisCompareUnicodeString(), nfs41_SetFileInformation(), NtUserFindExistingCursorIcon(), NtUserFindWindowEx(), RemoveBatteryFromList(), RfsdDirectoryCallback(), RfsdScanDirCallback(), RfsdSearchMcb(), RtlSetEnvironmentVariable(), SmpFindRegistryValue(), SmpSaveRegistryValue(), START_TEST(), Test_KeyNameInformation(), TestFltRegisterFilter(), TestFsRtlAddToTunnelCache(), TestIoCreateFile(), TestIrpHandler(), TestSymlinks(), UDFBuildHashEntry(), UDFCompareFileInfo(), UDFCompareVcb(), UDFFindFile(), UDFIsNameInExpression(), VfatVerify(), 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;
887  st.wMinute = TimeFields->Minute;
888  st.wSecond = TimeFields->Second;
890 
891  return SystemTimeToFileTime(&st, (PFILETIME)Time);
892 } // end RtlTimeFieldsToTime()
WORD wMonth
Definition: winbase.h:871
WORD wDayOfWeek
Definition: winbase.h:872
WORD wYear
Definition: winbase.h:870
WORD wMinute
Definition: winbase.h:875
USHORT Milliseconds
Definition: env_spec_w32.h:717
WORD wSecond
Definition: winbase.h:876
WORD wMilliseconds
Definition: winbase.h:877
WORD wDay
Definition: winbase.h:873
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
Definition: time.c:148
WORD wHour
Definition: winbase.h:874
static PTIME_FIELDS TimeFields
Definition: time.c:104
static PLARGE_INTEGER Time
Definition: time.c:105

Referenced by _Success_(), ConvertSystemTimeToFileTime(), DriverEntry(), FatFatDateToNtTime(), FatFatTimeToNtTime(), FsdDosDateTimeToSystemTime(), MSTASK_ITaskTrigger_SetTrigger(), Phase1InitializationDiscard(), and UDFTimeToNT().

◆ RtlTimeToTimeFields()

BOOLEAN RtlTimeToTimeFields ( IN PLARGE_INTEGER  Time,
IN PTIME_FIELDS  TimeFields 
)

Definition at line 895 of file env_spec_w32.cpp.

899 {
900  SYSTEMTIME st;
901  BOOLEAN retval;
902 
903  retval = FileTimeToSystemTime((PFILETIME)Time, &st);
904 
905  TimeFields->Year = st.wYear;
906  TimeFields->Month = st.wMonth;
908  TimeFields->Day = st.wDay;
909  TimeFields->Hour = st.wHour;
910  TimeFields->Minute = st.wMinute;
911  TimeFields->Second = st.wSecond;
913 
914  return retval;
915 } // end ()
USHORT Weekday
Definition: env_spec_w32.h:718
WORD wMonth
Definition: winbase.h:871
WORD wDayOfWeek
Definition: winbase.h:872
WORD wYear
Definition: winbase.h:870
WORD wMinute
Definition: winbase.h:875
unsigned char BOOLEAN
USHORT Milliseconds
Definition: env_spec_w32.h:717
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:178
WORD wSecond
Definition: winbase.h:876
WORD wMilliseconds
Definition: winbase.h:877
WORD wDay
Definition: winbase.h:873
WORD wHour
Definition: winbase.h:874
static PTIME_FIELDS TimeFields
Definition: time.c:104
static PLARGE_INTEGER Time
Definition: time.c:105

Referenced by _Success_(), CalcVolumeSerialNumber(), DbgP(), EngQueryLocalTime(), FatGetCurrentFatTime(), FsdSystemTimeToDosDateTime(), get_lastbootuptime(), HalQueryRealTimeClock(), KeSetSystemTime(), MsvpCheckLogonHours(), print_error(), print_hexbuf(), PRINT_RECORD(), SetDiskSignature(), and UDFTimeToUDF().

◆ RtlUpcaseUnicodeString()

NTSTATUS RtlUpcaseUnicodeString ( PUNICODE_STRING  dst,
PUNICODE_STRING  src,
BOOLEAN  Alloc 
)

◆ 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()
long long int64
Definition: platform.h:13
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
DWORD WINAPI DECLSPEC_HOTPATCH SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod)
Definition: fileinfo.c:204
#define FILE_BEGIN
Definition: winbase.h:112
unsigned int ULONG
Definition: retypes.h:1
signed int * PLONG
Definition: retypes.h:5

◆ 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);
256  SetEndOfFile(h);
257  offh = 0;
258  SetFilePointer((HANDLE)h, 0, &offh, FILE_BEGIN);
259 } // end set_image_size()
BOOL WINAPI SetEndOfFile(HANDLE hFile)
Definition: fileinfo.c:1154
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
DWORD WINAPI DECLSPEC_HOTPATCH SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod)
Definition: fileinfo.c:204
long LONG
Definition: pedump.c:60
GLenum GLsizei len
Definition: glext.h:6722
#define FILE_BEGIN
Definition: winbase.h:112
unsigned int ULONG
Definition: retypes.h:1

◆ 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
DWORD WINAPI DECLSPEC_HOTPATCH SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod)
Definition: fileinfo.c:204
long LONG
Definition: pedump.c:60
unsigned int ULONG
Definition: retypes.h:1

◆ UDFGetDevType()

ULONG UDFGetDevType ( PDEVICE_OBJECT  DeviceObject)

Referenced by UDFGetBlockSize(), and UDFUseStandard().

◆ 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 }
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
long LONG
Definition: pedump.c:60

Referenced by UDFRename(), and UDFRenameMoveFile__().

◆ UDFPhReadSynchronous()

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

Definition at line 130 of file env_spec.cpp.

138 {
140  LARGE_INTEGER ROffset;
142  PIRP irp;
143  KIRQL CurIrql = KeGetCurrentIrql();
144  PVOID IoBuf = NULL;
145 // ULONG i;
146 #ifdef MEASURE_IO_PERFORMANCE
147  LONGLONG IoEnterTime;
148  LONGLONG IoExitTime;
149  ULONG dt;
150  ULONG dtm;
151 #endif //MEASURE_IO_PERFORMANCE
152 #ifdef _BROWSE_UDF_
153  PVCB Vcb = NULL;
154  if(Flags & PH_VCB_IN_RETLEN) {
155  Vcb = (PVCB)(*ReadBytes);
156  }
157 #endif //_BROWSE_UDF_
158 
159 #ifdef MEASURE_IO_PERFORMANCE
160  KeQuerySystemTime((PLARGE_INTEGER)&IoEnterTime);
161 #endif //MEASURE_IO_PERFORMANCE
162 
163  UDFPrint(("UDFPhRead: Length: %x Lba: %lx\n",Length>>0xb,Offset>>0xb));
164 // UDFPrint(("UDFPhRead: Length: %x Lba: %lx\n",Length>>0x9,Offset>>0x9));
165 
166  ROffset.QuadPart = Offset;
167  (*ReadBytes) = 0;
168 /*
169  // DEBUG !!!
170  Flags |= PH_TMP_BUFFER;
171 */
172  if(Flags & PH_TMP_BUFFER) {
173  IoBuf = Buffer;
174  } else {
175  IoBuf = DbgAllocatePoolWithTag(NonPagedPool, Length, 'bNWD');
176  }
177  if (!IoBuf) {
178  UDFPrint((" !IoBuf\n"));
180  }
182  if (!Context) {
183  UDFPrint((" !Context\n"));
185  }
186  // Create notification event object to be used to signal the request completion.
188 
189  if (CurIrql > PASSIVE_LEVEL) {
191  Length, &ROffset, &(Context->IosbToUse) );
192  if (!irp) {
193  UDFPrint((" !irp Async\n"));
195  }
196  MmPrint((" Alloc async Irp MDL=%x, ctx=%x\n", irp->MdlAddress, Context));
198  Context, TRUE, TRUE, TRUE );
199  } else {
201  Length, &ROffset, &(Context->event), &(Context->IosbToUse) );
202  if (!irp) {
203  UDFPrint((" !irp Sync\n"));
205  }
206  MmPrint((" Alloc Irp MDL=%x, ctx=%x\n", irp->MdlAddress, Context));
207  }
208 
210  RC = IoCallDriver(DeviceObject, irp);
211 
212  if (RC == STATUS_PENDING) {
213  DbgWaitForSingleObject(&(Context->event), NULL);
214  if ((RC = Context->IosbToUse.Status) == STATUS_DATA_OVERRUN) {
215  RC = STATUS_SUCCESS;
216  }
217 // *ReadBytes = Context->IosbToUse.Information;
218  } else {
219 // *ReadBytes = irp->IoStatus.Information;
220  }
221  if(NT_SUCCESS(RC)) {
222  (*ReadBytes) = Context->IosbToUse.Information;
223  }
224  if(!(Flags & PH_TMP_BUFFER)) {
225  RtlCopyMemory(Buffer, IoBuf, *ReadBytes);
226  }
227 
228  if(NT_SUCCESS(RC)) {
229 /*
230  for(i=0; i<(*ReadBytes); i+=2048) {
231  UDFPrint(("IOCRC %8.8x R %x\n", crc32((PUCHAR)Buffer+i, 2048), (ULONG)((Offset+i)/2048) ));
232  }
233 */
234 #ifdef _BROWSE_UDF_
235  if(Vcb) {
236  RC = UDFVRead(Vcb, IoBuf, Length >> Vcb->BlockSizeBits, (ULONG)(Offset >> Vcb->BlockSizeBits), Flags);
237  }
238 #endif //_BROWSE_UDF_
239  }
240 
241 try_exit: NOTHING;
242 
244  if(IoBuf && !(Flags & PH_TMP_BUFFER)) DbgFreePool(IoBuf);
245 
246 #ifdef MEASURE_IO_PERFORMANCE
247  KeQuerySystemTime((PLARGE_INTEGER)&IoExitTime);
248  IoReadTime += (IoExitTime-IoEnterTime);
249  dt = (ULONG)((IoExitTime-IoEnterTime)/10/1000);
250  dtm = (ULONG)(((IoExitTime-IoEnterTime)/10)%1000);
251  PerfPrint(("\nUDFPhReadSynchronous() exit: %08X, after %d.%4.4d msec.\n", RC, dt, dtm));
252 #else
253  UDFPrint(("UDFPhReadSynchronous() exit: %08X\n", RC));
254 #endif //MEASURE_IO_PERFORMANCE
255 
256  return(RC);
257 } // end UDFPhReadSynchronous()
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
OSSTATUS UDFVRead(IN PVCB Vcb, IN void *Buffer, IN uint32 BCount, IN uint32 LBA, IN uint32 Flags)
Definition: remap.cpp:375
#define UDFPrint(Args)
Definition: udffs.h:225
struct _UDF_PH_CALL_CONTEXT * PUDF_PH_CALL_CONTEXT
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define STATUS_DATA_OVERRUN
Definition: udferr_usr.h:152
#define DbgAllocatePoolWithTag(a, b, c)
Definition: env_spec_w32.h:333
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
Definition: irp.c:1069
LONG NTSTATUS
Definition: precomp.h:26
Definition: cdstruc.h:504
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:515
UCHAR KIRQL
Definition: env_spec_w32.h:591
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
NTSTATUS NTAPI UDFAsyncCompletionRoutine(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Contxt)
Definition: env_spec.cpp:40
LONGLONG IoReadTime
Definition: env_spec.cpp:25
smooth NULL
Definition: ftsmooth.c:416
#define SL_OVERRIDE_VERIFY_VOLUME
Definition: iotypes.h:1779
Definition: bufpool.h:45
#define DbgWaitForSingleObject(o, to)
Definition: env_spec_w32.h:479
static NTSTATUS ReadBytes(IN PDEVICE_OBJECT LowerDevice, OUT PUCHAR Buffer, IN ULONG BufferSize, OUT PULONG_PTR FilledBytes)
Definition: detect.c:67
#define DbgFreePool
Definition: env_spec_w32.h:334
#define MyAllocatePool__(type, size)
Definition: mem_tools.h:149
int64_t LONGLONG
Definition: typedefs.h:66
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_PENDING
Definition: ntstatus.h:82
#define try_return(S)
Definition: cdprocs.h:2189
#define Vcb
Definition: cdprocs.h:1425
#define MyFreePool__(addr)
Definition: mem_tools.h:152
PIRP NTAPI IoBuildAsynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PIO_STATUS_BLOCK IoStatusBlock)
Definition: irp.c:750
#define PerfPrint(_x_)
Definition: env_spec_w32.h:291
#define MmPrint(_x_)
Definition: env_spec_w32.h:289
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define NOTHING
Definition: env_spec_w32.h:461
struct _VCB * PVCB
Definition: fatstruc.h:553
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2647
#define PH_VCB_IN_RETLEN
Definition: phys_lib.h:66
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218
#define PH_TMP_BUFFER
Definition: phys_lib.h:65
#define IRP_MJ_READ
Definition: rdpdr.c:46
struct tagContext Context
Definition: acpixf.h:1012
unsigned int ULONG
Definition: retypes.h:1
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
return STATUS_SUCCESS
Definition: btrfs.c:2725
LONGLONG QuadPart
Definition: typedefs.h:112

Referenced by UDFPrepareForReadOperation(), UDFTRead(), and UDFUseStandard().

◆ 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()
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG IoControlCode
Definition: fltkernel.h:1383
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG _In_ ULONG OutputBufferLength
Definition: fltkernel.h:1374
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
CHAR InputBuffer[80]
Definition: conmgr.c:33
smooth NULL
Definition: ftsmooth.c:416
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
int ret
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG InputBufferLength
Definition: fltkernel.h:1372
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
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
unsigned int ULONG
Definition: retypes.h:1

◆ UDFPhWriteSynchronous()

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

Definition at line 276 of file env_spec.cpp.

284 {
286  LARGE_INTEGER ROffset;
288  PIRP irp;
289 // LARGE_INTEGER timeout;
290  KIRQL CurIrql = KeGetCurrentIrql();
291  PVOID IoBuf = NULL;
292 // ULONG i;
293 #ifdef MEASURE_IO_PERFORMANCE
294  LONGLONG IoEnterTime;
295  LONGLONG IoExitTime;
296  ULONG dt;
297  ULONG dtm;
298 #endif //MEASURE_IO_PERFORMANCE
299 #ifdef _BROWSE_UDF_
300  PVCB Vcb = NULL;
301  if(Flags & PH_VCB_IN_RETLEN) {
302  Vcb = (PVCB)(*WrittenBytes);
303  }
304 #endif //_BROWSE_UDF_
305 
306 #ifdef MEASURE_IO_PERFORMANCE
307  KeQuerySystemTime((PLARGE_INTEGER)&IoEnterTime);
308 #endif //MEASURE_IO_PERFORMANCE
309 
310 #if defined UDF_DBG || defined USE_PERF_PRINT
311  ULONG Lba = (ULONG)(Offset>>0xb);
312 // ASSERT(!(Lba & (32-1)));
313  PerfPrint(("UDFPhWrite: Length: %x Lba: %lx\n",Length>>0xb,Lba));
314 // UDFPrint(("UDFPhWrite: Length: %x Lba: %lx\n",Length>>0x9,Offset>>0x9));
315 #endif //DBG
316 
317 #ifdef DBG
318  if(UDF_SIMULATE_WRITES) {
319 /* FIXME ReactOS
320  If this function is to force a read from the bufffer to simulate any segfaults, then it makes sense.
321  Else, this forloop is useless.
322  UCHAR a;
323  for(ULONG i=0; i<Length; i++) {
324  a = ((PUCHAR)Buffer)[i];
325  }
326 */
327  *WrittenBytes = Length;
328  return STATUS_SUCCESS;
329  }
330 #endif //DBG
331 
332  ROffset.QuadPart = Offset;
333  (*WrittenBytes) = 0;
334 
335 /* IoBuf = ExAllocatePool(NonPagedPool, Length);
336  if (!IoBuf) return STATUS_INSUFFICIENT_RESOURCES;
337  RtlCopyMemory(IoBuf, Buffer, Length);*/
338  IoBuf = Buffer;
339 
340 /* if(Flags & PH_TMP_BUFFER) {
341  IoBuf = Buffer;
342  } else {
343  IoBuf = DbgAllocatePool(NonPagedPool, Length);
344  RtlCopyMemory(IoBuf, Buffer, Length);
345  }*/
346 
349  // Create notification event object to be used to signal the request completion.
351 
352  if (CurIrql > PASSIVE_LEVEL) {
354  Length, &ROffset, &(Context->IosbToUse) );
356  MmPrint((" Alloc async Irp MDL=%x, ctx=%x\n", irp->MdlAddress, Context));
358  Context, TRUE, TRUE, TRUE );
359  } else {
361  Length, &ROffset, &(Context->event), &(Context->IosbToUse) );
363  MmPrint((" Alloc Irp MDL=%x\n, ctx=%x", irp->MdlAddress, Context));
364  }
365 
367  RC = IoCallDriver(DeviceObject, irp);
368 /*
369  for(i=0; i<Length; i+=2048) {
370  UDFPrint(("IOCRC %8.8x W %x\n", crc32((PUCHAR)Buffer+i, 2048), (ULONG)((Offset+i)/2048) ));
371  }
372 */
373 #ifdef _BROWSE_UDF_
374  if(Vcb) {
375  UDFVWrite(Vcb, IoBuf, Length >> Vcb->BlockSizeBits, (ULONG)(Offset >> Vcb->BlockSizeBits), Flags);
376  }
377 #endif //_BROWSE_UDF_
378 
379  if (RC == STATUS_PENDING) {
380  DbgWaitForSingleObject(&(Context->event), NULL);
381  if ((RC = Context->IosbToUse.Status) == STATUS_DATA_OVERRUN) {
382  RC = STATUS_SUCCESS;
383  }
384 // *WrittenBytes = Context->IosbToUse.Information;
385  } else {
386 // *WrittenBytes = irp->IoStatus.Information;
387  }
388  if(NT_SUCCESS(RC)) {
389  (*WrittenBytes) = Context->IosbToUse.Information;
390  }
391 
392 try_exit: NOTHING;
393 
395 // if(IoBuf) ExFreePool(IoBuf);
396 // if(IoBuf && !(Flags & PH_TMP_BUFFER)) DbgFreePool(IoBuf);
397  if(!NT_SUCCESS(RC)) {
398  UDFPrint(("WriteError\n"));
399  }
400 
401 #ifdef MEASURE_IO_PERFORMANCE
402  KeQuerySystemTime((PLARGE_INTEGER)&IoExitTime);
403  IoWriteTime += (IoExitTime-IoEnterTime);
404  if (WrittenData > 1024*1024*8) {
405  PerfPrint(("\nUDFPhWriteSynchronous() Relative size=%I64d, time=%I64d.\n", WrittenData, IoRelWriteTime));
407  }
408  WrittenData += Length;
409  IoRelWriteTime += (IoExitTime-IoEnterTime);
410  dt = (ULONG)((IoExitTime-IoEnterTime)/10/1000);
411  dtm = (ULONG)(((IoExitTime-IoEnterTime)/10)%1000);
412  PerfPrint(("\nUDFPhWriteSynchronous() exit: %08X, after %d.%4.4d msec.\n", RC, dt, dtm));
413 #else
414  UDFPrint(("nUDFPhWriteSynchronous() exit: %08X\n", RC));
415 #endif //MEASURE_IO_PERFORMANCE
416 
417  return(RC);
418 } // end UDFPhWriteSynchronous()
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define UDFPrint(Args)
Definition: udffs.h:225
struct _UDF_PH_CALL_CONTEXT * PUDF_PH_CALL_CONTEXT
#define TRUE
Definition: types.h:120
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define STATUS_DATA_OVERRUN
Definition: udferr_usr.h:152
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
Definition: irp.c:1069
LONGLONG IoWriteTime
Definition: env_spec.cpp:26
LONG NTSTATUS
Definition: precomp.h:26
Definition: cdstruc.h:504
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:515
UCHAR KIRQL
Definition: env_spec_w32.h:591
LONGLONG IoRelWriteTime
Definition: env_spec.cpp:28
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
NTSTATUS NTAPI UDFAsyncCompletionRoutine(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Contxt)
Definition: env_spec.cpp:40
smooth NULL
Definition: ftsmooth.c:416
#define SL_OVERRIDE_VERIFY_VOLUME
Definition: iotypes.h:1779
#define DbgWaitForSingleObject(o, to)
Definition: env_spec_w32.h:479
#define MyAllocatePool__(type, size)
Definition: mem_tools.h:149
int64_t LONGLONG
Definition: typedefs.h:66
LONGLONG WrittenData
Definition: env_spec.cpp:27
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_PENDING
Definition: ntstatus.h:82
#define try_return(S)
Definition: cdprocs.h:2189
#define Vcb
Definition: cdprocs.h:1425
#define MyFreePool__(addr)
Definition: mem_tools.h:152
PIRP NTAPI IoBuildAsynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PIO_STATUS_BLOCK IoStatusBlock)
Definition: irp.c:750
#define PerfPrint(_x_)
Definition: env_spec_w32.h:291
#define MmPrint(_x_)
Definition: env_spec_w32.h:289
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define NOTHING
Definition: env_spec_w32.h:461
struct _VCB * PVCB
Definition: fatstruc.h:553
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2647
#define PH_VCB_IN_RETLEN
Definition: phys_lib.h:66
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218
struct tagContext Context
Definition: acpixf.h:1012
unsigned int ULONG
Definition: retypes.h:1
OSSTATUS UDFVWrite(IN PVCB Vcb, IN void *Buffer, IN uint32 BCount, IN uint32 LBA, IN uint32 Flags)
Definition: remap.cpp:225
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
return STATUS_SUCCESS
Definition: btrfs.c:2725
LONGLONG QuadPart
Definition: typedefs.h:112

◆ write()

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

Variable Documentation

◆ LockMode

ULONG LockMode

Definition at line 8 of file env_spec_w32.cpp.

◆ open_as_device

BOOLEAN open_as_device

Definition at line 14 of file env_spec_w32.cpp.

◆ opt_invalidate_volume

BOOLEAN opt_invalidate_volume

Definition at line 9 of file env_spec_w32.cpp.