/* Generated by Frontc */ #line 16 "C:/Program Files/Microsoft Visual Studio/VC98/include/excpt.h" #pragma once #line 32 #pragma pack(push, 8) #line 72 typedef enum _EXCEPTION_DISPOSITION { ExceptionContinueExecution, ExceptionContinueSearch, ExceptionNestedException, ExceptionCollidedUnwind } EXCEPTION_DISPOSITION ; #line 89 struct _EXCEPTION_RECORD ; #line 90 struct _CONTEXT ; EXCEPTION_DISPOSITION __cdecl _except_handler(struct _EXCEPTION_RECORD * ExceptionRecord , void * EstablisherFrame , struct _CONTEXT * ContextRecord , void * DispatcherContext ) ; #line 133 unsigned long __cdecl _exception_code(void ) ; void * __cdecl _exception_info(void ) ; int __cdecl _abnormal_termination(void ) ; #line 155 #pragma pack(pop) #line 25 "C:/NTDDK/inc/ntdef.h" #pragma once #line 15 "C:/Program Files/Microsoft Visual Studio/VC98/include/ctype.h" #pragma once #line 60 typedef unsigned short wchar_t ; #line 66 typedef wchar_t wint_t ; #line 67 typedef wchar_t wctype_t ; #line 106 int __cdecl _isctype(int , int ) ; int __cdecl isalpha(int ) ; int __cdecl isupper(int ) ; int __cdecl islower(int ) ; int __cdecl isdigit(int ) ; int __cdecl isxdigit(int ) ; int __cdecl isspace(int ) ; int __cdecl ispunct(int ) ; int __cdecl isalnum(int ) ; int __cdecl isprint(int ) ; int __cdecl isgraph(int ) ; int __cdecl iscntrl(int ) ; int __cdecl toupper(int ) ; int __cdecl tolower(int ) ; int __cdecl _tolower(int ) ; int __cdecl _toupper(int ) ; int __cdecl __isascii(int ) ; int __cdecl __toascii(int ) ; int __cdecl __iscsymf(int ) ; int __cdecl __iscsym(int ) ; #line 137 int __cdecl iswalpha(wint_t ) ; int __cdecl iswupper(wint_t ) ; int __cdecl iswlower(wint_t ) ; int __cdecl iswdigit(wint_t ) ; int __cdecl iswxdigit(wint_t ) ; int __cdecl iswspace(wint_t ) ; int __cdecl iswpunct(wint_t ) ; int __cdecl iswalnum(wint_t ) ; int __cdecl iswprint(wint_t ) ; int __cdecl iswgraph(wint_t ) ; int __cdecl iswcntrl(wint_t ) ; int __cdecl iswascii(wint_t ) ; int __cdecl isleadbyte(int ) ; #line 151 wchar_t __cdecl towupper(wchar_t ) ; wchar_t __cdecl towlower(wchar_t ) ; #line 154 int __cdecl iswctype(wint_t , wctype_t ) ; #line 157 int __cdecl is_wctype(wint_t , wctype_t ) ; #line 127 "C:/NTDDK/inc/ntdef.h" typedef unsigned long POINTER_64_INT ; #line 25 "C:/NTDDK/inc/basetsd.h" #pragma once #line 36 typedef int LONG32 , * PLONG32 ; #line 37 typedef int INT32 , * PINT32 ; #line 43 typedef unsigned int ULONG32 , * PULONG32 ; #line 44 typedef unsigned int DWORD32 , * PDWORD32 ; #line 45 typedef unsigned int UINT32 , * PUINT32 ; #line 84 typedef int INT_PTR , * PINT_PTR ; #line 85 typedef unsigned int UINT_PTR , * PUINT_PTR ; typedef long LONG_PTR , * PLONG_PTR ; #line 88 typedef unsigned long ULONG_PTR , * PULONG_PTR ; #line 248 typedef unsigned short UHALF_PTR , * PUHALF_PTR ; #line 249 typedef short HALF_PTR , * PHALF_PTR ; #line 250 typedef unsigned long HANDLE_PTR ; #line 288 typedef ULONG_PTR SIZE_T , * PSIZE_T ; #line 289 typedef LONG_PTR SSIZE_T , * PSSIZE_T ; #line 295 typedef ULONG_PTR DWORD_PTR , * PDWORD_PTR ; #line 301 typedef __int64 LONG64 , * PLONG64 ; #line 302 typedef __int64 INT64 , * PINT64 ; #line 309 typedef unsigned __int64 ULONG64 , * PULONG64 ; #line 310 typedef unsigned __int64 DWORD64 , * PDWORD64 ; #line 311 typedef unsigned __int64 UINT64 , * PUINT64 ; #line 217 "C:/NTDDK/inc/ntdef.h" typedef void * PVOID ; #line 218 typedef void * PVOID64 ; #line 266 typedef char CHAR ; #line 267 typedef short SHORT ; #line 268 typedef long LONG ; #line 276 typedef wchar_t WCHAR ; #line 282 typedef WCHAR * PWCHAR ; #line 283 typedef WCHAR * LPWCH , * PWCH ; #line 284 typedef const WCHAR * LPCWCH , * PCWCH ; #line 285 typedef WCHAR * NWPSTR ; #line 286 typedef WCHAR * LPWSTR , * PWSTR ; typedef const WCHAR * LPCWSTR , * PCWSTR ; #line 293 typedef CHAR * PCHAR ; #line 294 typedef CHAR * LPCH , * PCH ; typedef const CHAR * LPCCH , * PCCH ; #line 297 typedef CHAR * NPSTR ; #line 298 typedef CHAR * LPSTR , * PSTR ; #line 299 typedef const CHAR * LPCSTR , * PCSTR ; #line 321 typedef char TCHAR , * PTCHAR ; #line 322 typedef unsigned char TUCHAR , * PTUCHAR ; #line 326 typedef LPSTR LPTCH , PTCH ; #line 327 typedef LPSTR PTSTR , LPTSTR ; #line 328 typedef LPCSTR PCTSTR , LPCTSTR ; #line 337 typedef double DOUBLE ; typedef struct _QUAD { double DoNotUseThisField ; } QUAD ; #line 349 typedef SHORT * PSHORT ; #line 350 typedef LONG * PLONG ; #line 351 typedef QUAD * PQUAD ; #line 360 typedef unsigned char UCHAR ; #line 361 typedef unsigned short USHORT ; #line 362 typedef unsigned long ULONG ; #line 363 typedef QUAD UQUAD ; #line 369 typedef UCHAR * PUCHAR ; #line 370 typedef USHORT * PUSHORT ; #line 371 typedef ULONG * PULONG ; #line 372 typedef UQUAD * PUQUAD ; #line 378 typedef signed char SCHAR ; #line 379 typedef SCHAR * PSCHAR ; #line 394 typedef void * HANDLE ; #line 400 typedef HANDLE * PHANDLE ; #line 406 typedef UCHAR FCHAR ; #line 407 typedef USHORT FSHORT ; #line 408 typedef ULONG FLONG ; #line 414 typedef LONG HRESULT ; #line 478 typedef char CCHAR ; #line 479 typedef short CSHORT ; #line 480 typedef ULONG CLONG ; typedef CCHAR * PCCHAR ; #line 483 typedef CSHORT * PCSHORT ; #line 484 typedef CLONG * PCLONG ; #line 492 typedef ULONG LCID ; #line 493 typedef PULONG PLCID ; #line 494 typedef USHORT LANGID ; #line 500 typedef ULONG LOGICAL ; #line 501 typedef ULONG * PLOGICAL ; #line 508 typedef LONG NTSTATUS ; typedef NTSTATUS * PNTSTATUS ; #line 602 typedef struct _FLOAT128 { __int64 LowPart ; __int64 HighPart ; } FLOAT128 ; typedef FLOAT128 * PFLOAT128 ; #line 621 typedef __int64 LONGLONG ; #line 622 typedef unsigned __int64 ULONGLONG ; #line 639 typedef LONGLONG * PLONGLONG ; #line 640 typedef ULONGLONG * PULONGLONG ; #line 644 typedef LONGLONG USN ; #line 649 typedef union _LARGE_INTEGER { struct { ULONG LowPart ; LONG HighPart ; } ; struct { ULONG LowPart ; LONG HighPart ; } u ; LONGLONG QuadPart ; } LARGE_INTEGER ; #line 662 typedef LARGE_INTEGER * PLARGE_INTEGER ; #line 668 typedef union _ULARGE_INTEGER { struct { ULONG LowPart ; ULONG HighPart ; } ; struct { ULONG LowPart ; ULONG HighPart ; } u ; ULONGLONG QuadPart ; } ULARGE_INTEGER ; #line 681 typedef ULARGE_INTEGER * PULARGE_INTEGER ; #line 690 typedef struct _LUID { ULONG LowPart ; LONG HighPart ; } LUID , * PLUID ; #line 696 typedef ULONGLONG DWORDLONG ; #line 697 typedef DWORDLONG * PDWORDLONG ; #line 707 typedef LARGE_INTEGER PHYSICAL_ADDRESS , * PPHYSICAL_ADDRESS ; #line 809 ULONGLONG __stdcall Int64ShllMod32(ULONGLONG Value , ULONG ShiftCount ) ; #line 816 LONGLONG __stdcall Int64ShraMod32(LONGLONG Value , ULONG ShiftCount ) ; #line 823 ULONGLONG __stdcall Int64ShrlMod32(ULONGLONG Value , ULONG ShiftCount ) ; #line 831 #pragma warning(push) #pragma warning(disable:4035) __inline ULONGLONG __stdcall Int64ShllMod32___0(ULONGLONG Value , ULONG ShiftCount ) { #line 842 __asm { mov ecx, ShiftCount mov eax, dword ptr [Value] mov edx, dword ptr [Value+4] shld edx, eax, cl shl eax, cl }; } #line 845 __inline LONGLONG __stdcall Int64ShraMod32___0(LONGLONG Value , ULONG ShiftCount ) { #line 852 __asm { mov ecx, ShiftCount mov eax, dword ptr [Value] mov edx, dword ptr [Value+4] shrd eax, edx, cl sar edx, cl }; } #line 855 __inline ULONGLONG __stdcall Int64ShrlMod32___0(ULONGLONG Value , ULONG ShiftCount ) { #line 862 __asm { mov ecx, ShiftCount mov eax, dword ptr [Value] mov edx, dword ptr [Value+4] shrd eax, edx, cl shr edx, cl }; } #pragma warning(pop) #line 956 typedef enum _EVENT_TYPE { NotificationEvent, SynchronizationEvent } EVENT_TYPE ; #line 965 typedef enum _TIMER_TYPE { NotificationTimer, SynchronizationTimer } TIMER_TYPE ; #line 974 typedef enum _WAIT_TYPE { WaitAll, WaitAny } WAIT_TYPE ; #line 983 typedef CHAR * PSZ ; #line 984 typedef const char * PCSZ ; #line 991 typedef struct _STRING { USHORT Length ; USHORT MaximumLength ; PCHAR Buffer ; } STRING ; #line 999 typedef STRING * PSTRING ; typedef STRING ANSI_STRING ; #line 1002 typedef PSTRING PANSI_STRING ; typedef STRING OEM_STRING ; #line 1005 typedef PSTRING POEM_STRING ; #line 1011 typedef struct _CSTRING { USHORT Length ; USHORT MaximumLength ; const char * Buffer ; } CSTRING ; #line 1016 typedef CSTRING * PCSTRING ; #line 1019 typedef STRING CANSI_STRING ; #line 1020 typedef PSTRING PCANSI_STRING ; #line 1027 typedef struct _UNICODE_STRING { USHORT Length ; USHORT MaximumLength ; PWSTR Buffer ; } UNICODE_STRING ; #line 1036 typedef UNICODE_STRING * PUNICODE_STRING ; #line 1037 typedef const UNICODE_STRING * PCUNICODE_STRING ; #line 1046 typedef UCHAR BOOLEAN ; #line 1047 typedef BOOLEAN * PBOOLEAN ; #line 1057 typedef struct _LIST_ENTRY { struct _LIST_ENTRY * Flink ; struct _LIST_ENTRY * Blink ; } LIST_ENTRY , * PLIST_ENTRY , * PRLIST_ENTRY ; #line 1067 typedef struct _SINGLE_LIST_ENTRY { struct _SINGLE_LIST_ENTRY * Next ; } SINGLE_LIST_ENTRY , * PSINGLE_LIST_ENTRY ; #line 1078 typedef struct LIST_ENTRY32 { ULONG Flink ; ULONG Blink ; } LIST_ENTRY32 ; #line 1082 typedef LIST_ENTRY32 * PLIST_ENTRY32 ; typedef struct LIST_ENTRY64 { ULONGLONG Flink ; ULONGLONG Blink ; } LIST_ENTRY64 ; #line 1088 typedef LIST_ENTRY64 * PLIST_ENTRY64 ; #line 1094 __inline void ListEntry32To64(PLIST_ENTRY32 l32 , PLIST_ENTRY64 l64 ) { #line 1101 l64->Flink = (ULONGLONG )((LONGLONG )((LONG )l32->Flink)); l64->Blink = (ULONGLONG )((LONGLONG )((LONG )l32->Blink)); } __inline void ListEntry64To32(PLIST_ENTRY64 l64 , PLIST_ENTRY32 l32 ) { #line 1112 l32->Flink = (ULONG )l64->Flink; l32->Blink = (ULONG )l64->Blink; } #line 1127 typedef struct _STRING32 { USHORT Length ; USHORT MaximumLength ; ULONG Buffer ; } STRING32 ; #line 1132 typedef STRING32 * PSTRING32 ; typedef STRING32 UNICODE_STRING32 ; #line 1135 typedef UNICODE_STRING32 * PUNICODE_STRING32 ; typedef STRING32 ANSI_STRING32 ; #line 1138 typedef ANSI_STRING32 * PANSI_STRING32 ; #line 1141 typedef struct _STRING64 { USHORT Length ; USHORT MaximumLength ; ULONGLONG Buffer ; } STRING64 ; #line 1146 typedef STRING64 * PSTRING64 ; typedef STRING64 UNICODE_STRING64 ; #line 1149 typedef UNICODE_STRING64 * PUNICODE_STRING64 ; typedef STRING64 ANSI_STRING64 ; #line 1152 typedef ANSI_STRING64 * PANSI_STRING64 ; #line 1173 typedef struct _OBJECT_ATTRIBUTES { ULONG Length ; HANDLE RootDirectory ; PUNICODE_STRING ObjectName ; ULONG Attributes ; PVOID SecurityDescriptor ; PVOID SecurityQualityOfService ; } OBJECT_ATTRIBUTES ; #line 1181 typedef OBJECT_ATTRIBUTES * POBJECT_ATTRIBUTES ; #line 17 "C:/NTDDK/inc/guiddef.h" typedef struct _GUID { unsigned long Data1 ; unsigned short Data2 ; unsigned short Data3 ; unsigned char Data4[8] ; } GUID ; #line 70 typedef GUID * LPGUID ; #line 75 typedef const GUID * LPCGUID ; #line 81 typedef GUID IID ; #line 82 typedef IID * LPIID ; #line 85 typedef GUID CLSID ; #line 86 typedef CLSID * LPCLSID ; #line 89 typedef GUID FMTID ; #line 90 typedef FMTID * LPFMTID ; #line 16 "C:/NTDDK/inc/string.h" #pragma once #line 54 typedef unsigned int size_t ; #line 93 void * __cdecl memcpy(void * , const void * , size_t ) ; int __cdecl memcmp(const void * , const void * , size_t ) ; void * __cdecl memset(void * , int , size_t ) ; char * __cdecl _strset(char * , int ) ; char * __cdecl strcpy(char * , const char * ) ; char * __cdecl strcat(char * , const char * ) ; int __cdecl strcmp(const char * , const char * ) ; size_t __cdecl strlen(const char * ) ; #line 102 void * __cdecl _memccpy(void * , const void * , int , size_t ) ; void * __cdecl memchr(const void * , int , size_t ) ; int __cdecl _memicmp(const void * , const void * , size_t ) ; #line 110 void * __cdecl memmove(void * , const void * , size_t ) ; #line 114 char * __cdecl strchr(const char * , int ) ; int __cdecl _strcmpi(const char * , const char * ) ; int __cdecl _stricmp(const char * , const char * ) ; int __cdecl strcoll(const char * , const char * ) ; int __cdecl _stricoll(const char * , const char * ) ; int __cdecl _strncoll(const char * , const char * , size_t ) ; int __cdecl _strnicoll(const char * , const char * , size_t ) ; size_t __cdecl strcspn(const char * , const char * ) ; char * __cdecl _strdup(const char * ) ; char * __cdecl _strerror(const char * ) ; char * __cdecl strerror(int ) ; char * __cdecl _strlwr(char * ) ; char * __cdecl strncat(char * , const char * , size_t ) ; int __cdecl strncmp(const char * , const char * , size_t ) ; int __cdecl _strnicmp(const char * , const char * , size_t ) ; char * __cdecl strncpy(char * , const char * , size_t ) ; char * __cdecl _strnset(char * , int , size_t ) ; char * __cdecl strpbrk(const char * , const char * ) ; char * __cdecl strrchr(const char * , int ) ; char * __cdecl _strrev(char * ) ; size_t __cdecl strspn(const char * , const char * ) ; char * __cdecl strstr(const char * , const char * ) ; char * __cdecl strtok(char * , const char * ) ; char * __cdecl _strupr(char * ) ; size_t __cdecl strxfrm(char * , const char * , size_t ) ; #line 144 void * __cdecl memccpy(void * , const void * , int , size_t ) ; int __cdecl memicmp(const void * , const void * , size_t ) ; int __cdecl strcmpi(const char * , const char * ) ; int __cdecl stricmp(const char * , const char * ) ; char * __cdecl strdup(const char * ) ; char * __cdecl strlwr(char * ) ; int __cdecl strnicmp(const char * , const char * , size_t ) ; char * __cdecl strnset(char * , int , size_t ) ; char * __cdecl strrev(char * ) ; char * __cdecl strset(char * , int ) ; char * __cdecl strupr(char * ) ; #line 163 wchar_t * __cdecl wcscat(wchar_t * , const wchar_t * ) ; wchar_t * __cdecl wcschr(const wchar_t * , wchar_t ) ; int __cdecl wcscmp(const wchar_t * , const wchar_t * ) ; wchar_t * __cdecl wcscpy(wchar_t * , const wchar_t * ) ; size_t __cdecl wcscspn(const wchar_t * , const wchar_t * ) ; size_t __cdecl wcslen(const wchar_t * ) ; wchar_t * __cdecl wcsncat(wchar_t * , const wchar_t * , size_t ) ; int __cdecl wcsncmp(const wchar_t * , const wchar_t * , size_t ) ; wchar_t * __cdecl wcsncpy(wchar_t * , const wchar_t * , size_t ) ; wchar_t * __cdecl wcspbrk(const wchar_t * , const wchar_t * ) ; wchar_t * __cdecl wcsrchr(const wchar_t * , wchar_t ) ; size_t __cdecl wcsspn(const wchar_t * , const wchar_t * ) ; wchar_t * __cdecl wcsstr(const wchar_t * , const wchar_t * ) ; wchar_t * __cdecl wcstok(wchar_t * , const wchar_t * ) ; #line 178 wchar_t * __cdecl _wcsdup(const wchar_t * ) ; int __cdecl _wcsicmp(const wchar_t * , const wchar_t * ) ; int __cdecl _wcsnicmp(const wchar_t * , const wchar_t * , size_t ) ; wchar_t * __cdecl _wcsnset(wchar_t * , wchar_t , size_t ) ; wchar_t * __cdecl _wcsrev(wchar_t * ) ; wchar_t * __cdecl _wcsset(wchar_t * , wchar_t ) ; #line 185 wchar_t * __cdecl _wcslwr(wchar_t * ) ; wchar_t * __cdecl _wcsupr(wchar_t * ) ; size_t __cdecl wcsxfrm(wchar_t * , const wchar_t * , size_t ) ; int __cdecl wcscoll(const wchar_t * , const wchar_t * ) ; int __cdecl _wcsicoll(const wchar_t * , const wchar_t * ) ; int __cdecl _wcsncoll(const wchar_t * , const wchar_t * , size_t ) ; int __cdecl _wcsnicoll(const wchar_t * , const wchar_t * , size_t ) ; #line 199 wchar_t * __cdecl wcsdup(const wchar_t * ) ; int __cdecl wcsicmp(const wchar_t * , const wchar_t * ) ; int __cdecl wcsnicmp(const wchar_t * , const wchar_t * , size_t ) ; wchar_t * __cdecl wcsnset(wchar_t * , wchar_t , size_t ) ; wchar_t * __cdecl wcsrev(wchar_t * ) ; wchar_t * __cdecl wcsset(wchar_t * , wchar_t ) ; wchar_t * __cdecl wcslwr(wchar_t * ) ; wchar_t * __cdecl wcsupr(wchar_t * ) ; int __cdecl wcsicoll(const wchar_t * , const wchar_t * ) ; #line 1233 "C:/NTDDK/inc/ntdef.h" typedef struct _OBJECTID { GUID Lineage ; ULONG Uniquifier ; } OBJECTID ; #line 1288 struct _CONTEXT ; #line 1289 struct _EXCEPTION_RECORD ; typedef EXCEPTION_DISPOSITION ( * PEXCEPTION_ROUTINE )(struct _EXCEPTION_RECORD * ExceptionRecord , PVOID EstablisherFrame , struct _CONTEXT * ContextRecord , PVOID DispatcherContext ) ; #line 1306 typedef UCHAR KIRQL ; typedef KIRQL * PKIRQL ; #line 1316 typedef enum _NT_PRODUCT_TYPE { NtProductWinNt = 1, NtProductLanManNt, NtProductServer } NT_PRODUCT_TYPE , * PNT_PRODUCT_TYPE ; #line 1329 typedef enum _SUITE_TYPE { SmallBusiness, Enterprise, BackOffice, CommunicationServer, TerminalServer, SmallBusinessRestricted, EmbeddedNT, DataCenter, SingleUserTS, MaxSuiteType } SUITE_TYPE ; #line 75 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _KTHREAD * PKTHREAD ; #line 76 typedef struct _ETHREAD * PETHREAD ; #line 77 typedef struct _EPROCESS * PEPROCESS ; #line 78 typedef struct _PEB * PPEB ; #line 79 typedef struct _KINTERRUPT * PKINTERRUPT ; #line 80 typedef struct _IO_TIMER * PIO_TIMER ; #line 81 typedef struct _OBJECT_TYPE * POBJECT_TYPE ; #line 82 typedef struct _CALLBACK_OBJECT * PCALLBACK_OBJECT___0 ; #line 83 typedef struct _DEVICE_HANDLER_OBJECT * PDEVICE_HANDLER_OBJECT ; #line 84 typedef struct _BUS_HANDLER * PBUS_HANDLER ; #line 101 PKTHREAD __stdcall KeGetCurrentThread() ; #line 124 extern PCCHAR KeNumberProcessors ; #line 143 typedef union _SLIST_HEADER { ULONGLONG Alignment ; struct { SINGLE_LIST_ENTRY Next ; USHORT Depth ; USHORT Sequence ; } ; } SLIST_HEADER , * PSLIST_HEADER ; #line 204 typedef CCHAR KPROCESSOR_MODE ; typedef enum _MODE { KernelMode, UserMode, MaximumMode } MODE ; #line 222 struct _KAPC ; typedef void ( * PKNORMAL_ROUTINE )(PVOID NormalContext , PVOID SystemArgument1 , PVOID SystemArgument2 ) ; #line 232 typedef void ( * PKKERNEL_ROUTINE )(struct _KAPC * Apc , PKNORMAL_ROUTINE * NormalRoutine , PVOID * NormalContext , PVOID * SystemArgument1 , PVOID * SystemArgument2 ) ; #line 242 typedef void ( * PKRUNDOWN_ROUTINE )(struct _KAPC * Apc ) ; #line 248 typedef BOOLEAN ( * PKSYNCHRONIZE_ROUTINE )(PVOID SynchronizeContext ) ; #line 254 typedef BOOLEAN ( * PKTRANSFER_ROUTINE )(void ) ; #line 265 typedef struct _KAPC { CSHORT Type ; CSHORT Size ; ULONG Spare0 ; struct _KTHREAD * Thread ; LIST_ENTRY ApcListEntry ; PKKERNEL_ROUTINE KernelRoutine ; PKRUNDOWN_ROUTINE RundownRoutine ; PKNORMAL_ROUTINE NormalRoutine ; PVOID NormalContext ; PVOID SystemArgument1 ; PVOID SystemArgument2 ; CCHAR ApcStateIndex ; KPROCESSOR_MODE ApcMode ; BOOLEAN Inserted ; } KAPC , * PKAPC , * PRKAPC ; #line 292 struct _KDPC ; typedef void ( * PKDEFERRED_ROUTINE )(struct _KDPC * Dpc , PVOID DeferredContext , PVOID SystemArgument1 , PVOID SystemArgument2 ) ; #line 351 typedef enum _KDPC_IMPORTANCE { LowImportance, MediumImportance, HighImportance } KDPC_IMPORTANCE ; #line 361 typedef struct _KDPC { CSHORT Type ; UCHAR Number ; UCHAR Importance ; LIST_ENTRY DpcListEntry ; PKDEFERRED_ROUTINE DeferredRoutine ; PVOID DeferredContext ; PVOID SystemArgument1 ; PVOID SystemArgument2 ; PULONG_PTR Lock ; } KDPC , * PKDPC , * PRKDPC ; #line 377 typedef PVOID PKIPI_CONTEXT ; typedef void ( * PKIPI_WORKER )(PKIPI_CONTEXT PacketContext , PVOID Parameter1 , PVOID Parameter2 , PVOID Parameter3 ) ; #line 392 typedef struct _KIPI_COUNTS { ULONG Freeze ; ULONG Packet ; ULONG DPC ; ULONG APC ; ULONG FlushSingleTb ; ULONG FlushMultipleTb ; ULONG FlushEntireTb ; ULONG GenericCall ; ULONG ChangeColor ; ULONG SweepDcache ; ULONG SweepIcache ; ULONG SweepIcacheRange ; ULONG FlushIoBuffers ; ULONG GratuitousDPC ; } KIPI_COUNTS , * PKIPI_COUNTS ; #line 443 typedef struct _MDL { struct _MDL * Next ; CSHORT Size ; CSHORT MdlFlags ; struct _EPROCESS * Process ; PVOID MappedSystemVa ; PVOID StartVa ; ULONG ByteCount ; ULONG ByteOffset ; } MDL , * PMDL ; #line 532 typedef PVOID PACCESS_TOKEN ; #line 538 typedef PVOID PSECURITY_DESCRIPTOR ; #line 544 typedef PVOID PSID ; typedef ULONG ACCESS_MASK ; #line 547 typedef ACCESS_MASK * PACCESS_MASK ; #line 597 typedef struct _GENERIC_MAPPING { ACCESS_MASK GenericRead ; ACCESS_MASK GenericWrite ; ACCESS_MASK GenericExecute ; ACCESS_MASK GenericAll ; } GENERIC_MAPPING ; #line 603 typedef GENERIC_MAPPING * PGENERIC_MAPPING ; #line 24 "C:/NTDDK/inc/pshpack4.h" #pragma warning(disable:4103) #pragma pack(push, 4) #line 618 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _LUID_AND_ATTRIBUTES { LUID Luid ; ULONG Attributes ; } LUID_AND_ATTRIBUTES , * PLUID_AND_ATTRIBUTES ; #line 622 typedef LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES_ARRAY[1] ; #line 623 typedef LUID_AND_ATTRIBUTES_ARRAY * PLUID_AND_ATTRIBUTES_ARRAY ; #line 27 "C:/NTDDK/inc/poppack.h" #pragma warning(disable:4103) #pragma pack(pop) #line 642 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _ACL { UCHAR AclRevision ; UCHAR Sbz1 ; USHORT AclSize ; USHORT AceCount ; USHORT Sbz2 ; } ACL ; #line 649 typedef ACL * PACL ; #line 681 typedef struct _PRIVILEGE_SET { ULONG PrivilegeCount ; ULONG Control ; LUID_AND_ATTRIBUTES Privilege[1] ; } PRIVILEGE_SET , * PPRIVILEGE_SET ; #line 735 typedef enum _SECURITY_IMPERSONATION_LEVEL { SecurityAnonymous, SecurityIdentification, SecurityImpersonation, SecurityDelegation } SECURITY_IMPERSONATION_LEVEL , * PSECURITY_IMPERSONATION_LEVEL ; #line 753 typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE , * PSECURITY_CONTEXT_TRACKING_MODE ; #line 762 typedef struct _SECURITY_QUALITY_OF_SERVICE { ULONG Length ; SECURITY_IMPERSONATION_LEVEL ImpersonationLevel ; SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode ; BOOLEAN EffectiveOnly ; } SECURITY_QUALITY_OF_SERVICE , * PSECURITY_QUALITY_OF_SERVICE ; #line 774 typedef struct _SE_IMPERSONATION_STATE { PACCESS_TOKEN Token ; BOOLEAN CopyOnOpen ; BOOLEAN EffectiveOnly ; SECURITY_IMPERSONATION_LEVEL Level ; } SE_IMPERSONATION_STATE , * PSE_IMPERSONATION_STATE ; #line 782 typedef ULONG SECURITY_INFORMATION , * PSECURITY_INFORMATION ; #line 809 typedef ULONG KAFFINITY ; #line 810 typedef KAFFINITY * PKAFFINITY ; #line 816 typedef LONG KPRIORITY ; #line 824 typedef ULONG_PTR KSPIN_LOCK ; #line 825 typedef KSPIN_LOCK * PKSPIN_LOCK ; #line 833 typedef void ( * PKINTERRUPT_ROUTINE )(void ) ; #line 842 typedef enum _KPROFILE_SOURCE { ProfileTime, ProfileAlignmentFixup, ProfileTotalIssues, ProfilePipelineDry, ProfileLoadInstructions, ProfilePipelineFrozen, ProfileBranchInstructions, ProfileTotalNonissues, ProfileDcacheMisses, ProfileIcacheMisses, ProfileCacheMisses, ProfileBranchMispredictions, ProfileStoreInstructions, ProfileFpInstructions, ProfileIntegerInstructions, Profile2Issue, Profile3Issue, Profile4Issue, ProfileSpecialInstructions, ProfileTotalCycles, ProfileIcacheIssues, ProfileDcacheAccesses, ProfileMemoryBarrierCycles, ProfileLoadLinkedIssues, ProfileMaximum } KPROFILE_SOURCE ; #line 1058 __declspec(dllimport) void __stdcall RtlGetCallersAddress(PVOID * CallersAddress , PVOID * CallersCaller ) ; #line 1067 __declspec(dllimport) ULONG __stdcall RtlWalkFrameChain(PVOID * Callers , ULONG Count , ULONG Flags ) ; #line 1079 typedef NTSTATUS (__stdcall * PRTL_QUERY_REGISTRY_ROUTINE )(PWSTR ValueName , ULONG ValueType , PVOID ValueData , ULONG ValueLength , PVOID Context , PVOID EntryContext ) ; #line 1088 typedef struct _RTL_QUERY_REGISTRY_TABLE { PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine ; ULONG Flags ; PWSTR Name ; PVOID EntryContext ; ULONG DefaultType ; PVOID DefaultData ; ULONG DefaultLength ; } RTL_QUERY_REGISTRY_TABLE , * PRTL_QUERY_REGISTRY_TABLE ; #line 1136 __declspec(dllimport) NTSTATUS __stdcall RtlQueryRegistryValues(ULONG RelativeTo , PCWSTR Path , PRTL_QUERY_REGISTRY_TABLE QueryTable , PVOID Context , PVOID Environment ) ; #line 1147 __declspec(dllimport) NTSTATUS __stdcall RtlWriteRegistryValue(ULONG RelativeTo , PCWSTR Path , PCWSTR ValueName , ULONG ValueType , PVOID ValueData , ULONG ValueLength ) ; #line 1159 __declspec(dllimport) NTSTATUS __stdcall RtlDeleteRegistryValue(ULONG RelativeTo , PCWSTR Path , PCWSTR ValueName ) ; #line 1170 __declspec(dllimport) NTSTATUS __stdcall RtlCreateRegistryKey(ULONG RelativeTo , PWSTR Path ) ; #line 1178 __declspec(dllimport) NTSTATUS __stdcall RtlCheckRegistryKey(ULONG RelativeTo , PWSTR Path ) ; #line 1202 __declspec(dllimport) NTSTATUS __stdcall RtlCharToInteger(PCSZ String , ULONG Base , PULONG Value ) ; #line 1211 __declspec(dllimport) NTSTATUS __stdcall RtlIntegerToUnicodeString(ULONG Value , ULONG Base , PUNICODE_STRING String ) ; #line 1220 __declspec(dllimport) NTSTATUS __stdcall RtlInt64ToUnicodeString(ULONGLONG Value , ULONG Base , PUNICODE_STRING String ) ; #line 1235 __declspec(dllimport) NTSTATUS __stdcall RtlUnicodeStringToInteger(PUNICODE_STRING String , ULONG Base , PULONG Value ) ; #line 1261 extern BOOLEAN ( * NlsMbCodePageTag ) ; extern BOOLEAN ( * NlsMbOemCodePageTag ) ; #line 1264 __declspec(dllimport) void __stdcall RtlInitString(PSTRING DestinationString , PCSZ SourceString ) ; #line 1272 __declspec(dllimport) void __stdcall RtlInitAnsiString(PANSI_STRING DestinationString , PCSZ SourceString ) ; #line 1280 __declspec(dllimport) void __stdcall RtlInitUnicodeString(PUNICODE_STRING DestinationString , PCWSTR SourceString ) ; #line 1289 __declspec(dllimport) void __stdcall RtlCopyString(PSTRING DestinationString , PSTRING SourceString ) ; #line 1297 __declspec(dllimport) CHAR __stdcall RtlUpperChar(CHAR Character ) ; #line 1304 __declspec(dllimport) LONG __stdcall RtlCompareString(PSTRING String1 , PSTRING String2 , BOOLEAN CaseInSensitive ) ; #line 1313 __declspec(dllimport) BOOLEAN __stdcall RtlEqualString(PSTRING String1 , PSTRING String2 , BOOLEAN CaseInSensitive ) ; #line 1323 __declspec(dllimport) void __stdcall RtlUpperString(PSTRING DestinationString , PSTRING SourceString ) ; #line 1335 __declspec(dllimport) NTSTATUS __stdcall RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString , PANSI_STRING SourceString , BOOLEAN AllocateDestinationString ) ; #line 1345 __declspec(dllimport) NTSTATUS __stdcall RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString , PUNICODE_STRING SourceString , BOOLEAN AllocateDestinationString ) ; #line 1355 __declspec(dllimport) LONG __stdcall RtlCompareUnicodeString(PUNICODE_STRING String1 , PUNICODE_STRING String2 , BOOLEAN CaseInSensitive ) ; #line 1364 __declspec(dllimport) BOOLEAN __stdcall RtlEqualUnicodeString(const UNICODE_STRING * String1 , const UNICODE_STRING * String2 , BOOLEAN CaseInSensitive ) ; #line 1375 __declspec(dllimport) BOOLEAN __stdcall RtlPrefixUnicodeString(PUNICODE_STRING String1 , PUNICODE_STRING String2 , BOOLEAN CaseInSensitive ) ; #line 1384 __declspec(dllimport) NTSTATUS __stdcall RtlUpcaseUnicodeString(PUNICODE_STRING DestinationString , PCUNICODE_STRING SourceString , BOOLEAN AllocateDestinationString ) ; #line 1394 __declspec(dllimport) void __stdcall RtlCopyUnicodeString(PUNICODE_STRING DestinationString , PUNICODE_STRING SourceString ) ; #line 1402 __declspec(dllimport) NTSTATUS __stdcall RtlAppendUnicodeStringToString(PUNICODE_STRING Destination , PUNICODE_STRING Source ) ; #line 1410 __declspec(dllimport) NTSTATUS __stdcall RtlAppendUnicodeToString(PUNICODE_STRING Destination , PCWSTR Source ) ; #line 1420 __declspec(dllimport) WCHAR __stdcall RtlUpcaseUnicodeChar(WCHAR SourceCharacter ) ; #line 1429 __declspec(dllimport) void __stdcall RtlFreeUnicodeString(PUNICODE_STRING UnicodeString ) ; #line 1436 __declspec(dllimport) void __stdcall RtlFreeAnsiString(PANSI_STRING AnsiString ) ; #line 1444 __declspec(dllimport) ULONG __stdcall RtlxAnsiStringToUnicodeSize(PANSI_STRING AnsiString ) ; #line 1494 __declspec(dllimport) NTSTATUS __stdcall RtlStringFromGUID(const GUID * const Guid , PUNICODE_STRING GuidString ) ; #line 1502 __declspec(dllimport) NTSTATUS __stdcall RtlGUIDFromString(PUNICODE_STRING GuidString , GUID * Guid ) ; #line 1516 __declspec(dllimport) SIZE_T __stdcall RtlCompareMemory(const void * Source1 , const void * Source2 , SIZE_T Length ) ; #line 1641 void __stdcall DbgBreakPoint(void ) ; #line 1649 __declspec(dllimport) void __stdcall DbgBreakPointWithStatus(ULONG Status ) ; #line 1690 ULONG _cdecl DbgPrint(PCH Format , ...) ; #line 1699 ULONG _cdecl DbgPrintReturnControlC(PCH Format , ...) ; #line 1718 __inline LARGE_INTEGER __stdcall RtlLargeIntegerAdd(LARGE_INTEGER Addend1 , LARGE_INTEGER Addend2 ) { #line 1726 LARGE_INTEGER Sum ; #line 1728 Sum.QuadPart = Addend1.QuadPart + Addend2.QuadPart; return Sum; } #line 1736 __inline LARGE_INTEGER __stdcall RtlEnlargedIntegerMultiply(LONG Multiplicand , LONG Multiplier ) { #line 1744 LARGE_INTEGER Product ; #line 1746 Product.QuadPart = (LONGLONG )Multiplicand * (ULONGLONG )Multiplier; return Product; } #line 1754 __inline LARGE_INTEGER __stdcall RtlEnlargedUnsignedMultiply(ULONG Multiplicand , ULONG Multiplier ) { #line 1762 LARGE_INTEGER Product ; #line 1764 Product.QuadPart = (ULONGLONG )Multiplicand * (ULONGLONG )Multiplier; return Product; } #line 1772 __inline ULONG __stdcall RtlEnlargedUnsignedDivide(ULARGE_INTEGER Dividend , ULONG Divisor , PULONG Remainder ) { #line 1781 ULONG Quotient ; #line 1783 Quotient = (ULONG )(Dividend.QuadPart / Divisor); if((CHAR * )Remainder != (CHAR * )((void * )0)) { * Remainder = (ULONG )(Dividend.QuadPart % Divisor); } #line 1789 return Quotient; } #line 1796 __inline LARGE_INTEGER __stdcall RtlLargeIntegerNegate(LARGE_INTEGER Subtrahend ) { #line 1803 LARGE_INTEGER Difference ; #line 1805 Difference.QuadPart = - Subtrahend.QuadPart; return Difference; } #line 1813 __inline LARGE_INTEGER __stdcall RtlLargeIntegerSubtract(LARGE_INTEGER Minuend , LARGE_INTEGER Subtrahend ) { #line 1821 LARGE_INTEGER Difference ; #line 1823 Difference.QuadPart = Minuend.QuadPart - Subtrahend.QuadPart; return Difference; } #line 1833 __declspec(dllimport) LARGE_INTEGER __stdcall RtlExtendedMagicDivide(LARGE_INTEGER Dividend , LARGE_INTEGER MagicDivisor , CCHAR ShiftCount ) ; #line 1846 __declspec(dllimport) LARGE_INTEGER __stdcall RtlExtendedLargeIntegerDivide(LARGE_INTEGER Dividend , ULONG Divisor , PULONG Remainder ) ; #line 1860 __declspec(dllimport) LARGE_INTEGER __stdcall RtlLargeIntegerDivide(LARGE_INTEGER Dividend , LARGE_INTEGER Divisor , PLARGE_INTEGER Remainder ) ; #line 1874 __declspec(dllimport) LARGE_INTEGER __stdcall RtlExtendedIntegerMultiply(LARGE_INTEGER Multiplicand , LONG Multiplier ) ; #line 1952 #pragma warning(push) #pragma warning(disable:4035) #line 1960 __inline LARGE_INTEGER __stdcall RtlConvertLongToLargeInteger(LONG SignedInteger ) { #line 1966 __asm { mov eax, SignedInteger cdq ; (edx:eax) = signed LargeInt }; } #line 1973 __inline LARGE_INTEGER __stdcall RtlConvertUlongToLargeInteger(ULONG UnsignedInteger ) { #line 1979 __asm { sub edx, edx ; zero highpart mov eax, UnsignedInteger }; } #line 1986 __inline LARGE_INTEGER __stdcall RtlLargeIntegerShiftLeft(LARGE_INTEGER LargeInteger , CCHAR ShiftCount ) { #line 1993 __asm { mov cl, ShiftCount and cl, 0x3f ; mod 64 cmp cl, 32 jc short sl10 mov edx, LargeInteger.LowPart ; ShiftCount >= 32 xor eax, eax ; lowpart is zero shl edx, cl ; store highpart jmp short done sl10: mov eax, LargeInteger.LowPart ; ShiftCount < 32 mov edx, LargeInteger.HighPart shld edx, eax, cl shl eax, cl done: }; } __inline LARGE_INTEGER __stdcall RtlLargeIntegerShiftRight(LARGE_INTEGER LargeInteger , CCHAR ShiftCount ) { #line 2004 __asm { mov cl, ShiftCount and cl, 0x3f ; mod 64 cmp cl, 32 jc short sr10 mov eax, LargeInteger.HighPart ; ShiftCount >= 32 xor edx, edx ; lowpart is zero shr eax, cl ; store highpart jmp short done sr10: mov eax, LargeInteger.LowPart ; ShiftCount < 32 mov edx, LargeInteger.HighPart shrd eax, edx, cl shr edx, cl done: }; } __inline LARGE_INTEGER __stdcall RtlLargeIntegerArithmeticShift(LARGE_INTEGER LargeInteger , CCHAR ShiftCount ) { #line 2015 __asm { mov cl, ShiftCount and cl, 3fh ; mod 64 cmp cl, 32 jc short sar10 mov eax, LargeInteger.HighPart sar eax, cl bt eax, 31 ; sign bit set? sbb edx, edx ; duplicate sign bit into highpart jmp short done sar10: mov eax, LargeInteger.LowPart ; (eax) = LargeInteger.LowPart mov edx, LargeInteger.HighPart ; (edx) = LargeInteger.HighPart shrd eax, edx, cl sar edx, cl done: }; } #pragma warning(pop) #line 2214 typedef struct _TIME_FIELDS { CSHORT Year ; CSHORT Month ; CSHORT Day ; CSHORT Hour ; CSHORT Minute ; CSHORT Second ; CSHORT Milliseconds ; CSHORT Weekday ; } TIME_FIELDS ; #line 2224 typedef TIME_FIELDS * PTIME_FIELDS ; #line 2227 __declspec(dllimport) void __stdcall RtlTimeToTimeFields(PLARGE_INTEGER Time , PTIME_FIELDS TimeFields ) ; #line 2239 __declspec(dllimport) BOOLEAN __stdcall RtlTimeFieldsToTime(PTIME_FIELDS TimeFields , PLARGE_INTEGER Time ) ; #line 2499 typedef struct _RTL_BITMAP { ULONG SizeOfBitMap ; PULONG Buffer ; } RTL_BITMAP ; #line 2503 typedef RTL_BITMAP * PRTL_BITMAP ; #line 2511 __declspec(dllimport) void __stdcall RtlInitializeBitMap(PRTL_BITMAP BitMapHeader , PULONG BitMapBuffer , ULONG SizeOfBitMap ) ; #line 2525 __declspec(dllimport) void __stdcall RtlClearAllBits(PRTL_BITMAP BitMapHeader ) ; #line 2532 __declspec(dllimport) void __stdcall RtlSetAllBits(PRTL_BITMAP BitMapHeader ) ; #line 2549 __declspec(dllimport) ULONG __stdcall RtlFindClearBits(PRTL_BITMAP BitMapHeader , ULONG NumberToFind , ULONG HintIndex ) ; #line 2558 __declspec(dllimport) ULONG __stdcall RtlFindSetBits(PRTL_BITMAP BitMapHeader , ULONG NumberToFind , ULONG HintIndex ) ; #line 2578 __declspec(dllimport) ULONG __stdcall RtlFindClearBitsAndSet(PRTL_BITMAP BitMapHeader , ULONG NumberToFind , ULONG HintIndex ) ; #line 2587 __declspec(dllimport) ULONG __stdcall RtlFindSetBitsAndClear(PRTL_BITMAP BitMapHeader , ULONG NumberToFind , ULONG HintIndex ) ; #line 2601 __declspec(dllimport) void __stdcall RtlClearBits(PRTL_BITMAP BitMapHeader , ULONG StartingIndex , ULONG NumberToClear ) ; #line 2610 __declspec(dllimport) void __stdcall RtlSetBits(PRTL_BITMAP BitMapHeader , ULONG StartingIndex , ULONG NumberToSet ) ; #line 2627 typedef struct _RTL_BITMAP_RUN { ULONG StartingIndex ; ULONG NumberOfBits ; } RTL_BITMAP_RUN ; #line 2633 typedef RTL_BITMAP_RUN * PRTL_BITMAP_RUN ; __declspec(dllimport) ULONG __stdcall RtlFindClearRuns(PRTL_BITMAP BitMapHeader , PRTL_BITMAP_RUN RunArray , ULONG SizeOfRunArray , BOOLEAN LocateLongestRuns ) ; #line 2652 __declspec(dllimport) ULONG __stdcall RtlFindLongestRunClear(PRTL_BITMAP BitMapHeader , PULONG StartingIndex ) ; #line 2667 __declspec(dllimport) ULONG __stdcall RtlFindFirstRunClear(PRTL_BITMAP BitMapHeader , PULONG StartingIndex ) ; #line 2699 __declspec(dllimport) ULONG __stdcall RtlNumberOfClearBits(PRTL_BITMAP BitMapHeader ) ; #line 2706 __declspec(dllimport) ULONG __stdcall RtlNumberOfSetBits(PRTL_BITMAP BitMapHeader ) ; #line 2718 __declspec(dllimport) BOOLEAN __stdcall RtlAreBitsClear(PRTL_BITMAP BitMapHeader , ULONG StartingIndex , ULONG Length ) ; #line 2727 __declspec(dllimport) BOOLEAN __stdcall RtlAreBitsSet(PRTL_BITMAP BitMapHeader , ULONG StartingIndex , ULONG Length ) ; #line 2736 __declspec(dllimport) ULONG __stdcall RtlFindNextForwardRunClear(PRTL_BITMAP BitMapHeader , ULONG FromIndex , PULONG StartingRunIndex ) ; #line 2745 __declspec(dllimport) ULONG __stdcall RtlFindLastBackwardRunClear(PRTL_BITMAP BitMapHeader , ULONG FromIndex , PULONG StartingRunIndex ) ; #line 2760 __declspec(dllimport) CCHAR __stdcall RtlFindLeastSignificantBit(ULONGLONG Set ) ; #line 2767 __declspec(dllimport) CCHAR __stdcall RtlFindMostSignificantBit(ULONGLONG Set ) ; #line 2796 __inline LUID __stdcall RtlConvertLongToLuid(LONG Long ) { #line 2802 LUID TempLuid ; LARGE_INTEGER TempLi ; #line 2805 TempLi = RtlConvertLongToLargeInteger(Long); TempLuid.LowPart = TempLi.LowPart; TempLuid.HighPart = TempLi.HighPart; return TempLuid; } __inline LUID __stdcall RtlConvertUlongToLuid(ULONG Ulong ) { #line 2817 LUID TempLuid ; #line 2819 TempLuid.LowPart = Ulong; TempLuid.HighPart = 0; return TempLuid; } #line 2826 __declspec(dllimport) void __stdcall RtlMapGenericMask(PACCESS_MASK AccessMask , PGENERIC_MAPPING GenericMapping ) ; #line 2837 __declspec(dllimport) NTSTATUS __stdcall RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor , ULONG Revision ) ; #line 2846 __declspec(dllimport) BOOLEAN __stdcall RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor ) ; #line 2854 __declspec(dllimport) ULONG __stdcall RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor ) ; #line 2861 __declspec(dllimport) BOOLEAN __stdcall RtlValidRelativeSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptorInput , ULONG SecurityDescriptorLength , SECURITY_INFORMATION RequiredInformation ) ; #line 2871 __declspec(dllimport) NTSTATUS __stdcall RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor , BOOLEAN DaclPresent , PACL Dacl , BOOLEAN DaclDefaulted ) ; #line 2886 typedef struct _RTL_RANGE { ULONGLONG Start ; ULONGLONG End ; PVOID UserData ; PVOID Owner ; UCHAR Attributes ; UCHAR Flags ; } RTL_RANGE , * PRTL_RANGE ; #line 2924 typedef struct _RTL_RANGE_LIST { LIST_ENTRY ListHead ; ULONG Flags ; ULONG Count ; ULONG Stamp ; } RTL_RANGE_LIST , * PRTL_RANGE_LIST ; #line 2950 typedef struct _RANGE_LIST_ITERATOR { PLIST_ENTRY RangeListHead ; PLIST_ENTRY MergedHead ; PVOID Current ; ULONG Stamp ; } RTL_RANGE_LIST_ITERATOR , * PRTL_RANGE_LIST_ITERATOR ; #line 2960 __declspec(dllimport) void __stdcall RtlInitializeRangeList(PRTL_RANGE_LIST RangeList ) ; #line 2967 __declspec(dllimport) void __stdcall RtlFreeRangeList(PRTL_RANGE_LIST RangeList ) ; #line 2974 __declspec(dllimport) NTSTATUS __stdcall RtlCopyRangeList(PRTL_RANGE_LIST CopyRangeList , PRTL_RANGE_LIST RangeList ) ; #line 2985 __declspec(dllimport) NTSTATUS __stdcall RtlAddRange(PRTL_RANGE_LIST RangeList , ULONGLONG Start , ULONGLONG End , UCHAR Attributes , ULONG Flags , PVOID UserData , PVOID Owner ) ; #line 2998 __declspec(dllimport) NTSTATUS __stdcall RtlDeleteRange(PRTL_RANGE_LIST RangeList , ULONGLONG Start , ULONGLONG End , PVOID Owner ) ; #line 3008 __declspec(dllimport) NTSTATUS __stdcall RtlDeleteOwnersRanges(PRTL_RANGE_LIST RangeList , PVOID Owner ) ; #line 3019 typedef BOOLEAN ( * PRTL_CONFLICT_RANGE_CALLBACK )(PVOID Context , PRTL_RANGE Range ) ; #line 3026 __declspec(dllimport) NTSTATUS __stdcall RtlFindRange(PRTL_RANGE_LIST RangeList , ULONGLONG Minimum , ULONGLONG Maximum , ULONG Length , ULONG Alignment , ULONG Flags , UCHAR AttributeAvailableMask , PVOID Context , PRTL_CONFLICT_RANGE_CALLBACK Callback , PULONGLONG Start ) ; #line 3042 __declspec(dllimport) NTSTATUS __stdcall RtlIsRangeAvailable(PRTL_RANGE_LIST RangeList , ULONGLONG Start , ULONGLONG End , ULONG Flags , UCHAR AttributeAvailableMask , PVOID Context , PRTL_CONFLICT_RANGE_CALLBACK Callback , PBOOLEAN Available ) ; #line 3068 __declspec(dllimport) NTSTATUS __stdcall RtlGetFirstRange(PRTL_RANGE_LIST RangeList , PRTL_RANGE_LIST_ITERATOR Iterator , PRTL_RANGE * Range ) ; #line 3077 __declspec(dllimport) NTSTATUS __stdcall RtlGetLastRange(PRTL_RANGE_LIST RangeList , PRTL_RANGE_LIST_ITERATOR Iterator , PRTL_RANGE * Range ) ; #line 3086 __declspec(dllimport) NTSTATUS __stdcall RtlGetNextRange(PRTL_RANGE_LIST_ITERATOR Iterator , PRTL_RANGE * Range , BOOLEAN MoveForwards ) ; #line 3097 __declspec(dllimport) NTSTATUS __stdcall RtlMergeRangeLists(PRTL_RANGE_LIST MergedRangeList , PRTL_RANGE_LIST RangeList1 , PRTL_RANGE_LIST RangeList2 , ULONG Flags ) ; #line 3107 __declspec(dllimport) NTSTATUS __stdcall RtlInvertRangeList(PRTL_RANGE_LIST InvertedRangeList , PRTL_RANGE_LIST RangeList ) ; #line 3124 USHORT _fastcall RtlUshortByteSwap(USHORT Source ) ; #line 3130 ULONG _fastcall RtlUlongByteSwap(ULONG Source ) ; #line 3136 ULONGLONG _fastcall RtlUlonglongByteSwap(ULONGLONG Source ) ; #line 3147 __declspec(dllimport) NTSTATUS __stdcall RtlVolumeDeviceToDosName(PVOID VolumeDeviceObject , PUNICODE_STRING DosName ) ; #line 3155 typedef struct _OSVERSIONINFOA { ULONG dwOSVersionInfoSize ; ULONG dwMajorVersion ; ULONG dwMinorVersion ; ULONG dwBuildNumber ; ULONG dwPlatformId ; CHAR szCSDVersion[128] ; } OSVERSIONINFOA , * POSVERSIONINFOA , * LPOSVERSIONINFOA ; typedef struct _OSVERSIONINFOW { ULONG dwOSVersionInfoSize ; ULONG dwMajorVersion ; ULONG dwMinorVersion ; ULONG dwBuildNumber ; ULONG dwPlatformId ; WCHAR szCSDVersion[128] ; } OSVERSIONINFOW , * POSVERSIONINFOW , * LPOSVERSIONINFOW , RTL_OSVERSIONINFOW , * PRTL_OSVERSIONINFOW ; #line 3177 typedef OSVERSIONINFOA OSVERSIONINFO ; #line 3178 typedef POSVERSIONINFOA POSVERSIONINFO ; #line 3179 typedef LPOSVERSIONINFOA LPOSVERSIONINFO ; #line 3182 typedef struct _OSVERSIONINFOEXA { ULONG dwOSVersionInfoSize ; ULONG dwMajorVersion ; ULONG dwMinorVersion ; ULONG dwBuildNumber ; ULONG dwPlatformId ; CHAR szCSDVersion[128] ; USHORT wServicePackMajor ; USHORT wServicePackMinor ; USHORT wSuiteMask ; UCHAR wProductType ; UCHAR wReserved ; } OSVERSIONINFOEXA , * POSVERSIONINFOEXA , * LPOSVERSIONINFOEXA ; #line 3195 typedef struct _OSVERSIONINFOEXW { ULONG dwOSVersionInfoSize ; ULONG dwMajorVersion ; ULONG dwMinorVersion ; ULONG dwBuildNumber ; ULONG dwPlatformId ; WCHAR szCSDVersion[128] ; USHORT wServicePackMajor ; USHORT wServicePackMinor ; USHORT wSuiteMask ; UCHAR wProductType ; UCHAR wReserved ; } OSVERSIONINFOEXW , * POSVERSIONINFOEXW , * LPOSVERSIONINFOEXW , RTL_OSVERSIONINFOEXW , * PRTL_OSVERSIONINFOEXW ; #line 3213 typedef OSVERSIONINFOEXA OSVERSIONINFOEX ; #line 3214 typedef POSVERSIONINFOEXA POSVERSIONINFOEX ; #line 3215 typedef LPOSVERSIONINFOEXA LPOSVERSIONINFOEX ; #line 3275 ULONGLONG __stdcall VerSetConditionMask(ULONGLONG ConditionMask , ULONG TypeMask , UCHAR Condition ) ; #line 3286 __declspec(dllimport) NTSTATUS RtlGetVersion(PRTL_OSVERSIONINFOW lpVersionInformation ) ; #line 3292 __declspec(dllimport) NTSTATUS RtlVerifyVersionInfo(PRTL_OSVERSIONINFOEXW VersionInfo , ULONG TypeMask , ULONGLONG ConditionMask ) ; #line 3648 typedef struct _IO_STATUS_BLOCK { union { NTSTATUS Status ; PVOID Pointer ; } ; ULONG_PTR Information ; } IO_STATUS_BLOCK , * PIO_STATUS_BLOCK ; #line 3669 typedef void (__stdcall * PIO_APC_ROUTINE )(PVOID ApcContext , PIO_STATUS_BLOCK IoStatusBlock , ULONG Reserved ) ; #line 3685 typedef enum _FILE_INFORMATION_CLASS { FileDirectoryInformation = 1, FileFullDirectoryInformation, FileBothDirectoryInformation, FileBasicInformation, FileStandardInformation, FileInternalInformation, FileEaInformation, FileAccessInformation, FileNameInformation, FileRenameInformation, FileLinkInformation, FileNamesInformation, FileDispositionInformation, FilePositionInformation, FileFullEaInformation, FileModeInformation, FileAlignmentInformation, FileAllInformation, FileAllocationInformation, FileEndOfFileInformation, FileAlternateNameInformation, FileStreamInformation, FilePipeInformation, FilePipeLocalInformation, FilePipeRemoteInformation, FileMailslotQueryInformation, FileMailslotSetInformation, FileCompressionInformation, FileObjectIdInformation, FileCompletionInformation, FileMoveClusterInformation, FileQuotaInformation, FileReparsePointInformation, FileNetworkOpenInformation, FileAttributeTagInformation, FileTrackingInformation, FileMaximumInformation } FILE_INFORMATION_CLASS , * PFILE_INFORMATION_CLASS ; #line 3731 typedef struct _FILE_BASIC_INFORMATION { LARGE_INTEGER CreationTime ; LARGE_INTEGER LastAccessTime ; LARGE_INTEGER LastWriteTime ; LARGE_INTEGER ChangeTime ; ULONG FileAttributes ; } FILE_BASIC_INFORMATION , * PFILE_BASIC_INFORMATION ; typedef struct _FILE_STANDARD_INFORMATION { LARGE_INTEGER AllocationSize ; LARGE_INTEGER EndOfFile ; ULONG NumberOfLinks ; BOOLEAN DeletePending ; BOOLEAN Directory ; } FILE_STANDARD_INFORMATION , * PFILE_STANDARD_INFORMATION ; typedef struct _FILE_POSITION_INFORMATION { LARGE_INTEGER CurrentByteOffset ; } FILE_POSITION_INFORMATION , * PFILE_POSITION_INFORMATION ; typedef struct _FILE_ALIGNMENT_INFORMATION { ULONG AlignmentRequirement ; } FILE_ALIGNMENT_INFORMATION , * PFILE_ALIGNMENT_INFORMATION ; typedef struct _FILE_NAME_INFORMATION { ULONG FileNameLength ; WCHAR FileName[1] ; } FILE_NAME_INFORMATION , * PFILE_NAME_INFORMATION ; typedef struct _FILE_NETWORK_OPEN_INFORMATION { LARGE_INTEGER CreationTime ; LARGE_INTEGER LastAccessTime ; LARGE_INTEGER LastWriteTime ; LARGE_INTEGER ChangeTime ; LARGE_INTEGER AllocationSize ; LARGE_INTEGER EndOfFile ; ULONG FileAttributes ; } FILE_NETWORK_OPEN_INFORMATION , * PFILE_NETWORK_OPEN_INFORMATION ; typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION { ULONG FileAttributes ; ULONG ReparseTag ; } FILE_ATTRIBUTE_TAG_INFORMATION , * PFILE_ATTRIBUTE_TAG_INFORMATION ; typedef struct _FILE_DISPOSITION_INFORMATION { BOOLEAN DeleteFile ; } FILE_DISPOSITION_INFORMATION , * PFILE_DISPOSITION_INFORMATION ; typedef struct _FILE_END_OF_FILE_INFORMATION { LARGE_INTEGER EndOfFile ; } FILE_END_OF_FILE_INFORMATION , * PFILE_END_OF_FILE_INFORMATION ; #line 3784 typedef struct _FILE_FULL_EA_INFORMATION { ULONG NextEntryOffset ; UCHAR Flags ; UCHAR EaNameLength ; USHORT EaValueLength ; CHAR EaName[1] ; } FILE_FULL_EA_INFORMATION , * PFILE_FULL_EA_INFORMATION ; #line 3798 typedef enum _FSINFOCLASS { FileFsVolumeInformation = 1, FileFsLabelInformation, FileFsSizeInformation, FileFsDeviceInformation, FileFsAttributeInformation, FileFsControlInformation, FileFsFullSizeInformation, FileFsObjectIdInformation, FileFsMaximumInformation } FS_INFORMATION_CLASS , * PFS_INFORMATION_CLASS ; typedef struct _FILE_FS_DEVICE_INFORMATION { ULONG DeviceType ; ULONG Characteristics ; } FILE_FS_DEVICE_INFORMATION , * PFILE_FS_DEVICE_INFORMATION ; #line 3820 typedef union _FILE_SEGMENT_ELEMENT { PVOID64 Buffer ; ULONGLONG Alignment ; } FILE_SEGMENT_ELEMENT , * PFILE_SEGMENT_ELEMENT ; #line 3829 typedef enum _INTERFACE_TYPE { InterfaceTypeUndefined = - 1, Internal, Isa, Eisa, MicroChannel, TurboChannel, PCIBus, VMEBus, NuBus, PCMCIABus, CBus, MPIBus, MPSABus, ProcessorInternal, InternalPowerBus, PNPISABus, PNPBus, MaximumInterfaceType } INTERFACE_TYPE , * PINTERFACE_TYPE ; #line 3854 typedef enum _DMA_WIDTH { Width8Bits, Width16Bits, Width32Bits, MaximumDmaWidth } DMA_WIDTH , * PDMA_WIDTH ; #line 3865 typedef enum _DMA_SPEED { Compatible, TypeA, TypeB, TypeC, TypeF, MaximumDmaSpeed } DMA_SPEED , * PDMA_SPEED ; #line 3879 typedef void ( * PINTERFACE_REFERENCE )(PVOID Context ) ; #line 3880 typedef void ( * PINTERFACE_DEREFERENCE )(PVOID Context ) ; #line 3888 typedef enum _BUS_DATA_TYPE { ConfigurationSpaceUndefined = - 1, Cmos, EisaConfiguration, Pos, CbusConfiguration, PCIConfiguration, VMEConfiguration, NuBusConfiguration, PCMCIAConfiguration, MPIConfiguration, MPSAConfiguration, PNPISAConfiguration, SgiInternalConfiguration, MaximumBusDataType } BUS_DATA_TYPE , * PBUS_DATA_TYPE ; #line 3910 typedef struct _IO_ERROR_LOG_PACKET { UCHAR MajorFunctionCode ; UCHAR RetryCount ; USHORT DumpDataSize ; USHORT NumberOfStrings ; USHORT StringOffset ; USHORT EventCategory ; NTSTATUS ErrorCode ; ULONG UniqueErrorValue ; NTSTATUS FinalStatus ; ULONG SequenceNumber ; ULONG IoControlCode ; LARGE_INTEGER DeviceOffset ; ULONG DumpData[1] ; } IO_ERROR_LOG_PACKET , * PIO_ERROR_LOG_PACKET ; #line 3931 typedef struct _IO_ERROR_LOG_MESSAGE { USHORT Type ; USHORT Size ; USHORT DriverNameLength ; LARGE_INTEGER TimeStamp ; ULONG DriverNameOffset ; IO_ERROR_LOG_PACKET EntryData ; } IO_ERROR_LOG_MESSAGE , * PIO_ERROR_LOG_MESSAGE ; #line 4074 typedef struct _KEY_BASIC_INFORMATION { LARGE_INTEGER LastWriteTime ; ULONG TitleIndex ; ULONG NameLength ; WCHAR Name[1] ; } KEY_BASIC_INFORMATION , * PKEY_BASIC_INFORMATION ; typedef struct _KEY_NODE_INFORMATION { LARGE_INTEGER LastWriteTime ; ULONG TitleIndex ; ULONG ClassOffset ; ULONG ClassLength ; ULONG NameLength ; WCHAR Name[1] ; } KEY_NODE_INFORMATION , * PKEY_NODE_INFORMATION ; #line 4091 typedef struct _KEY_FULL_INFORMATION { LARGE_INTEGER LastWriteTime ; ULONG TitleIndex ; ULONG ClassOffset ; ULONG ClassLength ; ULONG SubKeys ; ULONG MaxNameLen ; ULONG MaxClassLen ; ULONG Values ; ULONG MaxValueNameLen ; ULONG MaxValueDataLen ; WCHAR Class[1] ; } KEY_FULL_INFORMATION , * PKEY_FULL_INFORMATION ; #line 4106 typedef struct _KEY_NAME_INFORMATION { ULONG NameLength ; WCHAR Name[1] ; } KEY_NAME_INFORMATION , * PKEY_NAME_INFORMATION ; #line 4112 typedef enum _KEY_INFORMATION_CLASS { KeyBasicInformation, KeyNodeInformation, KeyFullInformation, KeyNameInformation } KEY_INFORMATION_CLASS ; #line 4122 typedef struct _KEY_WRITE_TIME_INFORMATION { LARGE_INTEGER LastWriteTime ; } KEY_WRITE_TIME_INFORMATION , * PKEY_WRITE_TIME_INFORMATION ; typedef enum _KEY_SET_INFORMATION_CLASS { KeyWriteTimeInformation } KEY_SET_INFORMATION_CLASS ; #line 4134 typedef struct _KEY_VALUE_BASIC_INFORMATION { ULONG TitleIndex ; ULONG Type ; ULONG NameLength ; WCHAR Name[1] ; } KEY_VALUE_BASIC_INFORMATION , * PKEY_VALUE_BASIC_INFORMATION ; typedef struct _KEY_VALUE_FULL_INFORMATION { ULONG TitleIndex ; ULONG Type ; ULONG DataOffset ; ULONG DataLength ; ULONG NameLength ; WCHAR Name[1] ; } KEY_VALUE_FULL_INFORMATION , * PKEY_VALUE_FULL_INFORMATION ; #line 4151 typedef struct _KEY_VALUE_PARTIAL_INFORMATION { ULONG TitleIndex ; ULONG Type ; ULONG DataLength ; UCHAR Data[1] ; } KEY_VALUE_PARTIAL_INFORMATION , * PKEY_VALUE_PARTIAL_INFORMATION ; typedef struct _KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 { ULONG Type ; ULONG DataLength ; UCHAR Data[1] ; } KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 , * PKEY_VALUE_PARTIAL_INFORMATION_ALIGN64 ; #line 4164 typedef struct _KEY_VALUE_ENTRY { PUNICODE_STRING ValueName ; ULONG DataLength ; ULONG DataOffset ; ULONG Type ; } KEY_VALUE_ENTRY , * PKEY_VALUE_ENTRY ; typedef enum _KEY_VALUE_INFORMATION_CLASS { KeyValueBasicInformation, KeyValueFullInformation, KeyValuePartialInformation, KeyValueFullInformationAlign64, KeyValuePartialInformationAlign64 } KEY_VALUE_INFORMATION_CLASS ; #line 4210 typedef struct _OBJECT_NAME_INFORMATION { UNICODE_STRING Name ; } OBJECT_NAME_INFORMATION , * POBJECT_NAME_INFORMATION ; #line 4221 typedef enum _SECTION_INHERIT { ViewShare = 1, ViewUnmap = 2 } SECTION_INHERIT ; #line 4294 typedef struct _CLIENT_ID { HANDLE UniqueProcess ; HANDLE UniqueThread ; } CLIENT_ID ; #line 4298 typedef CLIENT_ID * PCLIENT_ID ; #line 4315 typedef struct _NT_TIB { struct _EXCEPTION_REGISTRATION_RECORD * ExceptionList ; PVOID StackBase ; PVOID StackLimit ; PVOID SubSystemTib ; union { PVOID FiberData ; ULONG Version ; } ; PVOID ArbitraryUserPointer ; struct _NT_TIB * Self ; } NT_TIB ; #line 4327 typedef NT_TIB * PNT_TIB ; #line 4332 typedef enum _PROCESSINFOCLASS { ProcessBasicInformation, ProcessQuotaLimits, ProcessIoCounters, ProcessVmCounters, ProcessTimes, ProcessBasePriority, ProcessRaisePriority, ProcessDebugPort, ProcessExceptionPort, ProcessAccessToken, ProcessLdtInformation, ProcessLdtSize, ProcessDefaultHardErrorMode, ProcessIoPortHandlers, ProcessPooledUsageAndLimits, ProcessWorkingSetWatch, ProcessUserModeIOPL, ProcessEnableAlignmentFaultFixup, ProcessPriorityClass, ProcessWx86Information, ProcessHandleCount, ProcessAffinityMask, ProcessPriorityBoost, ProcessDeviceMap, ProcessSessionInformation, ProcessForegroundInformation, ProcessWow64Information, MaxProcessInfoClass } PROCESSINFOCLASS ; #line 4366 typedef enum _THREADINFOCLASS { ThreadBasicInformation, ThreadTimes, ThreadPriority, ThreadBasePriority, ThreadAffinityMask, ThreadImpersonationToken, ThreadDescriptorTableEntry, ThreadEnableAlignmentFaultFixup, ThreadEventPair_Reusable, ThreadQuerySetWin32StartAddress, ThreadZeroTlsCell, ThreadPerformanceCount, ThreadAmILastThread, ThreadIdealProcessor, ThreadPriorityBoost, ThreadSetTlsArrayAddress, ThreadIsIoPending, ThreadHideFromDebugger, MaxThreadInfoClass } THREADINFOCLASS ; #line 4395 typedef struct _PROCESS_WS_WATCH_INFORMATION { PVOID FaultingPc ; PVOID FaultingVa ; } PROCESS_WS_WATCH_INFORMATION , * PPROCESS_WS_WATCH_INFORMATION ; #line 4405 typedef struct _PROCESS_BASIC_INFORMATION { NTSTATUS ExitStatus ; PPEB PebBaseAddress ; ULONG_PTR AffinityMask ; KPRIORITY BasePriority ; ULONG_PTR UniqueProcessId ; ULONG_PTR InheritedFromUniqueProcessId ; } PROCESS_BASIC_INFORMATION ; #line 4413 typedef PROCESS_BASIC_INFORMATION * PPROCESS_BASIC_INFORMATION ; #line 4422 typedef struct _PROCESS_DEVICEMAP_INFORMATION { union { struct { HANDLE DirectoryHandle ; } Set ; struct { ULONG DriveMap ; UCHAR DriveType[32] ; } Query ; } ; } PROCESS_DEVICEMAP_INFORMATION , * PPROCESS_DEVICEMAP_INFORMATION ; #line 4440 typedef struct _PROCESS_SESSION_INFORMATION { ULONG SessionId ; } PROCESS_SESSION_INFORMATION , * PPROCESS_SESSION_INFORMATION ; #line 4454 typedef struct _QUOTA_LIMITS { SIZE_T PagedPoolLimit ; SIZE_T NonPagedPoolLimit ; SIZE_T MinimumWorkingSetSize ; SIZE_T MaximumWorkingSetSize ; SIZE_T PagefileLimit ; LARGE_INTEGER TimeLimit ; } QUOTA_LIMITS ; #line 4462 typedef QUOTA_LIMITS * PQUOTA_LIMITS ; #line 4472 typedef struct _IO_COUNTERS { ULONGLONG ReadOperationCount ; ULONGLONG WriteOperationCount ; ULONGLONG OtherOperationCount ; ULONGLONG ReadTransferCount ; ULONGLONG WriteTransferCount ; ULONGLONG OtherTransferCount ; } IO_COUNTERS ; #line 4480 typedef IO_COUNTERS * PIO_COUNTERS ; #line 4488 typedef struct _VM_COUNTERS { SIZE_T PeakVirtualSize ; SIZE_T VirtualSize ; ULONG PageFaultCount ; SIZE_T PeakWorkingSetSize ; SIZE_T WorkingSetSize ; SIZE_T QuotaPeakPagedPoolUsage ; SIZE_T QuotaPagedPoolUsage ; SIZE_T QuotaPeakNonPagedPoolUsage ; SIZE_T QuotaNonPagedPoolUsage ; SIZE_T PagefileUsage ; SIZE_T PeakPagefileUsage ; } VM_COUNTERS ; #line 4501 typedef VM_COUNTERS * PVM_COUNTERS ; #line 4508 typedef struct _POOLED_USAGE_AND_LIMITS { SIZE_T PeakPagedPoolUsage ; SIZE_T PagedPoolUsage ; SIZE_T PagedPoolLimit ; SIZE_T PeakNonPagedPoolUsage ; SIZE_T NonPagedPoolUsage ; SIZE_T NonPagedPoolLimit ; SIZE_T PeakPagefileUsage ; SIZE_T PagefileUsage ; SIZE_T PagefileLimit ; } POOLED_USAGE_AND_LIMITS ; #line 4519 typedef POOLED_USAGE_AND_LIMITS * PPOOLED_USAGE_AND_LIMITS ; #line 4528 typedef struct _PROCESS_ACCESS_TOKEN { HANDLE Token ; HANDLE Thread ; } PROCESS_ACCESS_TOKEN , * PPROCESS_ACCESS_TOKEN ; #line 4555 typedef struct _KERNEL_USER_TIMES { LARGE_INTEGER CreateTime ; LARGE_INTEGER ExitTime ; LARGE_INTEGER KernelTime ; LARGE_INTEGER UserTime ; } KERNEL_USER_TIMES ; #line 4561 typedef KERNEL_USER_TIMES * PKERNEL_USER_TIMES ; #line 4562 __declspec(dllimport) NTSTATUS __stdcall NtOpenProcess(PHANDLE ProcessHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes , PCLIENT_ID ClientId ) ; #line 4572 __declspec(dllimport) NTSTATUS __stdcall NtQueryInformationProcess(HANDLE ProcessHandle , PROCESSINFOCLASS ProcessInformationClass , PVOID ProcessInformation , ULONG ProcessInformationLength , PULONG ReturnLength ) ; #line 4587 typedef enum _SYSTEM_POWER_STATE { PowerSystemUnspecified = 0, PowerSystemWorking, PowerSystemSleeping1, PowerSystemSleeping2, PowerSystemSleeping3, PowerSystemHibernate, PowerSystemShutdown, PowerSystemMaximum } SYSTEM_POWER_STATE , * PSYSTEM_POWER_STATE ; typedef enum { PowerActionNone = 0, PowerActionReserved, PowerActionSleep, PowerActionHibernate, PowerActionShutdown, PowerActionShutdownReset, PowerActionShutdownOff, PowerActionWarmEject } POWER_ACTION , * PPOWER_ACTION ; typedef enum _DEVICE_POWER_STATE { PowerDeviceUnspecified = 0, PowerDeviceD0, PowerDeviceD1, PowerDeviceD2, PowerDeviceD3, PowerDeviceMaximum } DEVICE_POWER_STATE , * PDEVICE_POWER_STATE ; typedef union _POWER_STATE { SYSTEM_POWER_STATE SystemState ; DEVICE_POWER_STATE DeviceState ; } POWER_STATE , * PPOWER_STATE ; typedef enum _POWER_STATE_TYPE { SystemPowerState = 0, DevicePowerState } POWER_STATE_TYPE , * PPOWER_STATE_TYPE ; #line 4654 typedef ULONG EXECUTION_STATE ; typedef enum { LT_DONT_CARE, LT_LOWEST_LATENCY } LATENCY_TIME ; #line 4663 typedef enum { SystemPowerPolicyAc, SystemPowerPolicyDc, VerifySystemPolicyAc, VerifySystemPolicyDc, SystemPowerCapabilities, SystemBatteryState, SystemPowerStateHandler, ProcessorStateHandler, SystemPowerPolicyCurrent, AdministratorPowerPolicy, SystemReserveHiberFile, ProcessorInformation, SystemPowerInformation } POWER_INFORMATION_LEVEL ; #line 4690 typedef ULONG PFN_COUNT ; typedef LONG SPFN_NUMBER , * PSPFN_NUMBER ; #line 4693 typedef ULONG PFN_NUMBER , * PPFN_NUMBER ; #line 4719 typedef union _MCI_STATS { struct { USHORT McaCod ; USHORT MsCod ; ULONG OtherInfo : 25; ULONG Damage : 1; ULONG AddressValid : 1; ULONG MiscValid : 1; ULONG Enabled : 1; ULONG UnCorrected : 1; ULONG OverFlow : 1; ULONG Valid : 1; } MciStats ; ULONGLONG QuadPart ; } MCI_STATS , * PMCI_STATS ; #line 4768 __declspec(dllimport) UCHAR READ_REGISTER_UCHAR(PUCHAR Register ) ; #line 4774 __declspec(dllimport) USHORT READ_REGISTER_USHORT(PUSHORT Register ) ; #line 4780 __declspec(dllimport) ULONG READ_REGISTER_ULONG(PULONG Register ) ; #line 4786 __declspec(dllimport) void READ_REGISTER_BUFFER_UCHAR(PUCHAR Register , PUCHAR Buffer , ULONG Count ) ; #line 4794 __declspec(dllimport) void READ_REGISTER_BUFFER_USHORT(PUSHORT Register , PUSHORT Buffer , ULONG Count ) ; #line 4802 __declspec(dllimport) void READ_REGISTER_BUFFER_ULONG(PULONG Register , PULONG Buffer , ULONG Count ) ; #line 4811 __declspec(dllimport) void WRITE_REGISTER_UCHAR(PUCHAR Register , UCHAR Value ) ; #line 4818 __declspec(dllimport) void WRITE_REGISTER_USHORT(PUSHORT Register , USHORT Value ) ; #line 4825 __declspec(dllimport) void WRITE_REGISTER_ULONG(PULONG Register , ULONG Value ) ; #line 4832 __declspec(dllimport) void WRITE_REGISTER_BUFFER_UCHAR(PUCHAR Register , PUCHAR Buffer , ULONG Count ) ; #line 4840 __declspec(dllimport) void WRITE_REGISTER_BUFFER_USHORT(PUSHORT Register , PUSHORT Buffer , ULONG Count ) ; #line 4848 __declspec(dllimport) void WRITE_REGISTER_BUFFER_ULONG(PULONG Register , PULONG Buffer , ULONG Count ) ; #line 4856 __declspec(dllimport) UCHAR READ_PORT_UCHAR(PUCHAR Port ) ; #line 4862 __declspec(dllimport) USHORT READ_PORT_USHORT(PUSHORT Port ) ; #line 4868 __declspec(dllimport) ULONG READ_PORT_ULONG(PULONG Port ) ; #line 4874 __declspec(dllimport) void READ_PORT_BUFFER_UCHAR(PUCHAR Port , PUCHAR Buffer , ULONG Count ) ; #line 4882 __declspec(dllimport) void READ_PORT_BUFFER_USHORT(PUSHORT Port , PUSHORT Buffer , ULONG Count ) ; #line 4890 __declspec(dllimport) void READ_PORT_BUFFER_ULONG(PULONG Port , PULONG Buffer , ULONG Count ) ; #line 4898 __declspec(dllimport) void WRITE_PORT_UCHAR(PUCHAR Port , UCHAR Value ) ; #line 4905 __declspec(dllimport) void WRITE_PORT_USHORT(PUSHORT Port , USHORT Value ) ; #line 4912 __declspec(dllimport) void WRITE_PORT_ULONG(PULONG Port , ULONG Value ) ; #line 4919 __declspec(dllimport) void WRITE_PORT_BUFFER_UCHAR(PUCHAR Port , PUCHAR Buffer , ULONG Count ) ; #line 4927 __declspec(dllimport) void WRITE_PORT_BUFFER_USHORT(PUSHORT Port , PUSHORT Buffer , ULONG Count ) ; #line 4935 __declspec(dllimport) void WRITE_PORT_BUFFER_ULONG(PULONG Port , PULONG Buffer , ULONG Count ) ; #line 4978 typedef struct _KPCR { NT_TIB NtTib ; struct _KPCR * SelfPcr ; struct _KPRCB * Prcb ; KIRQL Irql ; ULONG IRR ; ULONG IrrActive ; ULONG IDR ; ULONG Reserved2 ; struct _KIDTENTRY * IDT ; struct _KGDTENTRY * GDT ; struct _KTSS * TSS ; USHORT MajorVersion ; USHORT MinorVersion ; KAFFINITY SetMember ; ULONG StallScaleFactor ; UCHAR DebugActive ; UCHAR Number ; } KPCR ; #line 5006 typedef KPCR * PKPCR ; #line 5012 typedef struct _KFLOATING_SAVE { ULONG ControlWord ; ULONG StatusWord ; ULONG ErrorOffset ; ULONG ErrorSelector ; ULONG DataOffset ; ULONG DataSelector ; ULONG Cr0NpxState ; ULONG Spare1 ; } KFLOATING_SAVE , * PKFLOATING_SAVE ; #line 5069 extern PVOID * MmHighestUserAddress ; extern PVOID * MmSystemRangeStart ; extern ULONG * MmUserProbeAddress ; #line 5153 typedef enum _INTERLOCKED_RESULT { ResultNegative = 0x8000 & ~ 0x4000 & (0x8000 | 0x4000), ResultZero = ~ 0x8000 & 0x4000 & (0x8000 | 0x4000), ResultPositive = ~ 0x8000 & ~ 0x4000 & (0x8000 | 0x4000) } INTERLOCKED_RESULT ; __declspec(dllimport) INTERLOCKED_RESULT _fastcall Exfi386InterlockedIncrementLong(PLONG Addend ) ; #line 5166 __declspec(dllimport) INTERLOCKED_RESULT _fastcall Exfi386InterlockedDecrementLong(PLONG Addend ) ; #line 5173 __declspec(dllimport) LARGE_INTEGER ExInterlockedExchangeAddLargeInteger(PLARGE_INTEGER Addend , LARGE_INTEGER Increment , PKSPIN_LOCK Lock ) ; #line 5181 __declspec(dllimport) ULONG _fastcall Exfi386InterlockedExchangeUlong(PULONG Target , ULONG Value ) ; #line 5197 __declspec(dllimport) LONG _fastcall InterlockedIncrement(PLONG Addend ) ; #line 5204 __declspec(dllimport) LONG _fastcall InterlockedDecrement(PLONG Addend ) ; #line 5211 __declspec(dllimport) LONG _fastcall InterlockedExchange(PLONG Target , LONG Value ) ; #line 5222 LONG _fastcall InterlockedExchangeAdd(PLONG Addend , LONG Increment ) ; #line 5229 __declspec(dllimport) LONG _fastcall InterlockedCompareExchange(PLONG Destination , LONG ExChange , LONG Comperand ) ; #line 5252 #pragma warning(disable:4035) #line 5262 __declspec(dllimport) KIRQL KeGetCurrentIrql() ; #line 5271 __inline ULONG KeGetCurrentProcessorNumber(void ) { __asm { movzx eax, fs:[0] KPCR.Number }; } #line 5280 __declspec(dllimport) NTSTATUS __stdcall KeSaveFloatingPointState(PKFLOATING_SAVE FloatSave ) ; #line 5287 __declspec(dllimport) NTSTATUS __stdcall KeRestoreFloatingPointState(PKFLOATING_SAVE FloatSave ) ; #line 6994 typedef struct _KSYSTEM_TIME { ULONG LowPart ; LONG High1Time ; LONG High2Time ; } KSYSTEM_TIME , * PKSYSTEM_TIME ; #line 7014 #pragma warning(push) #pragma warning(disable:4164) #line 7019 #pragma function(_enable) #line 7020 #pragma function(_disable) #line 7024 #pragma warning(pop) #line 7085 typedef struct _FLOATING_SAVE_AREA { ULONG ControlWord ; ULONG StatusWord ; ULONG TagWord ; ULONG ErrorOffset ; ULONG ErrorSelector ; ULONG DataOffset ; ULONG DataSelector ; UCHAR RegisterArea[80] ; ULONG Cr0NpxState ; } FLOATING_SAVE_AREA ; typedef FLOATING_SAVE_AREA * PFLOATING_SAVE_AREA ; #line 7109 typedef struct _CONTEXT { ULONG ContextFlags ; ULONG Dr0 ; ULONG Dr1 ; ULONG Dr2 ; ULONG Dr3 ; ULONG Dr6 ; ULONG Dr7 ; FLOATING_SAVE_AREA FloatSave ; ULONG SegGs ; ULONG SegFs ; ULONG SegEs ; ULONG SegDs ; ULONG Edi ; ULONG Esi ; ULONG Ebx ; ULONG Edx ; ULONG Ecx ; ULONG Eax ; ULONG Ebp ; ULONG Eip ; ULONG SegCs ; ULONG EFlags ; ULONG Esp ; ULONG SegSs ; UCHAR ExtendedRegisters[512] ; } CONTEXT ; #line 7197 typedef CONTEXT * PCONTEXT ; #line 7826 typedef void ( * PTIMER_APC_ROUTINE )(PVOID TimerContext , ULONG TimerLowValue , LONG TimerHighValue ) ; #line 7850 typedef enum _ALTERNATIVE_ARCHITECTURE_TYPE { StandardDesign, NEC98x86, EndAlternatives } ALTERNATIVE_ARCHITECTURE_TYPE ; #line 7899 typedef struct _KUSER_SHARED_DATA { volatile ULONG TickCountLow ; ULONG TickCountMultiplier ; volatile KSYSTEM_TIME InterruptTime ; volatile KSYSTEM_TIME SystemTime ; volatile KSYSTEM_TIME TimeZoneBias ; USHORT ImageNumberLow ; USHORT ImageNumberHigh ; WCHAR NtSystemRoot[260] ; ULONG MaxStackTraceDepth ; ULONG CryptoExponent ; ULONG TimeZoneId ; ULONG Reserved2[8] ; NT_PRODUCT_TYPE NtProductType ; BOOLEAN ProductTypeIsValid ; ULONG NtMajorVersion ; ULONG NtMinorVersion ; BOOLEAN ProcessorFeatures[64] ; ULONG Reserved1 ; ULONG Reserved3 ; volatile ULONG TimeSlip ; ALTERNATIVE_ARCHITECTURE_TYPE AlternativeArchitecture ; LARGE_INTEGER SystemExpirationDate ; ULONG SuiteMask ; BOOLEAN KdDebuggerEnabled ; } KUSER_SHARED_DATA , * PKUSER_SHARED_DATA ; #line 8123 typedef enum _CM_SERVICE_NODE_TYPE { DriverType = 0x00000001, FileSystemType = 0x00000002, Win32ServiceOwnProcess = 0x00000010, Win32ServiceShareProcess = 0x00000020, AdapterType = 0x00000004, RecognizerType = 0x00000008 } SERVICE_NODE_TYPE ; typedef enum _CM_SERVICE_LOAD_TYPE { BootLoad = 0x00000000, SystemLoad = 0x00000001, AutoLoad = 0x00000002, DemandLoad = 0x00000003, DisableLoad = 0x00000004 } SERVICE_LOAD_TYPE ; typedef enum _CM_ERROR_CONTROL_TYPE { IgnoreError = 0x00000000, NormalError = 0x00000001, SevereError = 0x00000002, CriticalError = 0x00000003 } SERVICE_ERROR_TYPE ; #line 8172 typedef int CM_RESOURCE_TYPE ; #line 8198 typedef enum _CM_SHARE_DISPOSITION { CmResourceShareUndetermined = 0, CmResourceShareDeviceExclusive, CmResourceShareDriverExclusive, CmResourceShareShared } CM_SHARE_DISPOSITION ; #line 8211 typedef PVOID PASSIGNED_RESOURCE ; #line 24 "C:/NTDDK/inc/pshpack4.h" #pragma warning(disable:4103) #pragma pack(push, 4) #line 8309 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR { UCHAR Type ; UCHAR ShareDisposition ; USHORT Flags ; union { struct { PHYSICAL_ADDRESS Start ; ULONG Length ; } Generic ; struct { PHYSICAL_ADDRESS Start ; ULONG Length ; } Port ; struct { ULONG Level ; ULONG Vector ; ULONG Affinity ; } Interrupt ; struct { PHYSICAL_ADDRESS Start ; ULONG Length ; } Memory ; struct { ULONG Channel ; ULONG Port ; ULONG Reserved1 ; } Dma ; struct { ULONG Data[3] ; } DevicePrivate ; struct { ULONG Start ; ULONG Length ; ULONG Reserved ; } BusNumber ; struct { ULONG DataSize ; ULONG Reserved1 ; ULONG Reserved2 ; } DeviceSpecificData ; } u ; } CM_PARTIAL_RESOURCE_DESCRIPTOR , * PCM_PARTIAL_RESOURCE_DESCRIPTOR ; #line 27 "C:/NTDDK/inc/poppack.h" #pragma warning(disable:4103) #pragma pack(pop) #line 8419 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _CM_PARTIAL_RESOURCE_LIST { USHORT Version ; USHORT Revision ; ULONG Count ; CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1] ; } CM_PARTIAL_RESOURCE_LIST , * PCM_PARTIAL_RESOURCE_LIST ; #line 8443 typedef struct _CM_FULL_RESOURCE_DESCRIPTOR { INTERFACE_TYPE InterfaceType ; ULONG BusNumber ; CM_PARTIAL_RESOURCE_LIST PartialResourceList ; } CM_FULL_RESOURCE_DESCRIPTOR , * PCM_FULL_RESOURCE_DESCRIPTOR ; #line 8454 typedef struct _CM_RESOURCE_LIST { ULONG Count ; CM_FULL_RESOURCE_DESCRIPTOR List[1] ; } CM_RESOURCE_LIST , * PCM_RESOURCE_LIST ; #line 8471 typedef struct _DEVICE_FLAGS { ULONG Failed : 1; ULONG ReadOnly : 1; ULONG Removable : 1; ULONG ConsoleIn : 1; ULONG ConsoleOut : 1; ULONG Input : 1; ULONG Output : 1; } DEVICE_FLAGS , * PDEVICE_FLAGS ; #line 8485 typedef struct _CM_COMPONENT_INFORMATION { DEVICE_FLAGS Flags ; ULONG Version ; ULONG Key ; ULONG AffinityMask ; } CM_COMPONENT_INFORMATION , * PCM_COMPONENT_INFORMATION ; #line 8503 typedef struct _CM_ROM_BLOCK { ULONG Address ; ULONG Size ; } CM_ROM_BLOCK , * PCM_ROM_BLOCK ; #line 24 "C:/NTDDK/inc/pshpack1.h" #pragma warning(disable:4103) #pragma pack(push, 1) #line 8518 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _CM_INT13_DRIVE_PARAMETER { USHORT DriveSelect ; ULONG MaxCylinders ; USHORT SectorsPerTrack ; USHORT MaxHeads ; USHORT NumberDrives ; } CM_INT13_DRIVE_PARAMETER , * PCM_INT13_DRIVE_PARAMETER ; #line 8532 typedef struct _CM_MCA_POS_DATA { USHORT AdapterId ; UCHAR PosData1 ; UCHAR PosData2 ; UCHAR PosData3 ; UCHAR PosData4 ; } CM_MCA_POS_DATA , * PCM_MCA_POS_DATA ; #line 8544 typedef struct _EISA_MEMORY_TYPE { UCHAR ReadWrite : 1; UCHAR Cached : 1; UCHAR Reserved0 : 1; UCHAR Type : 2; UCHAR Shared : 1; UCHAR Reserved1 : 1; UCHAR MoreEntries : 1; } EISA_MEMORY_TYPE , * PEISA_MEMORY_TYPE ; typedef struct _EISA_MEMORY_CONFIGURATION { EISA_MEMORY_TYPE ConfigurationByte ; UCHAR DataSize ; USHORT AddressLowWord ; UCHAR AddressHighByte ; USHORT MemorySize ; } EISA_MEMORY_CONFIGURATION , * PEISA_MEMORY_CONFIGURATION ; #line 8567 typedef struct _EISA_IRQ_DESCRIPTOR { UCHAR Interrupt : 4; UCHAR Reserved : 1; UCHAR LevelTriggered : 1; UCHAR Shared : 1; UCHAR MoreEntries : 1; } EISA_IRQ_DESCRIPTOR , * PEISA_IRQ_DESCRIPTOR ; typedef struct _EISA_IRQ_CONFIGURATION { EISA_IRQ_DESCRIPTOR ConfigurationByte ; UCHAR Reserved ; } EISA_IRQ_CONFIGURATION , * PEISA_IRQ_CONFIGURATION ; #line 8585 typedef struct _DMA_CONFIGURATION_BYTE0 { UCHAR Channel : 3; UCHAR Reserved : 3; UCHAR Shared : 1; UCHAR MoreEntries : 1; } DMA_CONFIGURATION_BYTE0 ; typedef struct _DMA_CONFIGURATION_BYTE1 { UCHAR Reserved0 : 2; UCHAR TransferSize : 2; UCHAR Timing : 2; UCHAR Reserved1 : 2; } DMA_CONFIGURATION_BYTE1 ; typedef struct _EISA_DMA_CONFIGURATION { DMA_CONFIGURATION_BYTE0 ConfigurationByte0 ; DMA_CONFIGURATION_BYTE1 ConfigurationByte1 ; } EISA_DMA_CONFIGURATION , * PEISA_DMA_CONFIGURATION ; #line 8609 typedef struct _EISA_PORT_DESCRIPTOR { UCHAR NumberPorts : 5; UCHAR Reserved : 1; UCHAR Shared : 1; UCHAR MoreEntries : 1; } EISA_PORT_DESCRIPTOR , * PEISA_PORT_DESCRIPTOR ; typedef struct _EISA_PORT_CONFIGURATION { EISA_PORT_DESCRIPTOR Configuration ; USHORT PortAddress ; } EISA_PORT_CONFIGURATION , * PEISA_PORT_CONFIGURATION ; #line 8628 typedef struct _CM_EISA_SLOT_INFORMATION { UCHAR ReturnCode ; UCHAR ReturnFlags ; UCHAR MajorRevision ; UCHAR MinorRevision ; USHORT Checksum ; UCHAR NumberFunctions ; UCHAR FunctionInformation ; ULONG CompressedId ; } CM_EISA_SLOT_INFORMATION , * PCM_EISA_SLOT_INFORMATION ; #line 8644 typedef struct _CM_EISA_FUNCTION_INFORMATION { ULONG CompressedId ; UCHAR IdSlotFlags1 ; UCHAR IdSlotFlags2 ; UCHAR MinorRevision ; UCHAR MajorRevision ; UCHAR Selections[26] ; UCHAR FunctionFlags ; UCHAR TypeString[80] ; EISA_MEMORY_CONFIGURATION EisaMemory[9] ; EISA_IRQ_CONFIGURATION EisaIrq[7] ; EISA_DMA_CONFIGURATION EisaDma[4] ; EISA_PORT_CONFIGURATION EisaPort[20] ; UCHAR InitializationData[60] ; } CM_EISA_FUNCTION_INFORMATION , * PCM_EISA_FUNCTION_INFORMATION ; #line 8678 typedef struct _CM_PNP_BIOS_DEVICE_NODE { USHORT Size ; UCHAR Node ; ULONG ProductId ; UCHAR DeviceType[3] ; USHORT DeviceAttributes ; } CM_PNP_BIOS_DEVICE_NODE , * PCM_PNP_BIOS_DEVICE_NODE ; #line 8692 typedef struct _CM_PNP_BIOS_INSTALLATION_CHECK { UCHAR Signature[4] ; UCHAR Revision ; UCHAR Length ; USHORT ControlField ; UCHAR Checksum ; ULONG EventFlagAddress ; USHORT RealModeEntryOffset ; USHORT RealModeEntrySegment ; USHORT ProtectedModeEntryOffset ; ULONG ProtectedModeCodeBaseAddress ; ULONG OemDeviceId ; USHORT RealModeDataBaseAddress ; ULONG ProtectedModeDataBaseAddress ; } CM_PNP_BIOS_INSTALLATION_CHECK , * PCM_PNP_BIOS_INSTALLATION_CHECK ; #line 27 "C:/NTDDK/inc/poppack.h" #pragma warning(disable:4103) #pragma pack(pop) #line 8761 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _CM_SCSI_DEVICE_DATA { USHORT Version ; USHORT Revision ; UCHAR HostIdentifier ; } CM_SCSI_DEVICE_DATA , * PCM_SCSI_DEVICE_DATA ; #line 8775 typedef struct _CM_VIDEO_DEVICE_DATA { USHORT Version ; USHORT Revision ; ULONG VideoClock ; } CM_VIDEO_DEVICE_DATA , * PCM_VIDEO_DEVICE_DATA ; #line 8785 typedef struct _CM_SONIC_DEVICE_DATA { USHORT Version ; USHORT Revision ; USHORT DataConfigurationRegister ; UCHAR EthernetAddress[8] ; } CM_SONIC_DEVICE_DATA , * PCM_SONIC_DEVICE_DATA ; #line 8796 typedef struct _CM_SERIAL_DEVICE_DATA { USHORT Version ; USHORT Revision ; ULONG BaudClock ; } CM_SERIAL_DEVICE_DATA , * PCM_SERIAL_DEVICE_DATA ; #line 8810 typedef struct _CM_MONITOR_DEVICE_DATA { USHORT Version ; USHORT Revision ; USHORT HorizontalScreenSize ; USHORT VerticalScreenSize ; USHORT HorizontalResolution ; USHORT VerticalResolution ; USHORT HorizontalDisplayTimeLow ; USHORT HorizontalDisplayTime ; USHORT HorizontalDisplayTimeHigh ; USHORT HorizontalBackPorchLow ; USHORT HorizontalBackPorch ; USHORT HorizontalBackPorchHigh ; USHORT HorizontalFrontPorchLow ; USHORT HorizontalFrontPorch ; USHORT HorizontalFrontPorchHigh ; USHORT HorizontalSyncLow ; USHORT HorizontalSync ; USHORT HorizontalSyncHigh ; USHORT VerticalBackPorchLow ; USHORT VerticalBackPorch ; USHORT VerticalBackPorchHigh ; USHORT VerticalFrontPorchLow ; USHORT VerticalFrontPorch ; USHORT VerticalFrontPorchHigh ; USHORT VerticalSyncLow ; USHORT VerticalSync ; USHORT VerticalSyncHigh ; } CM_MONITOR_DEVICE_DATA , * PCM_MONITOR_DEVICE_DATA ; #line 8844 typedef struct _CM_FLOPPY_DEVICE_DATA { USHORT Version ; USHORT Revision ; CHAR Size[8] ; ULONG MaxDensity ; ULONG MountDensity ; UCHAR StepRateHeadUnloadTime ; UCHAR HeadLoadTime ; UCHAR MotorOffTime ; UCHAR SectorLengthCode ; UCHAR SectorPerTrack ; UCHAR ReadWriteGapLength ; UCHAR DataTransferLength ; UCHAR FormatGapLength ; UCHAR FormatFillCharacter ; UCHAR HeadSettleTime ; UCHAR MotorSettleTime ; UCHAR MaximumTrackValue ; UCHAR DataTransferRate ; } CM_FLOPPY_DEVICE_DATA , * PCM_FLOPPY_DEVICE_DATA ; #line 8881 typedef struct _CM_KEYBOARD_DEVICE_DATA { USHORT Version ; USHORT Revision ; UCHAR Type ; UCHAR Subtype ; USHORT KeyboardFlags ; } CM_KEYBOARD_DEVICE_DATA , * PCM_KEYBOARD_DEVICE_DATA ; #line 8893 typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA { ULONG BytesPerSector ; ULONG NumberOfCylinders ; ULONG SectorsPerTrack ; ULONG NumberOfHeads ; } CM_DISK_GEOMETRY_DEVICE_DATA , * PCM_DISK_GEOMETRY_DEVICE_DATA ; #line 8905 typedef struct _CM_PCCARD_DEVICE_DATA { UCHAR Flags ; UCHAR ErrorCode ; USHORT Reserved ; ULONG BusData ; ULONG DeviceId ; ULONG LegacyBaseAddress ; UCHAR IRQMap[16] ; } CM_PCCARD_DEVICE_DATA , * PCM_PCCARD_DEVICE_DATA ; #line 8944 typedef struct _IO_RESOURCE_DESCRIPTOR { UCHAR Option ; UCHAR Type ; UCHAR ShareDisposition ; UCHAR Spare1 ; USHORT Flags ; USHORT Spare2 ; union { struct { ULONG Length ; ULONG Alignment ; PHYSICAL_ADDRESS MinimumAddress ; PHYSICAL_ADDRESS MaximumAddress ; } Port ; struct { ULONG Length ; ULONG Alignment ; PHYSICAL_ADDRESS MinimumAddress ; PHYSICAL_ADDRESS MaximumAddress ; } Memory ; struct { ULONG MinimumVector ; ULONG MaximumVector ; } Interrupt ; struct { ULONG MinimumChannel ; ULONG MaximumChannel ; } Dma ; struct { ULONG Length ; ULONG Alignment ; PHYSICAL_ADDRESS MinimumAddress ; PHYSICAL_ADDRESS MaximumAddress ; } Generic ; struct { ULONG Data[3] ; } DevicePrivate ; struct { ULONG Length ; ULONG MinBusNumber ; ULONG MaxBusNumber ; ULONG Reserved ; } BusNumber ; struct { PASSIGNED_RESOURCE AssignedResource ; } AssignedResource ; struct { UCHAR Type ; UCHAR Reserved[3] ; PASSIGNED_RESOURCE AssignedResource ; PHYSICAL_ADDRESS Transformation ; } SubAllocateFrom ; struct { ULONG Priority ; ULONG Reserved1 ; ULONG Reserved2 ; } ConfigData ; } u ; } IO_RESOURCE_DESCRIPTOR , * PIO_RESOURCE_DESCRIPTOR ; #line 9027 typedef struct _IO_RESOURCE_LIST { USHORT Version ; USHORT Revision ; ULONG Count ; IO_RESOURCE_DESCRIPTOR Descriptors[1] ; } IO_RESOURCE_LIST , * PIO_RESOURCE_LIST ; #line 9036 typedef struct _IO_RESOURCE_REQUIREMENTS_LIST { ULONG ListSize ; INTERFACE_TYPE InterfaceType ; ULONG BusNumber ; ULONG SlotNumber ; ULONG Reserved[3] ; ULONG AlternativeLists ; IO_RESOURCE_LIST List[1] ; } IO_RESOURCE_REQUIREMENTS_LIST , * PIO_RESOURCE_REQUIREMENTS_LIST ; #line 9065 typedef struct _EXCEPTION_RECORD { NTSTATUS ExceptionCode ; ULONG ExceptionFlags ; struct _EXCEPTION_RECORD * ExceptionRecord ; PVOID ExceptionAddress ; ULONG NumberParameters ; ULONG_PTR ExceptionInformation[15] ; } EXCEPTION_RECORD ; typedef EXCEPTION_RECORD * PEXCEPTION_RECORD ; typedef struct _EXCEPTION_RECORD32 { NTSTATUS ExceptionCode ; ULONG ExceptionFlags ; ULONG ExceptionRecord ; ULONG ExceptionAddress ; ULONG NumberParameters ; ULONG ExceptionInformation[15] ; } EXCEPTION_RECORD32 , * PEXCEPTION_RECORD32 ; typedef struct _EXCEPTION_RECORD64 { NTSTATUS ExceptionCode ; ULONG ExceptionFlags ; ULONG64 ExceptionRecord ; ULONG64 ExceptionAddress ; ULONG NumberParameters ; ULONG __unusedAlignment ; ULONG64 ExceptionInformation[15] ; } EXCEPTION_RECORD64 , * PEXCEPTION_RECORD64 ; #line 9099 typedef struct _EXCEPTION_POINTERS { PEXCEPTION_RECORD ExceptionRecord ; PCONTEXT ContextRecord ; } EXCEPTION_POINTERS , * PEXCEPTION_POINTERS ; #line 9111 typedef enum _CONFIGURATION_TYPE { ArcSystem, CentralProcessor, FloatingPointProcessor, PrimaryIcache, PrimaryDcache, SecondaryIcache, SecondaryDcache, SecondaryCache, EisaAdapter, TcAdapter, ScsiAdapter, DtiAdapter, MultiFunctionAdapter, DiskController, TapeController, CdromController, WormController, SerialController, NetworkController, DisplayController, ParallelController, PointerController, KeyboardController, AudioController, OtherController, DiskPeripheral, FloppyDiskPeripheral, TapePeripheral, ModemPeripheral, MonitorPeripheral, PrinterPeripheral, PointerPeripheral, KeyboardPeripheral, TerminalPeripheral, OtherPeripheral, LinePeripheral, NetworkPeripheral, SystemMemory, DockingInformation, RealModeIrqRoutingTable, MaximumType } CONFIGURATION_TYPE , * PCONFIGURATION_TYPE ; #line 9161 typedef enum _KINTERRUPT_MODE { LevelSensitive, Latched } KINTERRUPT_MODE ; #line 9170 typedef enum _KWAIT_REASON { Executive, FreePage, PageIn, PoolAllocation, DelayExecution, Suspended, UserRequest, WrExecutive, WrFreePage, WrPageIn, WrPoolAllocation, WrDelayExecution, WrSuspended, WrUserRequest, WrEventPair, WrQueue, WrLpcReceive, WrLpcReply, WrVirtualMemory, WrPageOut, WrRendezvous, Spare2, Spare3, Spare4, Spare5, Spare6, WrKernel, MaximumWaitReason } KWAIT_REASON ; #line 9207 typedef struct _DISPATCHER_HEADER { UCHAR Type ; UCHAR Absolute ; UCHAR Size ; UCHAR Inserted ; LONG SignalState ; LIST_ENTRY WaitListHead ; } DISPATCHER_HEADER ; #line 9217 typedef struct _KWAIT_BLOCK { LIST_ENTRY WaitListEntry ; struct _KTHREAD * Thread ; PVOID Object ; struct _KWAIT_BLOCK * NextWaitBlock ; USHORT WaitKey ; USHORT WaitType ; } KWAIT_BLOCK , * PKWAIT_BLOCK , * PRKWAIT_BLOCK ; #line 9230 typedef void ( * PKSTART_ROUTINE )(PVOID StartContext ) ; #line 9244 typedef struct _KDEVICE_QUEUE { CSHORT Type ; CSHORT Size ; LIST_ENTRY DeviceListHead ; KSPIN_LOCK Lock ; BOOLEAN Busy ; } KDEVICE_QUEUE , * PKDEVICE_QUEUE , * PRKDEVICE_QUEUE ; typedef struct _KDEVICE_QUEUE_ENTRY { LIST_ENTRY DeviceListEntry ; ULONG SortKey ; BOOLEAN Inserted ; } KDEVICE_QUEUE_ENTRY , * PKDEVICE_QUEUE_ENTRY , * PRKDEVICE_QUEUE_ENTRY ; #line 9263 typedef struct _KEVENT { DISPATCHER_HEADER Header ; } KEVENT , * PKEVENT , * PRKEVENT ; #line 9271 typedef BOOLEAN ( * PKSERVICE_ROUTINE )(struct _KINTERRUPT * Interrupt , PVOID ServiceContext ) ; #line 9281 typedef struct _KMUTANT { DISPATCHER_HEADER Header ; LIST_ENTRY MutantListEntry ; struct _KTHREAD * OwnerThread ; BOOLEAN Abandoned ; UCHAR ApcDisable ; } KMUTANT , * PKMUTANT , * PRKMUTANT , KMUTEX , * PKMUTEX , * PRKMUTEX ; #line 9294 typedef struct _KSEMAPHORE { DISPATCHER_HEADER Header ; LONG Limit ; } KSEMAPHORE , * PKSEMAPHORE , * PRKSEMAPHORE ; #line 9304 typedef struct _KTIMER { DISPATCHER_HEADER Header ; ULARGE_INTEGER DueTime ; LIST_ENTRY TimerListEntry ; struct _KDPC * Dpc ; LONG Period ; } KTIMER , * PKTIMER , * PRKTIMER ; #line 9316 __declspec(dllimport) void KeInitializeDpc(PRKDPC Dpc , PKDEFERRED_ROUTINE DeferredRoutine , PVOID DeferredContext ) ; #line 9324 __declspec(dllimport) BOOLEAN KeInsertQueueDpc(PRKDPC Dpc , PVOID SystemArgument1 , PVOID SystemArgument2 ) ; #line 9332 __declspec(dllimport) BOOLEAN KeRemoveQueueDpc(PRKDPC Dpc ) ; #line 9340 __declspec(dllimport) void KeSetImportanceDpc(PRKDPC Dpc , KDPC_IMPORTANCE Importance ) ; #line 9347 __declspec(dllimport) void KeSetTargetProcessorDpc(PRKDPC Dpc , CCHAR Number ) ; #line 9359 __declspec(dllimport) void KeInitializeDeviceQueue(PKDEVICE_QUEUE DeviceQueue ) ; #line 9365 __declspec(dllimport) BOOLEAN KeInsertDeviceQueue(PKDEVICE_QUEUE DeviceQueue , PKDEVICE_QUEUE_ENTRY DeviceQueueEntry ) ; #line 9372 __declspec(dllimport) BOOLEAN KeInsertByKeyDeviceQueue(PKDEVICE_QUEUE DeviceQueue , PKDEVICE_QUEUE_ENTRY DeviceQueueEntry , ULONG SortKey ) ; #line 9380 __declspec(dllimport) PKDEVICE_QUEUE_ENTRY KeRemoveDeviceQueue(PKDEVICE_QUEUE DeviceQueue ) ; #line 9386 __declspec(dllimport) PKDEVICE_QUEUE_ENTRY KeRemoveByKeyDeviceQueue(PKDEVICE_QUEUE DeviceQueue , ULONG SortKey ) ; #line 9393 __declspec(dllimport) BOOLEAN KeRemoveEntryDeviceQueue(PKDEVICE_QUEUE DeviceQueue , PKDEVICE_QUEUE_ENTRY DeviceQueueEntry ) ; #line 9400 __declspec(dllimport) BOOLEAN KeSynchronizeExecution(PKINTERRUPT Interrupt , PKSYNCHRONIZE_ROUTINE SynchronizeRoutine , PVOID SynchronizeContext ) ; #line 9415 __declspec(dllimport) void KeInitializeEvent(PRKEVENT Event , EVENT_TYPE Type , BOOLEAN State ) ; #line 9423 __declspec(dllimport) void KeClearEvent(PRKEVENT Event ) ; #line 9429 __declspec(dllimport) LONG KePulseEvent(PRKEVENT Event , KPRIORITY Increment , BOOLEAN Wait ) ; #line 9437 __declspec(dllimport) LONG KeReadStateEvent(PRKEVENT Event ) ; #line 9445 __declspec(dllimport) LONG KeResetEvent(PRKEVENT Event ) ; #line 9451 __declspec(dllimport) LONG KeSetEvent(PRKEVENT Event , KPRIORITY Increment , BOOLEAN Wait ) ; #line 9463 __declspec(dllimport) void KeInitializeMutex(PRKMUTEX Mutex , ULONG Level ) ; #line 9472 __declspec(dllimport) LONG KeReleaseMutex(PRKMUTEX Mutex , BOOLEAN Wait ) ; #line 9483 __declspec(dllimport) void KeInitializeSemaphore(PRKSEMAPHORE Semaphore , LONG Count , LONG Limit ) ; #line 9491 __declspec(dllimport) LONG KeReadStateSemaphore(PRKSEMAPHORE Semaphore ) ; #line 9497 __declspec(dllimport) LONG KeReleaseSemaphore(PRKSEMAPHORE Semaphore , KPRIORITY Increment , LONG Adjustment , BOOLEAN Wait ) ; #line 9506 __declspec(dllimport) NTSTATUS KeDelayExecutionThread(KPROCESSOR_MODE WaitMode , BOOLEAN Alertable , PLARGE_INTEGER Interval ) ; #line 9514 __declspec(dllimport) KPRIORITY KeQueryPriorityThread(PKTHREAD Thread ) ; #line 9520 __declspec(dllimport) LONG KeSetBasePriorityThread(PKTHREAD Thread , LONG Increment ) ; #line 9527 __declspec(dllimport) KPRIORITY KeSetPriorityThread(PKTHREAD Thread , KPRIORITY Priority ) ; #line 9539 __declspec(dllimport) void KeEnterCriticalRegion(void ) ; #line 9545 __declspec(dllimport) void KeLeaveCriticalRegion(void ) ; #line 9623 __declspec(dllimport) void KeInitializeTimer(PKTIMER Timer ) ; #line 9629 __declspec(dllimport) void KeInitializeTimerEx(PKTIMER Timer , TIMER_TYPE Type ) ; #line 9636 __declspec(dllimport) BOOLEAN KeCancelTimer(PKTIMER ) ; #line 9642 __declspec(dllimport) BOOLEAN KeReadStateTimer(PKTIMER Timer ) ; #line 9648 __declspec(dllimport) BOOLEAN KeSetTimer(PKTIMER Timer , LARGE_INTEGER DueTime , PKDPC Dpc ) ; #line 9656 __declspec(dllimport) BOOLEAN KeSetTimerEx(PKTIMER Timer , LARGE_INTEGER DueTime , LONG Period , PKDPC Dpc ) ; #line 9668 __declspec(dllimport) NTSTATUS KeWaitForMultipleObjects(ULONG Count , PVOID Object[] , WAIT_TYPE WaitType , KWAIT_REASON WaitReason , KPROCESSOR_MODE WaitMode , BOOLEAN Alertable , PLARGE_INTEGER Timeout , PKWAIT_BLOCK WaitBlockArray ) ; #line 9681 __declspec(dllimport) NTSTATUS KeWaitForSingleObject(PVOID Object , KWAIT_REASON WaitReason , KPROCESSOR_MODE WaitMode , BOOLEAN Alertable , PLARGE_INTEGER Timeout ) ; #line 9711 __declspec(dllimport) void __stdcall KeInitializeSpinLock(PKSPIN_LOCK SpinLock ) ; #line 9720 __declspec(dllimport) void _fastcall KefAcquireSpinLockAtDpcLevel(PKSPIN_LOCK SpinLock ) ; #line 9727 __declspec(dllimport) void _fastcall KefReleaseSpinLockFromDpcLevel(PKSPIN_LOCK SpinLock ) ; #line 9737 __declspec(dllimport) KIRQL _fastcall KfAcquireSpinLock(PKSPIN_LOCK SpinLock ) ; #line 9744 __declspec(dllimport) void _fastcall KfReleaseSpinLock(PKSPIN_LOCK SpinLock , KIRQL NewIrql ) ; #line 9754 __declspec(dllimport) KIRQL _fastcall KeAcquireSpinLockRaiseToSynch(PKSPIN_LOCK SpinLock ) ; #line 9808 __declspec(dllimport) void _fastcall KfLowerIrql(KIRQL NewIrql ) ; #line 9815 __declspec(dllimport) KIRQL _fastcall KfRaiseIrql(KIRQL NewIrql ) ; #line 9824 __declspec(dllimport) KIRQL KeRaiseIrqlToDpcLevel(void ) ; #line 9830 __declspec(dllimport) KIRQL KeRaiseIrqlToSynchLevel(void ) ; #line 9893 BOOLEAN KeGetBugMessageText(ULONG MessageId , PANSI_STRING ReturnedString ) ; #line 9899 typedef enum _KBUGCHECK_BUFFER_DUMP_STATE { BufferEmpty, BufferInserted, BufferStarted, BufferFinished, BufferIncomplete } KBUGCHECK_BUFFER_DUMP_STATE ; typedef void ( * PKBUGCHECK_CALLBACK_ROUTINE )(PVOID Buffer , ULONG Length ) ; #line 9914 typedef struct _KBUGCHECK_CALLBACK_RECORD { LIST_ENTRY Entry ; PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine ; PVOID Buffer ; ULONG Length ; PUCHAR Component ; ULONG_PTR Checksum ; UCHAR State ; } KBUGCHECK_CALLBACK_RECORD , * PKBUGCHECK_CALLBACK_RECORD ; __declspec(dllimport) __declspec(noreturn) void __stdcall KeBugCheck(ULONG BugCheckCode ) ; #line 9934 __declspec(dllimport) __declspec(noreturn) void KeBugCheckEx(ULONG BugCheckCode , ULONG_PTR BugCheckParameter1 , ULONG_PTR BugCheckParameter2 , ULONG_PTR BugCheckParameter3 , ULONG_PTR BugCheckParameter4 ) ; #line 9950 __declspec(dllimport) BOOLEAN KeDeregisterBugCheckCallback(PKBUGCHECK_CALLBACK_RECORD CallbackRecord ) ; #line 9956 __declspec(dllimport) BOOLEAN KeRegisterBugCheckCallback(PKBUGCHECK_CALLBACK_RECORD CallbackRecord , PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine , PVOID Buffer , ULONG Length , PUCHAR Component ) ; #line 9966 __declspec(dllimport) void KeEnterKernelDebugger(void ) ; #line 9973 __declspec(dllimport) ULONGLONG KeQueryInterruptTime(void ) ; #line 9979 __declspec(dllimport) void KeQuerySystemTime(PLARGE_INTEGER CurrentTime ) ; #line 9985 __declspec(dllimport) ULONG KeQueryTimeIncrement(void ) ; #line 9992 __declspec(dllimport) KAFFINITY KeQueryActiveProcessors(void ) ; #line 10002 typedef void (_fastcall * PSWAP_CONTEXT_NOTIFY_ROUTINE )(HANDLE OldThreadId , HANDLE NewThreadId ) ; #line 10009 __declspec(dllimport) void _fastcall KeSetSwapContextNotifyRoutine(PSWAP_CONTEXT_NOTIFY_ROUTINE NotifyRoutine ) ; #line 10020 typedef LOGICAL (_fastcall * PTHREAD_SELECT_NOTIFY_ROUTINE )(HANDLE ThreadId ) ; #line 10026 __declspec(dllimport) void _fastcall KeSetThreadSelectNotifyRoutine(PTHREAD_SELECT_NOTIFY_ROUTINE NotifyRoutine ) ; #line 10037 typedef void (_fastcall * PTIME_UPDATE_NOTIFY_ROUTINE )(HANDLE ThreadId , KPROCESSOR_MODE Mode ) ; #line 10044 __declspec(dllimport) void _fastcall KeSetTimeUpdateNotifyRoutine(PTIME_UPDATE_NOTIFY_ROUTINE NotifyRoutine ) ; #line 10051 extern volatile KSYSTEM_TIME KeTickCount ; typedef enum _MEMORY_CACHING_TYPE_ORIG { MmFrameBufferCached = 2 } MEMORY_CACHING_TYPE_ORIG ; typedef enum _MEMORY_CACHING_TYPE { MmNonCached = 0, MmCached = 1, MmWriteCombined = MmFrameBufferCached, MmHardwareCoherentCached, MmNonCachedUnordered, MmUSWCCached, MmMaximumCacheType } MEMORY_CACHING_TYPE ; #line 10074 extern PBOOLEAN KdDebuggerNotPresent ; extern PBOOLEAN KdDebuggerEnabled ; #line 10087 typedef struct _DBGKD_DEBUG_DATA_HEADER64 * PDBGKD_DEBUG_DATA_HEADER64 ; BOOLEAN KdRegisterDebuggerDataBlock(ULONG Tag , PDBGKD_DEBUG_DATA_HEADER64 DataHeader , ULONG Size ) ; #line 10096 void KdDeregisterDebuggerDataBlock32(PDBGKD_DEBUG_DATA_HEADER64 DataHeader ) ; #line 10101 void KdDisableDebugger(void ) ; #line 10106 void KdEnableDebugger(void ) ; #line 10115 typedef enum _POOL_TYPE { NonPagedPool, PagedPool, NonPagedPoolMustSucceed, DontUseThisType, NonPagedPoolCacheAligned, PagedPoolCacheAligned, NonPagedPoolCacheAlignedMustS, MaxPoolType, NonPagedPoolSession = 32, PagedPoolSession = NonPagedPoolSession + 1, NonPagedPoolMustSucceedSession = PagedPoolSession + 1, DontUseThisTypeSession = NonPagedPoolMustSucceedSession + 1, NonPagedPoolCacheAlignedSession = DontUseThisTypeSession + 1, PagedPoolCacheAlignedSession = NonPagedPoolCacheAlignedSession + 1, NonPagedPoolCacheAlignedMustSSession = PagedPoolCacheAlignedSession + 1 } POOL_TYPE ; #line 10145 __declspec(dllimport) PVOID ExAllocatePool(POOL_TYPE PoolType , SIZE_T NumberOfBytes ) ; #line 10152 __declspec(dllimport) PVOID ExAllocatePoolWithQuota(POOL_TYPE PoolType , SIZE_T NumberOfBytes ) ; #line 10159 __declspec(dllimport) PVOID __stdcall ExAllocatePoolWithTag(POOL_TYPE PoolType , SIZE_T NumberOfBytes , ULONG Tag ) ; #line 10195 typedef enum _EX_POOL_PRIORITY { LowPoolPriority, LowPoolPrioritySpecialPoolOverrun = 8, LowPoolPrioritySpecialPoolUnderrun = 9, NormalPoolPriority = 16, NormalPoolPrioritySpecialPoolOverrun = 24, NormalPoolPrioritySpecialPoolUnderrun = 25, HighPoolPriority = 32, HighPoolPrioritySpecialPoolOverrun = 40, HighPoolPrioritySpecialPoolUnderrun = 41 } EX_POOL_PRIORITY ; #line 10208 __declspec(dllimport) PVOID __stdcall ExAllocatePoolWithTagPriority(POOL_TYPE PoolType , SIZE_T NumberOfBytes , ULONG Tag , EX_POOL_PRIORITY Priority ) ; #line 10224 __declspec(dllimport) PVOID ExAllocatePoolWithQuotaTag(POOL_TYPE PoolType , SIZE_T NumberOfBytes , ULONG Tag ) ; #line 10236 __declspec(dllimport) void __stdcall ExFreePool(PVOID P ) ; #line 10247 typedef struct _FAST_MUTEX { LONG Count ; PKTHREAD Owner ; ULONG Contention ; KEVENT Event ; ULONG OldIrql ; } FAST_MUTEX , * PFAST_MUTEX ; #line 10272 __declspec(dllimport) void _fastcall ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex ) ; #line 10279 __declspec(dllimport) void _fastcall ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex ) ; #line 10315 __declspec(dllimport) void _fastcall ExAcquireFastMutex(PFAST_MUTEX FastMutex ) ; #line 10322 __declspec(dllimport) void _fastcall ExReleaseFastMutex(PFAST_MUTEX FastMutex ) ; #line 10331 __declspec(dllimport) BOOLEAN _fastcall ExTryToAcquireFastMutex(PFAST_MUTEX FastMutex ) ; #line 10348 __declspec(dllimport) void _fastcall ExInterlockedAddLargeStatistic(PLARGE_INTEGER Addend , ULONG Increment ) ; #line 10358 __declspec(dllimport) LARGE_INTEGER ExInterlockedAddLargeInteger(PLARGE_INTEGER Addend , LARGE_INTEGER Increment , PKSPIN_LOCK Lock ) ; #line 10367 __declspec(dllimport) ULONG _fastcall ExfInterlockedAddUlong(PULONG Addend , ULONG Increment , PKSPIN_LOCK Lock ) ; #line 10394 __declspec(dllimport) LONGLONG _fastcall ExInterlockedCompareExchange64(PLONGLONG Destination , PLONGLONG Exchange , PLONGLONG Comperand , PKSPIN_LOCK Lock ) ; #line 10406 __declspec(dllimport) PLIST_ENTRY _fastcall ExfInterlockedInsertHeadList(PLIST_ENTRY ListHead , PLIST_ENTRY ListEntry , PKSPIN_LOCK Lock ) ; #line 10415 __declspec(dllimport) PLIST_ENTRY _fastcall ExfInterlockedInsertTailList(PLIST_ENTRY ListHead , PLIST_ENTRY ListEntry , PKSPIN_LOCK Lock ) ; #line 10424 __declspec(dllimport) PLIST_ENTRY _fastcall ExfInterlockedRemoveHeadList(PLIST_ENTRY ListHead , PKSPIN_LOCK Lock ) ; #line 10432 __declspec(dllimport) PSINGLE_LIST_ENTRY _fastcall ExfInterlockedPopEntryList(PSINGLE_LIST_ENTRY ListHead , PKSPIN_LOCK Lock ) ; #line 10440 __declspec(dllimport) PSINGLE_LIST_ENTRY _fastcall ExfInterlockedPushEntryList(PSINGLE_LIST_ENTRY ListHead , PSINGLE_LIST_ENTRY ListEntry , PKSPIN_LOCK Lock ) ; #line 10547 __declspec(dllimport) PSINGLE_LIST_ENTRY _fastcall ExInterlockedPopEntrySList(PSLIST_HEADER ListHead , PKSPIN_LOCK Lock ) ; #line 10555 __declspec(dllimport) PSINGLE_LIST_ENTRY _fastcall ExInterlockedPushEntrySList(PSLIST_HEADER ListHead , PSINGLE_LIST_ENTRY ListEntry , PKSPIN_LOCK Lock ) ; #line 10564 __declspec(dllimport) PSINGLE_LIST_ENTRY _fastcall ExInterlockedFlushSList(PSLIST_HEADER ListHead ) ; #line 10574 typedef PVOID ( * PALLOCATE_FUNCTION )(POOL_TYPE PoolType , SIZE_T NumberOfBytes , ULONG Tag ) ; #line 10582 typedef void ( * PFREE_FUNCTION )(PVOID Buffer ) ; #line 10588 typedef struct _GENERAL_LOOKASIDE { SLIST_HEADER ListHead ; USHORT Depth ; USHORT MaximumDepth ; ULONG TotalAllocates ; union { ULONG AllocateMisses ; ULONG AllocateHits ; } ; ULONG TotalFrees ; union { ULONG FreeMisses ; ULONG FreeHits ; } ; POOL_TYPE Type ; ULONG Tag ; ULONG Size ; PALLOCATE_FUNCTION Allocate ; PFREE_FUNCTION Free ; LIST_ENTRY ListEntry ; ULONG LastTotalAllocates ; union { ULONG LastAllocateMisses ; ULONG LastAllocateHits ; } ; ULONG Future[2] ; } GENERAL_LOOKASIDE , * PGENERAL_LOOKASIDE ; #line 10619 typedef struct _NPAGED_LOOKASIDE_LIST { GENERAL_LOOKASIDE L ; KSPIN_LOCK Lock ; } NPAGED_LOOKASIDE_LIST , * PNPAGED_LOOKASIDE_LIST ; #line 10625 __declspec(dllimport) void ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST Lookaside , PALLOCATE_FUNCTION Allocate , PFREE_FUNCTION Free , ULONG Flags , SIZE_T Size , ULONG Tag , USHORT Depth ) ; #line 10637 __declspec(dllimport) void ExDeleteNPagedLookasideList(PNPAGED_LOOKASIDE_LIST Lookaside ) ; #line 10643 __inline PVOID ExAllocateFromNPagedLookasideList(PNPAGED_LOOKASIDE_LIST Lookaside ) { #line 10670 PVOID Entry ; #line 10672 (Lookaside->L).TotalAllocates += 1; Entry = ExInterlockedPopEntrySList(& (Lookaside->L).ListHead, & Lookaside->Lock); #line 10674 if(Entry == (void * )0) { #line 10675 (Lookaside->L).AllocateMisses += 1; Entry = ((Lookaside->L).Allocate)((Lookaside->L).Type, (Lookaside->L).Size, (Lookaside->L).Tag); } #line 10681 return Entry; } __inline void ExFreeToNPagedLookasideList(PNPAGED_LOOKASIDE_LIST Lookaside , PVOID Entry ) { #line 10713 (Lookaside->L).TotalFrees += 1; if((USHORT )(& (Lookaside->L).ListHead)->Depth >= (Lookaside->L).Depth) { #line 10715 (Lookaside->L).FreeMisses += 1; ((Lookaside->L).Free)(Entry); } else { #line 10719 ExInterlockedPushEntrySList(& (Lookaside->L).ListHead, (PSINGLE_LIST_ENTRY )Entry, & Lookaside->Lock); } #line 10724 return; } #line 10729 typedef struct _PAGED_LOOKASIDE_LIST { GENERAL_LOOKASIDE L ; FAST_MUTEX Lock ; } PAGED_LOOKASIDE_LIST , * PPAGED_LOOKASIDE_LIST ; __declspec(dllimport) void ExInitializePagedLookasideList(PPAGED_LOOKASIDE_LIST Lookaside , PALLOCATE_FUNCTION Allocate , PFREE_FUNCTION Free , ULONG Flags , SIZE_T Size , ULONG Tag , USHORT Depth ) ; #line 10746 __declspec(dllimport) void ExDeletePagedLookasideList(PPAGED_LOOKASIDE_LIST Lookaside ) ; #line 10754 __declspec(dllimport) PVOID ExAllocateFromPagedLookasideList(PPAGED_LOOKASIDE_LIST Lookaside ) ; #line 10760 __declspec(dllimport) void ExFreeToPagedLookasideList(PPAGED_LOOKASIDE_LIST Lookaside , PVOID Entry ) ; #line 10856 __declspec(dllimport) void __stdcall ProbeForRead(const void * Address , ULONG Length , ULONG Alignment ) ; #line 10869 __declspec(dllimport) void __stdcall ProbeForWrite(PVOID Address , ULONG Length , ULONG Alignment ) ; #line 10882 typedef enum _WORK_QUEUE_TYPE { CriticalWorkQueue, DelayedWorkQueue, HyperCriticalWorkQueue, MaximumWorkQueue } WORK_QUEUE_TYPE ; typedef void ( * PWORKER_THREAD_ROUTINE )(PVOID Parameter ) ; #line 10895 typedef struct _WORK_QUEUE_ITEM { LIST_ENTRY List ; PWORKER_THREAD_ROUTINE WorkerRoutine ; PVOID Parameter ; } WORK_QUEUE_ITEM , * PWORK_QUEUE_ITEM ; #line 10907 __declspec(dllimport) void ExQueueWorkItem(PWORK_QUEUE_ITEM WorkItem , WORK_QUEUE_TYPE QueueType ) ; #line 10916 __declspec(dllimport) BOOLEAN ExIsProcessorFeaturePresent(ULONG ProcessorFeature ) ; #line 10926 typedef struct _ZONE_SEGMENT_HEADER { SINGLE_LIST_ENTRY SegmentList ; PVOID Reserved ; } ZONE_SEGMENT_HEADER , * PZONE_SEGMENT_HEADER ; typedef struct _ZONE_HEADER { SINGLE_LIST_ENTRY FreeList ; SINGLE_LIST_ENTRY SegmentList ; ULONG BlockSize ; ULONG TotalSegmentSize ; } ZONE_HEADER , * PZONE_HEADER ; #line 10939 __declspec(dllimport) NTSTATUS ExInitializeZone(PZONE_HEADER Zone , ULONG BlockSize , PVOID InitialSegment , ULONG InitialSegmentSize ) ; #line 10948 __declspec(dllimport) NTSTATUS ExExtendZone(PZONE_HEADER Zone , PVOID Segment , ULONG SegmentSize ) ; #line 10956 __declspec(dllimport) NTSTATUS ExInterlockedExtendZone(PZONE_HEADER Zone , PVOID Segment , ULONG SegmentSize , PKSPIN_LOCK Lock ) ; #line 11156 typedef ULONG_PTR ERESOURCE_THREAD ; #line 11157 typedef ERESOURCE_THREAD * PERESOURCE_THREAD ; typedef struct _OWNER_ENTRY { ERESOURCE_THREAD OwnerThread ; union { LONG OwnerCount ; ULONG TableSize ; } ; } OWNER_ENTRY , * POWNER_ENTRY ; #line 11168 typedef struct _ERESOURCE { LIST_ENTRY SystemResourcesList ; POWNER_ENTRY OwnerTable ; SHORT ActiveCount ; USHORT Flag ; PKSEMAPHORE SharedWaiters ; PKEVENT ExclusiveWaiters ; OWNER_ENTRY OwnerThreads[2] ; ULONG ContentionCount ; USHORT NumberOfSharedWaiters ; USHORT NumberOfExclusiveWaiters ; union { PVOID Address ; ULONG_PTR CreatorBackTraceIndex ; } ; KSPIN_LOCK SpinLock ; } ERESOURCE , * PERESOURCE ; #line 11197 typedef struct _RESOURCE_HASH_ENTRY { LIST_ENTRY ListEntry ; PVOID Address ; ULONG ContentionCount ; ULONG Number ; } RESOURCE_HASH_ENTRY , * PRESOURCE_HASH_ENTRY ; typedef struct _RESOURCE_PERFORMANCE_DATA { ULONG ActiveResourceCount ; ULONG TotalResourceCount ; ULONG ExclusiveAcquire ; ULONG SharedFirstLevel ; ULONG SharedSecondLevel ; ULONG StarveFirstLevel ; ULONG StarveSecondLevel ; ULONG WaitForExclusive ; ULONG OwnerTableExpands ; ULONG MaximumTableExpand ; LIST_ENTRY HashTable[64] ; } RESOURCE_PERFORMANCE_DATA , * PRESOURCE_PERFORMANCE_DATA ; #line 11222 __declspec(dllimport) NTSTATUS ExInitializeResourceLite(PERESOURCE Resource ) ; #line 11228 __declspec(dllimport) NTSTATUS ExReinitializeResourceLite(PERESOURCE Resource ) ; #line 11234 __declspec(dllimport) BOOLEAN ExAcquireResourceSharedLite(PERESOURCE Resource , BOOLEAN Wait ) ; #line 11241 __declspec(dllimport) BOOLEAN ExAcquireResourceExclusiveLite(PERESOURCE Resource , BOOLEAN Wait ) ; #line 11248 __declspec(dllimport) BOOLEAN ExAcquireSharedStarveExclusive(PERESOURCE Resource , BOOLEAN Wait ) ; #line 11255 __declspec(dllimport) BOOLEAN ExAcquireSharedWaitForExclusive(PERESOURCE Resource , BOOLEAN Wait ) ; #line 11262 __declspec(dllimport) BOOLEAN ExTryToAcquireResourceExclusiveLite(PERESOURCE Resource ) ; #line 11277 __declspec(dllimport) void _fastcall ExReleaseResourceLite(PERESOURCE Resource ) ; #line 11284 __declspec(dllimport) void ExReleaseResourceForThreadLite(PERESOURCE Resource , ERESOURCE_THREAD ResourceThreadId ) ; #line 11291 __declspec(dllimport) void ExSetResourceOwnerPointer(PERESOURCE Resource , PVOID OwnerPointer ) ; #line 11298 __declspec(dllimport) void ExConvertExclusiveToSharedLite(PERESOURCE Resource ) ; #line 11304 __declspec(dllimport) NTSTATUS ExDeleteResourceLite(PERESOURCE Resource ) ; #line 11310 __declspec(dllimport) ULONG ExGetExclusiveWaiterCount(PERESOURCE Resource ) ; #line 11316 __declspec(dllimport) ULONG ExGetSharedWaiterCount(PERESOURCE Resource ) ; #line 11330 __declspec(dllimport) BOOLEAN ExIsResourceAcquiredExclusiveLite(PERESOURCE Resource ) ; #line 11336 __declspec(dllimport) ULONG ExIsResourceAcquiredSharedLite(PERESOURCE Resource ) ; #line 11360 __declspec(dllimport) KPROCESSOR_MODE ExGetPreviousMode(void ) ; #line 11369 __declspec(dllimport) void __stdcall ExRaiseStatus(NTSTATUS Status ) ; #line 11378 __declspec(dllimport) void ExRaiseDatatypeMisalignment(void ) ; #line 11384 __declspec(dllimport) void ExRaiseAccessViolation(void ) ; #line 11394 __declspec(dllimport) ULONG ExSetTimerResolution(ULONG DesiredTime , BOOLEAN SetResolution ) ; #line 11406 __declspec(dllimport) void ExSystemTimeToLocalTime(PLARGE_INTEGER SystemTime , PLARGE_INTEGER LocalTime ) ; #line 11417 __declspec(dllimport) void ExLocalTimeToSystemTime(PLARGE_INTEGER LocalTime , PLARGE_INTEGER SystemTime ) ; #line 11429 typedef struct _CALLBACK_OBJECT * PCALLBACK_OBJECT___0 ; typedef void ( * PCALLBACK_FUNCTION )(PVOID CallbackContext , PVOID Argument1 , PVOID Argument2 ) ; #line 11438 __declspec(dllimport) NTSTATUS ExCreateCallback(PCALLBACK_OBJECT___0 * CallbackObject , POBJECT_ATTRIBUTES ObjectAttributes , BOOLEAN Create , BOOLEAN AllowMultipleCallbacks ) ; #line 11447 __declspec(dllimport) PVOID ExRegisterCallback(PCALLBACK_OBJECT___0 CallbackObject , PCALLBACK_FUNCTION CallbackFunction , PVOID CallbackContext ) ; #line 11455 __declspec(dllimport) void ExUnregisterCallback(PVOID CallbackRegistration ) ; #line 11461 __declspec(dllimport) void ExNotifyCallback(PVOID CallbackObject , PVOID Argument1 , PVOID Argument2 ) ; #line 11474 typedef GUID UUID ; __declspec(dllimport) NTSTATUS ExUuidCreate(UUID * Uuid ) ; #line 11596 extern PBOOLEAN Mm64BitPhysicalAddress ; #line 11862 typedef enum _MM_SYSTEM_SIZE { MmSmallSystem, MmMediumSystem, MmLargeSystem } MM_SYSTEMSIZE ; __declspec(dllimport) MM_SYSTEMSIZE MmQuerySystemSize(void ) ; #line 11876 __declspec(dllimport) BOOLEAN MmIsThisAnNtAsSystem(void ) ; #line 11884 typedef enum _LOCK_OPERATION { IoReadAccess, IoWriteAccess, IoModifyAccess } LOCK_OPERATION ; #line 11891 __declspec(dllimport) void MmProbeAndLockProcessPages(PMDL MemoryDescriptorList , PEPROCESS Process , KPROCESSOR_MODE AccessMode , LOCK_OPERATION Operation ) ; #line 11906 __declspec(dllimport) void MmProbeAndLockPages(PMDL MemoryDescriptorList , KPROCESSOR_MODE AccessMode , LOCK_OPERATION Operation ) ; #line 11915 __declspec(dllimport) void MmUnlockPages(PMDL MemoryDescriptorList ) ; #line 11921 __declspec(dllimport) void MmBuildMdlForNonPagedPool(PMDL MemoryDescriptorList ) ; #line 11927 __declspec(dllimport) PVOID MmMapLockedPages(PMDL MemoryDescriptorList , KPROCESSOR_MODE AccessMode ) ; #line 11934 __declspec(dllimport) PVOID MmGetSystemRoutineAddress(PUNICODE_STRING SystemRoutineName ) ; #line 11942 __declspec(dllimport) NTSTATUS MmMapUserAddressesToPage(PVOID BaseAddress , SIZE_T NumberOfBytes , PVOID PageAddress ) ; #line 11970 typedef enum _MM_PAGE_PRIORITY { LowPagePriority, NormalPagePriority = 16, HighPagePriority = 32 } MM_PAGE_PRIORITY ; #line 11979 __declspec(dllimport) PVOID MmMapLockedPagesSpecifyCache(PMDL MemoryDescriptorList , KPROCESSOR_MODE AccessMode , MEMORY_CACHING_TYPE CacheType , PVOID BaseAddress , ULONG BugCheckOnFailure , MM_PAGE_PRIORITY Priority ) ; #line 11990 __declspec(dllimport) void MmUnmapLockedPages(PVOID BaseAddress , PMDL MemoryDescriptorList ) ; #line 11999 typedef struct _PHYSICAL_MEMORY_RANGE { PHYSICAL_ADDRESS BaseAddress ; LARGE_INTEGER NumberOfBytes ; } PHYSICAL_MEMORY_RANGE , * PPHYSICAL_MEMORY_RANGE ; __declspec(dllimport) NTSTATUS MmAddPhysicalMemory(PPHYSICAL_ADDRESS StartAddress , PLARGE_INTEGER NumberOfBytes ) ; #line 12011 __declspec(dllimport) NTSTATUS MmRemovePhysicalMemory(PPHYSICAL_ADDRESS StartAddress , PLARGE_INTEGER NumberOfBytes ) ; #line 12018 __declspec(dllimport) PPHYSICAL_MEMORY_RANGE MmGetPhysicalMemoryRanges(void ) ; #line 12024 __declspec(dllimport) PMDL MmAllocatePagesForMdl(PHYSICAL_ADDRESS LowAddress , PHYSICAL_ADDRESS HighAddress , PHYSICAL_ADDRESS SkipBytes , SIZE_T TotalBytes ) ; #line 12033 __declspec(dllimport) void MmFreePagesFromMdl(PMDL MemoryDescriptorList ) ; #line 12041 __declspec(dllimport) PVOID MmMapIoSpace(PHYSICAL_ADDRESS PhysicalAddress , SIZE_T NumberOfBytes , MEMORY_CACHING_TYPE CacheType ) ; #line 12049 __declspec(dllimport) void MmUnmapIoSpace(PVOID BaseAddress , SIZE_T NumberOfBytes ) ; #line 12057 __declspec(dllimport) PVOID MmMapVideoDisplay(PHYSICAL_ADDRESS PhysicalAddress , SIZE_T NumberOfBytes , MEMORY_CACHING_TYPE CacheType ) ; #line 12065 __declspec(dllimport) void MmUnmapVideoDisplay(PVOID BaseAddress , SIZE_T NumberOfBytes ) ; #line 12072 __declspec(dllimport) PHYSICAL_ADDRESS MmGetPhysicalAddress(PVOID BaseAddress ) ; #line 12078 __declspec(dllimport) PVOID MmGetVirtualForPhysical(PHYSICAL_ADDRESS PhysicalAddress ) ; #line 12084 __declspec(dllimport) PVOID MmAllocateContiguousMemory(SIZE_T NumberOfBytes , PHYSICAL_ADDRESS HighestAcceptableAddress ) ; #line 12091 __declspec(dllimport) PVOID MmAllocateContiguousMemorySpecifyCache(SIZE_T NumberOfBytes , PHYSICAL_ADDRESS LowestAcceptableAddress , PHYSICAL_ADDRESS HighestAcceptableAddress , PHYSICAL_ADDRESS BoundaryAddressMultiple , MEMORY_CACHING_TYPE CacheType ) ; #line 12101 __declspec(dllimport) void MmFreeContiguousMemory(PVOID BaseAddress ) ; #line 12107 __declspec(dllimport) void MmFreeContiguousMemorySpecifyCache(PVOID BaseAddress , SIZE_T NumberOfBytes , MEMORY_CACHING_TYPE CacheType ) ; #line 12116 __declspec(dllimport) PVOID MmAllocateNonCachedMemory(SIZE_T NumberOfBytes ) ; #line 12122 __declspec(dllimport) void MmFreeNonCachedMemory(PVOID BaseAddress , SIZE_T NumberOfBytes ) ; #line 12129 __declspec(dllimport) BOOLEAN MmIsAddressValid(PVOID VirtualAddress ) ; #line 12135 __declspec(dllimport) BOOLEAN MmIsNonPagedSystemAddressValid(PVOID VirtualAddress ) ; #line 12143 __declspec(dllimport) SIZE_T MmSizeOfMdl(PVOID Base , SIZE_T Length ) ; #line 12150 __declspec(dllimport) PMDL MmCreateMdl(PMDL MemoryDescriptorList , PVOID Base , SIZE_T Length ) ; #line 12158 __declspec(dllimport) PVOID MmLockPagableDataSection(PVOID AddressWithinSection ) ; #line 12166 __declspec(dllimport) void MmLockPagableSectionByHandle(PVOID ImageSectionHandle ) ; #line 12172 __declspec(dllimport) void MmResetDriverPaging(PVOID AddressWithinSection ) ; #line 12179 __declspec(dllimport) PVOID MmPageEntireDriver(PVOID AddressWithinSection ) ; #line 12185 __declspec(dllimport) void MmUnlockPagableImageSection(PVOID ImageSectionHandle ) ; #line 12193 __declspec(dllimport) HANDLE MmSecureVirtualMemory(PVOID Address , SIZE_T Size , ULONG ProbeMode ) ; #line 12201 __declspec(dllimport) void MmUnsecureVirtualMemory(HANDLE SecureHandle ) ; #line 12207 __declspec(dllimport) NTSTATUS MmMapViewInSystemSpace(PVOID Section , PVOID * MappedBase , PSIZE_T ViewSize ) ; #line 12215 __declspec(dllimport) NTSTATUS MmUnmapViewInSystemSpace(PVOID MappedBase ) ; #line 12221 __declspec(dllimport) NTSTATUS MmMapViewInSessionSpace(PVOID Section , PVOID * MappedBase , PSIZE_T ViewSize ) ; #line 12229 __declspec(dllimport) NTSTATUS MmUnmapViewInSessionSpace(PVOID MappedBase ) ; #line 12385 typedef NTSTATUS ( * PMM_DLL_INITIALIZE )(PUNICODE_STRING RegistryPath ) ; #line 12389 typedef NTSTATUS ( * PMM_DLL_UNLOAD )(void ) ; #line 12399 struct _DRIVER_OBJECT ; __declspec(dllimport) LOGICAL MmIsDriverVerifying(struct _DRIVER_OBJECT * DriverObject ) ; #line 12411 typedef enum _SECURITY_OPERATION_CODE { SetSecurityDescriptor, QuerySecurityDescriptor, DeleteSecurityDescriptor, AssignSecurityDescriptor } SECURITY_OPERATION_CODE , * PSECURITY_OPERATION_CODE ; #line 12426 typedef struct _SECURITY_SUBJECT_CONTEXT { PACCESS_TOKEN ClientToken ; SECURITY_IMPERSONATION_LEVEL ImpersonationLevel ; PACCESS_TOKEN PrimaryToken ; PVOID ProcessAuditId ; } SECURITY_SUBJECT_CONTEXT , * PSECURITY_SUBJECT_CONTEXT ; #line 12448 typedef struct _INITIAL_PRIVILEGE_SET { ULONG PrivilegeCount ; ULONG Control ; LUID_AND_ATTRIBUTES Privilege[3] ; } INITIAL_PRIVILEGE_SET , * PINITIAL_PRIVILEGE_SET ; #line 12462 typedef struct _ACCESS_STATE { LUID OperationID ; BOOLEAN SecurityEvaluated ; BOOLEAN GenerateAudit ; BOOLEAN GenerateOnClose ; BOOLEAN PrivilegesAllocated ; ULONG Flags ; ACCESS_MASK RemainingDesiredAccess ; ACCESS_MASK PreviouslyGrantedAccess ; ACCESS_MASK OriginalDesiredAccess ; SECURITY_SUBJECT_CONTEXT SubjectSecurityContext ; PSECURITY_DESCRIPTOR SecurityDescriptor ; PVOID AuxData ; union { INITIAL_PRIVILEGE_SET InitialPrivilegeSet ; PRIVILEGE_SET PrivilegeSet ; } Privileges ; BOOLEAN AuditPrivileges ; UNICODE_STRING ObjectName ; UNICODE_STRING ObjectTypeName ; } ACCESS_STATE , * PACCESS_STATE ; #line 12487 __declspec(dllimport) NTSTATUS SeAssignSecurity(PSECURITY_DESCRIPTOR ParentDescriptor , PSECURITY_DESCRIPTOR ExplicitDescriptor , PSECURITY_DESCRIPTOR * NewDescriptor , BOOLEAN IsDirectoryObject , PSECURITY_SUBJECT_CONTEXT SubjectContext , PGENERIC_MAPPING GenericMapping , POOL_TYPE PoolType ) ; #line 12499 __declspec(dllimport) NTSTATUS SeAssignSecurityEx(PSECURITY_DESCRIPTOR ParentDescriptor , PSECURITY_DESCRIPTOR ExplicitDescriptor , PSECURITY_DESCRIPTOR * NewDescriptor , GUID * ObjectType , BOOLEAN IsDirectoryObject , ULONG AutoInheritFlags , PSECURITY_SUBJECT_CONTEXT SubjectContext , PGENERIC_MAPPING GenericMapping , POOL_TYPE PoolType ) ; #line 12513 __declspec(dllimport) NTSTATUS SeDeassignSecurity(PSECURITY_DESCRIPTOR * SecurityDescriptor ) ; #line 12519 __declspec(dllimport) BOOLEAN SeAccessCheck(PSECURITY_DESCRIPTOR SecurityDescriptor , PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext , BOOLEAN SubjectContextLocked , ACCESS_MASK DesiredAccess , ACCESS_MASK PreviouslyGrantedAccess , PPRIVILEGE_SET * Privileges , PGENERIC_MAPPING GenericMapping , KPROCESSOR_MODE AccessMode , PACCESS_MASK GrantedAccess , PNTSTATUS AccessStatus ) ; #line 12535 __declspec(dllimport) BOOLEAN SeValidSecurityDescriptor(ULONG Length , PSECURITY_DESCRIPTOR SecurityDescriptor ) ; #line 12542 __declspec(dllimport) BOOLEAN SeSinglePrivilegeCheck(LUID PrivilegeValue , KPROCESSOR_MODE PreviousMode ) ; #line 12552 __declspec(dllimport) NTSTATUS PsCreateSystemThread(PHANDLE ThreadHandle , ULONG DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes , HANDLE ProcessHandle , PCLIENT_ID ClientId , PKSTART_ROUTINE StartRoutine , PVOID StartContext ) ; #line 12564 __declspec(dllimport) NTSTATUS PsTerminateSystemThread(NTSTATUS ExitStatus ) ; #line 12571 typedef void ( * PCREATE_PROCESS_NOTIFY_ROUTINE )(HANDLE ParentId , HANDLE ProcessId , BOOLEAN Create ) ; #line 12579 NTSTATUS PsSetCreateProcessNotifyRoutine(PCREATE_PROCESS_NOTIFY_ROUTINE NotifyRoutine , BOOLEAN Remove ) ; #line 12585 typedef void ( * PCREATE_THREAD_NOTIFY_ROUTINE )(HANDLE ProcessId , HANDLE ThreadId , BOOLEAN Create ) ; #line 12593 NTSTATUS PsSetCreateThreadNotifyRoutine(PCREATE_THREAD_NOTIFY_ROUTINE NotifyRoutine ) ; #line 12602 typedef struct _IMAGE_INFO { union { ULONG Properties ; struct { ULONG ImageAddressingMode : 8; ULONG SystemModeImage : 1; ULONG ImageMappedToAllPids : 1; ULONG Reserved : 22; } ; } ; PVOID ImageBase ; ULONG ImageSelector ; SIZE_T ImageSize ; ULONG ImageSectionNumber ; } IMAGE_INFO , * PIMAGE_INFO ; #line 12620 typedef void ( * PLOAD_IMAGE_NOTIFY_ROUTINE )(PUNICODE_STRING FullImageName , HANDLE ProcessId , PIMAGE_INFO ImageInfo ) ; #line 12628 NTSTATUS PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE NotifyRoutine ) ; #line 12633 HANDLE PsGetCurrentProcessId(void ) ; #line 12636 HANDLE PsGetCurrentThreadId(void ) ; #line 12639 BOOLEAN PsGetVersion(PULONG MajorVersion , PULONG MinorVersion , PULONG BuildNumber , PUNICODE_STRING CSDVersion ) ; #line 12859 typedef NTSTATUS ( * PIO_QUERY_DEVICE_ROUTINE )(PVOID Context , PUNICODE_STRING PathName , INTERFACE_TYPE BusType , ULONG BusNumber , PKEY_VALUE_FULL_INFORMATION * BusInformation , CONFIGURATION_TYPE ControllerType , ULONG ControllerNumber , PKEY_VALUE_FULL_INFORMATION * ControllerInformation , CONFIGURATION_TYPE PeripheralType , ULONG PeripheralNumber , PKEY_VALUE_FULL_INFORMATION * PeripheralInformation ) ; #line 12878 typedef enum _IO_QUERY_DEVICE_DATA_FORMAT { IoQueryDeviceIdentifier = 0, IoQueryDeviceConfigurationData, IoQueryDeviceComponentInformation, IoQueryDeviceMaxData } IO_QUERY_DEVICE_DATA_FORMAT , * PIO_QUERY_DEVICE_DATA_FORMAT ; #line 12890 typedef enum _CREATE_FILE_TYPE { CreateFileTypeNone, CreateFileTypeNamedPipe, CreateFileTypeMailslot } CREATE_FILE_TYPE ; #line 12905 struct _DEVICE_DESCRIPTION ; #line 12906 struct _DEVICE_OBJECT ; #line 12907 struct _DMA_ADAPTER ; #line 12908 struct _DRIVER_OBJECT ; #line 12909 struct _DRIVE_LAYOUT_INFORMATION ; #line 12910 struct _DISK_PARTITION ; #line 12911 struct _FILE_OBJECT ; #line 12912 struct _IRP ; #line 12913 struct _SCSI_REQUEST_BLOCK ; #line 12919 typedef void ( * PIO_DPC_ROUTINE )(PKDPC Dpc , struct _DEVICE_OBJECT * DeviceObject , struct _IRP * Irp , PVOID Context ) ; #line 12932 typedef void ( * PIO_TIMER_ROUTINE )(struct _DEVICE_OBJECT * DeviceObject , PVOID Context ) ; #line 12943 typedef NTSTATUS ( * PDRIVER_INITIALIZE )(struct _DRIVER_OBJECT * DriverObject , PUNICODE_STRING RegistryPath ) ; #line 12955 typedef void ( * PDRIVER_REINITIALIZE )(struct _DRIVER_OBJECT * DriverObject , PVOID Context , ULONG Count ) ; #line 12968 typedef void ( * PDRIVER_CANCEL )(struct _DEVICE_OBJECT * DeviceObject , struct _IRP * Irp ) ; #line 12979 typedef NTSTATUS ( * PDRIVER_DISPATCH )(struct _DEVICE_OBJECT * DeviceObject , struct _IRP * Irp ) ; #line 12990 typedef void ( * PDRIVER_STARTIO )(struct _DEVICE_OBJECT * DeviceObject , struct _IRP * Irp ) ; #line 13001 typedef void ( * PDRIVER_UNLOAD )(struct _DRIVER_OBJECT * DriverObject ) ; #line 13011 typedef NTSTATUS ( * PDRIVER_ADD_DEVICE )(struct _DRIVER_OBJECT * DriverObject , struct _DEVICE_OBJECT * PhysicalDeviceObject ) ; #line 13025 typedef BOOLEAN ( * PFAST_IO_CHECK_IF_POSSIBLE )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , ULONG Length , BOOLEAN Wait , ULONG LockKey , BOOLEAN CheckForReadOperation , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13038 typedef BOOLEAN ( * PFAST_IO_READ )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , ULONG Length , BOOLEAN Wait , ULONG LockKey , PVOID Buffer , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13051 typedef BOOLEAN ( * PFAST_IO_WRITE )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , ULONG Length , BOOLEAN Wait , ULONG LockKey , PVOID Buffer , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13068 typedef BOOLEAN ( * PFAST_IO_QUERY_BASIC_INFO )(struct _FILE_OBJECT * FileObject , BOOLEAN Wait , PFILE_BASIC_INFORMATION Buffer , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13078 typedef BOOLEAN ( * PFAST_IO_QUERY_STANDARD_INFO )(struct _FILE_OBJECT * FileObject , BOOLEAN Wait , PFILE_STANDARD_INFORMATION Buffer , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13092 typedef BOOLEAN ( * PFAST_IO_LOCK )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , PLARGE_INTEGER Length , PEPROCESS ProcessId , ULONG Key , BOOLEAN FailImmediately , BOOLEAN ExclusiveLock , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13106 typedef BOOLEAN ( * PFAST_IO_UNLOCK_SINGLE )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , PLARGE_INTEGER Length , PEPROCESS ProcessId , ULONG Key , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13118 typedef BOOLEAN ( * PFAST_IO_UNLOCK_ALL )(struct _FILE_OBJECT * FileObject , PEPROCESS ProcessId , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13127 typedef BOOLEAN ( * PFAST_IO_UNLOCK_ALL_BY_KEY )(struct _FILE_OBJECT * FileObject , PVOID ProcessId , ULONG Key , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13141 typedef BOOLEAN ( * PFAST_IO_DEVICE_CONTROL )(struct _FILE_OBJECT * FileObject , BOOLEAN Wait , PVOID InputBuffer , ULONG InputBufferLength , PVOID OutputBuffer , ULONG OutputBufferLength , ULONG IoControlCode , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13161 typedef void ( * PFAST_IO_ACQUIRE_FILE )(struct _FILE_OBJECT * FileObject ) ; #line 13167 typedef void ( * PFAST_IO_RELEASE_FILE )(struct _FILE_OBJECT * FileObject ) ; #line 13179 typedef void ( * PFAST_IO_DETACH_DEVICE )(struct _DEVICE_OBJECT * SourceDevice , struct _DEVICE_OBJECT * TargetDevice ) ; #line 13193 typedef BOOLEAN ( * PFAST_IO_QUERY_NETWORK_OPEN_INFO )(struct _FILE_OBJECT * FileObject , BOOLEAN Wait , struct _FILE_NETWORK_OPEN_INFORMATION * Buffer , struct _IO_STATUS_BLOCK * IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13207 typedef BOOLEAN ( * PFAST_IO_MDL_READ )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , ULONG Length , ULONG LockKey , PMDL * MdlChain , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13219 typedef BOOLEAN ( * PFAST_IO_MDL_READ_COMPLETE )(struct _FILE_OBJECT * FileObject , PMDL MdlChain , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13227 typedef BOOLEAN ( * PFAST_IO_PREPARE_MDL_WRITE )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , ULONG Length , ULONG LockKey , PMDL * MdlChain , PIO_STATUS_BLOCK IoStatus , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13239 typedef BOOLEAN ( * PFAST_IO_MDL_WRITE_COMPLETE )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , PMDL MdlChain , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13253 typedef NTSTATUS ( * PFAST_IO_ACQUIRE_FOR_MOD_WRITE )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER EndingOffset , struct _ERESOURCE * * ResourceToRelease , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13262 typedef NTSTATUS ( * PFAST_IO_RELEASE_FOR_MOD_WRITE )(struct _FILE_OBJECT * FileObject , struct _ERESOURCE * ResourceToRelease , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13275 typedef NTSTATUS ( * PFAST_IO_ACQUIRE_FOR_CCFLUSH )(struct _FILE_OBJECT * FileObject , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13282 typedef NTSTATUS ( * PFAST_IO_RELEASE_FOR_CCFLUSH )(struct _FILE_OBJECT * FileObject , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13289 typedef BOOLEAN ( * PFAST_IO_READ_COMPRESSED )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , ULONG Length , ULONG LockKey , PVOID Buffer , PMDL * MdlChain , PIO_STATUS_BLOCK IoStatus , struct _COMPRESSED_DATA_INFO * CompressedDataInfo , ULONG CompressedDataInfoLength , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13304 typedef BOOLEAN ( * PFAST_IO_WRITE_COMPRESSED )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , ULONG Length , ULONG LockKey , PVOID Buffer , PMDL * MdlChain , PIO_STATUS_BLOCK IoStatus , struct _COMPRESSED_DATA_INFO * CompressedDataInfo , ULONG CompressedDataInfoLength , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13319 typedef BOOLEAN ( * PFAST_IO_MDL_READ_COMPLETE_COMPRESSED )(struct _FILE_OBJECT * FileObject , PMDL MdlChain , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13327 typedef BOOLEAN ( * PFAST_IO_MDL_WRITE_COMPLETE_COMPRESSED )(struct _FILE_OBJECT * FileObject , PLARGE_INTEGER FileOffset , PMDL MdlChain , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13336 typedef BOOLEAN ( * PFAST_IO_QUERY_OPEN )(struct _IRP * Irp , PFILE_NETWORK_OPEN_INFORMATION NetworkInformation , struct _DEVICE_OBJECT * DeviceObject ) ; #line 13350 typedef struct _FAST_IO_DISPATCH { ULONG SizeOfFastIoDispatch ; PFAST_IO_CHECK_IF_POSSIBLE FastIoCheckIfPossible ; PFAST_IO_READ FastIoRead ; PFAST_IO_WRITE FastIoWrite ; PFAST_IO_QUERY_BASIC_INFO FastIoQueryBasicInfo ; PFAST_IO_QUERY_STANDARD_INFO FastIoQueryStandardInfo ; PFAST_IO_LOCK FastIoLock ; PFAST_IO_UNLOCK_SINGLE FastIoUnlockSingle ; PFAST_IO_UNLOCK_ALL FastIoUnlockAll ; PFAST_IO_UNLOCK_ALL_BY_KEY FastIoUnlockAllByKey ; PFAST_IO_DEVICE_CONTROL FastIoDeviceControl ; PFAST_IO_ACQUIRE_FILE AcquireFileForNtCreateSection ; PFAST_IO_RELEASE_FILE ReleaseFileForNtCreateSection ; PFAST_IO_DETACH_DEVICE FastIoDetachDevice ; PFAST_IO_QUERY_NETWORK_OPEN_INFO FastIoQueryNetworkOpenInfo ; PFAST_IO_ACQUIRE_FOR_MOD_WRITE AcquireForModWrite ; PFAST_IO_MDL_READ MdlRead ; PFAST_IO_MDL_READ_COMPLETE MdlReadComplete ; PFAST_IO_PREPARE_MDL_WRITE PrepareMdlWrite ; PFAST_IO_MDL_WRITE_COMPLETE MdlWriteComplete ; PFAST_IO_READ_COMPRESSED FastIoReadCompressed ; PFAST_IO_WRITE_COMPRESSED FastIoWriteCompressed ; PFAST_IO_MDL_READ_COMPLETE_COMPRESSED MdlReadCompleteCompressed ; PFAST_IO_MDL_WRITE_COMPLETE_COMPRESSED MdlWriteCompleteCompressed ; PFAST_IO_QUERY_OPEN FastIoQueryOpen ; PFAST_IO_RELEASE_FOR_MOD_WRITE ReleaseForModWrite ; PFAST_IO_ACQUIRE_FOR_CCFLUSH AcquireForCcFlush ; PFAST_IO_RELEASE_FOR_CCFLUSH ReleaseForCcFlush ; } FAST_IO_DISPATCH , * PFAST_IO_DISPATCH ; #line 13386 typedef enum _IO_ALLOCATION_ACTION { KeepObject = 1, DeallocateObject, DeallocateObjectKeepRegisters } IO_ALLOCATION_ACTION , * PIO_ALLOCATION_ACTION ; #line 13396 typedef IO_ALLOCATION_ACTION ( * PDRIVER_CONTROL )(struct _DEVICE_OBJECT * DeviceObject , struct _IRP * Irp , PVOID MapRegisterBase , PVOID Context ) ; #line 13410 typedef struct _IO_SECURITY_CONTEXT { PSECURITY_QUALITY_OF_SERVICE SecurityQos ; PACCESS_STATE AccessState ; ACCESS_MASK DesiredAccess ; ULONG FullCreateOptions ; } IO_SECURITY_CONTEXT , * PIO_SECURITY_CONTEXT ; #line 13434 typedef struct _VPB { CSHORT Type ; CSHORT Size ; USHORT Flags ; USHORT VolumeLabelLength ; struct _DEVICE_OBJECT * DeviceObject ; struct _DEVICE_OBJECT * RealDevice ; ULONG SerialNumber ; ULONG ReferenceCount ; WCHAR VolumeLabel[32 * sizeof(WCHAR ) / sizeof(WCHAR )] ; } VPB , * PVPB ; #line 13482 typedef struct _ADAPTER_OBJECT * PADAPTER_OBJECT ; #line 13491 typedef struct _WAIT_CONTEXT_BLOCK { KDEVICE_QUEUE_ENTRY WaitQueueEntry ; PDRIVER_CONTROL DeviceRoutine ; PVOID DeviceContext ; ULONG NumberOfMapRegisters ; PVOID DeviceObject ; PVOID CurrentIrp ; PKDPC BufferChainingDpc ; } WAIT_CONTEXT_BLOCK , * PWAIT_CONTEXT_BLOCK ; #line 13503 typedef struct _CONTROLLER_OBJECT { CSHORT Type ; CSHORT Size ; PVOID ControllerExtension ; KDEVICE_QUEUE DeviceWaitQueue ; ULONG Spare1 ; LARGE_INTEGER Spare2 ; } CONTROLLER_OBJECT , * PCONTROLLER_OBJECT ; #line 13537 typedef struct _DEVICE_OBJECT { CSHORT Type ; USHORT Size ; LONG ReferenceCount ; struct _DRIVER_OBJECT * DriverObject ; struct _DEVICE_OBJECT * NextDevice ; struct _DEVICE_OBJECT * AttachedDevice ; struct _IRP * CurrentIrp ; PIO_TIMER Timer ; ULONG Flags ; ULONG Characteristics ; PVPB Vpb ; PVOID DeviceExtension ; ULONG DeviceType ; CCHAR StackSize ; union { LIST_ENTRY ListEntry ; WAIT_CONTEXT_BLOCK Wcb ; } Queue ; ULONG AlignmentRequirement ; KDEVICE_QUEUE DeviceQueue ; KDPC Dpc ; ULONG ActiveThreadCount ; PSECURITY_DESCRIPTOR SecurityDescriptor ; KEVENT DeviceLock ; USHORT SectorSize ; USHORT Spare1 ; struct _DEVOBJ_EXTENSION * DeviceObjectExtension ; PVOID Reserved ; } DEVICE_OBJECT ; #line 13575 typedef struct _DEVICE_OBJECT * PDEVICE_OBJECT ; #line 13578 struct _DEVICE_OBJECT_POWER_EXTENSION ; typedef struct _DEVOBJ_EXTENSION { CSHORT Type ; USHORT Size ; PDEVICE_OBJECT DeviceObject ; } DEVOBJ_EXTENSION , * PDEVOBJ_EXTENSION ; #line 13608 typedef struct _DRIVER_EXTENSION { struct _DRIVER_OBJECT * DriverObject ; PDRIVER_ADD_DEVICE AddDevice ; ULONG Count ; UNICODE_STRING ServiceKeyName ; } DRIVER_EXTENSION , * PDRIVER_EXTENSION ; #line 13645 typedef struct _DRIVER_OBJECT { CSHORT Type ; CSHORT Size ; PDEVICE_OBJECT DeviceObject ; ULONG Flags ; PVOID DriverStart ; ULONG DriverSize ; PVOID DriverSection ; PDRIVER_EXTENSION DriverExtension ; UNICODE_STRING DriverName ; PUNICODE_STRING HardwareDatabase ; PFAST_IO_DISPATCH FastIoDispatch ; PDRIVER_INITIALIZE DriverInit ; PDRIVER_STARTIO DriverStartIo ; PDRIVER_UNLOAD DriverUnload ; PDRIVER_DISPATCH MajorFunction[0x1b + 1] ; } DRIVER_OBJECT ; #line 13706 typedef struct _DRIVER_OBJECT * PDRIVER_OBJECT ; #line 13715 typedef struct _SECTION_OBJECT_POINTERS { PVOID DataSectionObject ; PVOID SharedCacheMap ; PVOID ImageSectionObject ; } SECTION_OBJECT_POINTERS ; #line 13720 typedef SECTION_OBJECT_POINTERS * PSECTION_OBJECT_POINTERS ; #line 13726 typedef struct _IO_COMPLETION_CONTEXT { PVOID Port ; PVOID Key ; } IO_COMPLETION_CONTEXT , * PIO_COMPLETION_CONTEXT ; #line 13759 typedef struct _FILE_OBJECT { CSHORT Type ; CSHORT Size ; PDEVICE_OBJECT DeviceObject ; PVPB Vpb ; PVOID FsContext ; PVOID FsContext2 ; PSECTION_OBJECT_POINTERS SectionObjectPointer ; PVOID PrivateCacheMap ; NTSTATUS FinalStatus ; struct _FILE_OBJECT * RelatedFileObject ; BOOLEAN LockOperation ; BOOLEAN DeletePending ; BOOLEAN ReadAccess ; BOOLEAN WriteAccess ; BOOLEAN DeleteAccess ; BOOLEAN SharedRead ; BOOLEAN SharedWrite ; BOOLEAN SharedDelete ; ULONG Flags ; UNICODE_STRING FileName ; LARGE_INTEGER CurrentByteOffset ; ULONG Waiters ; ULONG Busy ; PVOID LastLock ; KEVENT Lock ; KEVENT Event ; PIO_COMPLETION_CONTEXT CompletionContext ; } FILE_OBJECT ; #line 13788 typedef struct _FILE_OBJECT * PFILE_OBJECT ; #line 13828 typedef struct _IRP { CSHORT Type ; USHORT Size ; PMDL MdlAddress ; ULONG Flags ; union { struct _IRP * MasterIrp ; LONG IrpCount ; PVOID SystemBuffer ; } AssociatedIrp ; LIST_ENTRY ThreadListEntry ; IO_STATUS_BLOCK IoStatus ; KPROCESSOR_MODE RequestorMode ; BOOLEAN PendingReturned ; CHAR StackCount ; CHAR CurrentLocation ; BOOLEAN Cancel ; KIRQL CancelIrql ; CCHAR ApcEnvironment ; UCHAR AllocationFlags ; PIO_STATUS_BLOCK UserIosb ; PKEVENT UserEvent ; union { struct { PIO_APC_ROUTINE UserApcRoutine ; PVOID UserApcContext ; } AsynchronousParameters ; LARGE_INTEGER AllocationSize ; } Overlay ; PDRIVER_CANCEL CancelRoutine ; PVOID UserBuffer ; union { struct { union { KDEVICE_QUEUE_ENTRY DeviceQueueEntry ; struct { PVOID DriverContext[4] ; } ; } ; PETHREAD Thread ; PCHAR AuxiliaryBuffer ; struct { LIST_ENTRY ListEntry ; union { struct _IO_STACK_LOCATION * CurrentStackLocation ; ULONG PacketType ; } ; } ; PFILE_OBJECT OriginalFileObject ; } Overlay ; KAPC Apc ; PVOID CompletionKey ; } Tail ; } IRP , * PIRP ; #line 14078 typedef NTSTATUS ( * PIO_COMPLETION_ROUTINE )(PDEVICE_OBJECT DeviceObject , PIRP Irp , PVOID Context ) ; #line 14163 typedef enum _DEVICE_RELATION_TYPE { BusRelations, EjectionRelations, PowerRelations, RemovalRelations, TargetDeviceRelation } DEVICE_RELATION_TYPE , * PDEVICE_RELATION_TYPE ; typedef struct _DEVICE_RELATIONS { ULONG Count ; PDEVICE_OBJECT Objects[1] ; } DEVICE_RELATIONS , * PDEVICE_RELATIONS ; typedef enum _DEVICE_USAGE_NOTIFICATION_TYPE { DeviceUsageTypeUndefined, DeviceUsageTypePaging, DeviceUsageTypeHibernation, DeviceUsageTypeDumpFile } DEVICE_USAGE_NOTIFICATION_TYPE ; #line 14185 typedef struct _INTERFACE { USHORT Size ; USHORT Version ; PVOID Context ; PINTERFACE_REFERENCE InterfaceReference ; PINTERFACE_DEREFERENCE InterfaceDereference ; } INTERFACE , * PINTERFACE ; #line 14196 typedef struct _DEVICE_CAPABILITIES { USHORT Size ; USHORT Version ; ULONG DeviceD1 : 1; ULONG DeviceD2 : 1; ULONG LockSupported : 1; ULONG EjectSupported : 1; ULONG Removable : 1; ULONG DockDevice : 1; ULONG UniqueID : 1; ULONG SilentInstall : 1; ULONG RawDeviceOK : 1; ULONG SurpriseRemovalOK : 1; ULONG WakeFromD0 : 1; ULONG WakeFromD1 : 1; ULONG WakeFromD2 : 1; ULONG WakeFromD3 : 1; ULONG HardwareDisabled : 1; ULONG NonDynamic : 1; ULONG WarmEjectSupported : 1; ULONG Reserved : 15; ULONG Address ; ULONG UINumber ; DEVICE_POWER_STATE DeviceState[PowerSystemMaximum] ; SYSTEM_POWER_STATE SystemWake ; DEVICE_POWER_STATE DeviceWake ; ULONG D1Latency ; ULONG D2Latency ; ULONG D3Latency ; } DEVICE_CAPABILITIES , * PDEVICE_CAPABILITIES ; #line 14229 typedef struct _POWER_SEQUENCE { ULONG SequenceD1 ; ULONG SequenceD2 ; ULONG SequenceD3 ; } POWER_SEQUENCE , * PPOWER_SEQUENCE ; typedef enum { BusQueryDeviceID = 0, BusQueryHardwareIDs = 1, BusQueryCompatibleIDs = 2, BusQueryInstanceID = 3, BusQueryDeviceSerialNumber = 4 } BUS_QUERY_ID_TYPE , * PBUS_QUERY_ID_TYPE ; typedef ULONG PNP_DEVICE_STATE , * PPNP_DEVICE_STATE ; #line 14252 typedef enum { DeviceTextDescription = 0, DeviceTextLocationInformation = 1 } DEVICE_TEXT_TYPE , * PDEVICE_TEXT_TYPE ; #line 24 "C:/NTDDK/inc/pshpack4.h" #pragma warning(disable:4103) #pragma pack(push, 4) #line 14271 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _IO_STACK_LOCATION { UCHAR MajorFunction ; UCHAR MinorFunction ; UCHAR Flags ; UCHAR Control ; union { struct { PIO_SECURITY_CONTEXT SecurityContext ; ULONG Options ; USHORT FileAttributes ; USHORT ShareAccess ; ULONG EaLength ; } Create ; struct { ULONG Length ; ULONG Key ; LARGE_INTEGER ByteOffset ; } Read ; struct { ULONG Length ; ULONG Key ; LARGE_INTEGER ByteOffset ; } Write ; struct { ULONG Length ; FILE_INFORMATION_CLASS FileInformationClass ; } QueryFile ; struct { ULONG Length ; FILE_INFORMATION_CLASS FileInformationClass ; PFILE_OBJECT FileObject ; union { struct { BOOLEAN ReplaceIfExists ; BOOLEAN AdvanceOnly ; } ; ULONG ClusterCount ; HANDLE DeleteHandle ; } ; } SetFile ; struct { ULONG Length ; FS_INFORMATION_CLASS FsInformationClass ; } QueryVolume ; struct { ULONG OutputBufferLength ; ULONG InputBufferLength ; ULONG IoControlCode ; PVOID Type3InputBuffer ; } DeviceIoControl ; struct { SECURITY_INFORMATION SecurityInformation ; ULONG Length ; } QuerySecurity ; struct { SECURITY_INFORMATION SecurityInformation ; PSECURITY_DESCRIPTOR SecurityDescriptor ; } SetSecurity ; struct { PVPB Vpb ; PDEVICE_OBJECT DeviceObject ; } MountVolume ; struct { PVPB Vpb ; PDEVICE_OBJECT DeviceObject ; } VerifyVolume ; struct { struct _SCSI_REQUEST_BLOCK * Srb ; } Scsi ; struct { DEVICE_RELATION_TYPE Type ; } QueryDeviceRelations ; struct { const GUID * InterfaceType ; USHORT Size ; USHORT Version ; PINTERFACE Interface ; PVOID InterfaceSpecificData ; } QueryInterface ; struct { PDEVICE_CAPABILITIES Capabilities ; } DeviceCapabilities ; struct { PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList ; } FilterResourceRequirements ; struct { ULONG WhichSpace ; PVOID Buffer ; ULONG Offset ; ULONG Length ; } ReadWriteConfig ; struct { BOOLEAN Lock ; } SetLock ; struct { BUS_QUERY_ID_TYPE IdType ; } QueryId ; struct { DEVICE_TEXT_TYPE DeviceTextType ; LCID LocaleId ; } QueryDeviceText ; struct { BOOLEAN InPath ; BOOLEAN Reserved[3] ; DEVICE_USAGE_NOTIFICATION_TYPE Type ; } UsageNotification ; struct { SYSTEM_POWER_STATE PowerState ; } WaitWake ; struct { PPOWER_SEQUENCE PowerSequence ; } PowerSequence ; struct { ULONG SystemContext ; POWER_STATE_TYPE Type ; POWER_STATE State ; POWER_ACTION ShutdownType ; } Power ; struct { PCM_RESOURCE_LIST AllocatedResources ; PCM_RESOURCE_LIST AllocatedResourcesTranslated ; } StartDevice ; struct { ULONG_PTR ProviderId ; PVOID DataPath ; ULONG BufferSize ; PVOID Buffer ; } WMI ; struct { PVOID Argument1 ; PVOID Argument2 ; PVOID Argument3 ; PVOID Argument4 ; } Others ; } Parameters ; PDEVICE_OBJECT DeviceObject ; PFILE_OBJECT FileObject ; PIO_COMPLETION_ROUTINE CompletionRoutine ; PVOID Context ; } IO_STACK_LOCATION , * PIO_STACK_LOCATION ; #line 27 "C:/NTDDK/inc/poppack.h" #pragma warning(disable:4103) #pragma pack(pop) #line 14615 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _SHARE_ACCESS { ULONG OpenCount ; ULONG Readers ; ULONG Writers ; ULONG Deleters ; ULONG SharedRead ; ULONG SharedWrite ; ULONG SharedDelete ; } SHARE_ACCESS , * PSHARE_ACCESS ; #line 14635 typedef struct _CONFIGURATION_INFORMATION { ULONG DiskCount ; ULONG FloppyCount ; ULONG CdRomCount ; ULONG TapeCount ; ULONG ScsiPortCount ; ULONG SerialCount ; ULONG ParallelCount ; BOOLEAN AtDiskPrimaryAddressClaimed ; BOOLEAN AtDiskSecondaryAddressClaimed ; ULONG Version ; ULONG MediumChangerCount ; } CONFIGURATION_INFORMATION , * PCONFIGURATION_INFORMATION ; #line 14681 __declspec(dllimport) void IoAcquireCancelSpinLock(PKIRQL Irql ) ; #line 14688 __declspec(dllimport) NTSTATUS IoAllocateAdapterChannel(PADAPTER_OBJECT AdapterObject , PDEVICE_OBJECT DeviceObject , ULONG NumberOfMapRegisters , PDRIVER_CONTROL ExecutionRoutine , PVOID Context ) ; #line 14698 __declspec(dllimport) void IoAllocateController(PCONTROLLER_OBJECT ControllerObject , PDEVICE_OBJECT DeviceObject , PDRIVER_CONTROL ExecutionRoutine , PVOID Context ) ; #line 14709 __declspec(dllimport) NTSTATUS IoAllocateDriverObjectExtension(PDRIVER_OBJECT DriverObject , PVOID ClientIdentificationAddress , ULONG DriverObjectExtensionSize , PVOID * DriverObjectExtension ) ; #line 14720 __declspec(dllimport) PVOID IoAllocateErrorLogEntry(PVOID IoObject , UCHAR EntrySize ) ; #line 14727 __declspec(dllimport) PIRP IoAllocateIrp(CCHAR StackSize , BOOLEAN ChargeQuota ) ; #line 14734 __declspec(dllimport) PMDL IoAllocateMdl(PVOID VirtualAddress , ULONG Length , BOOLEAN SecondaryBuffer , BOOLEAN ChargeQuota , PIRP Irp ) ; #line 14776 __declspec(dllimport) NTSTATUS IoAssignResources(PUNICODE_STRING RegistryPath , PUNICODE_STRING DriverClassName , PDRIVER_OBJECT DriverObject , PDEVICE_OBJECT DeviceObject , PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources , PCM_RESOURCE_LIST * AllocatedResources ) ; #line 14788 __declspec(dllimport) NTSTATUS IoAttachDevice(PDEVICE_OBJECT SourceDevice , PUNICODE_STRING TargetDevice , PDEVICE_OBJECT * AttachedDevice ) ; #line 14798 __declspec(dllimport) NTSTATUS IoAttachDeviceByPointer(PDEVICE_OBJECT SourceDevice , PDEVICE_OBJECT TargetDevice ) ; #line 14807 __declspec(dllimport) PDEVICE_OBJECT IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice , PDEVICE_OBJECT TargetDevice ) ; #line 14814 __declspec(dllimport) PIRP IoBuildAsynchronousFsdRequest(ULONG MajorFunction , PDEVICE_OBJECT DeviceObject , PVOID Buffer , ULONG Length , PLARGE_INTEGER StartingOffset , PIO_STATUS_BLOCK IoStatusBlock ) ; #line 14825 __declspec(dllimport) PIRP IoBuildDeviceIoControlRequest(ULONG IoControlCode , PDEVICE_OBJECT DeviceObject , PVOID InputBuffer , ULONG InputBufferLength , PVOID OutputBuffer , ULONG OutputBufferLength , BOOLEAN InternalDeviceIoControl , PKEVENT Event , PIO_STATUS_BLOCK IoStatusBlock ) ; #line 14839 __declspec(dllimport) void IoBuildPartialMdl(PMDL SourceMdl , PMDL TargetMdl , PVOID VirtualAddress , ULONG Length ) ; #line 14848 typedef struct _BOOTDISK_INFORMATION { LONGLONG BootPartitionOffset ; LONGLONG SystemPartitionOffset ; ULONG BootDeviceSignature ; ULONG SystemDeviceSignature ; } BOOTDISK_INFORMATION , * PBOOTDISK_INFORMATION ; __declspec(dllimport) NTSTATUS IoGetBootDiskInformation(PBOOTDISK_INFORMATION BootDiskInformation , ULONG Size ) ; #line 14863 __declspec(dllimport) PIRP IoBuildSynchronousFsdRequest(ULONG MajorFunction , PDEVICE_OBJECT DeviceObject , PVOID Buffer , ULONG Length , PLARGE_INTEGER StartingOffset , PKEVENT Event , PIO_STATUS_BLOCK IoStatusBlock ) ; #line 14875 __declspec(dllimport) NTSTATUS _fastcall IofCallDriver(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 14886 __declspec(dllimport) BOOLEAN IoCancelIrp(PIRP Irp ) ; #line 14893 __declspec(dllimport) NTSTATUS IoCheckShareAccess(ACCESS_MASK DesiredAccess , ULONG DesiredShareAccess , PFILE_OBJECT FileObject , PSHARE_ACCESS ShareAccess , BOOLEAN Update ) ; #line 14903 __declspec(dllimport) void _fastcall IofCompleteRequest(PIRP Irp , CCHAR PriorityBoost ) ; #line 14916 __declspec(dllimport) NTSTATUS IoConnectInterrupt(PKINTERRUPT * InterruptObject , PKSERVICE_ROUTINE ServiceRoutine , PVOID ServiceContext , PKSPIN_LOCK SpinLock , ULONG Vector , KIRQL Irql , KIRQL SynchronizeIrql , KINTERRUPT_MODE InterruptMode , BOOLEAN ShareVector , KAFFINITY ProcessorEnableMask , BOOLEAN FloatingSave ) ; #line 14934 __declspec(dllimport) PCONTROLLER_OBJECT IoCreateController(ULONG Size ) ; #line 14942 __declspec(dllimport) NTSTATUS IoCreateDevice(PDRIVER_OBJECT DriverObject , ULONG DeviceExtensionSize , PUNICODE_STRING DeviceName , ULONG DeviceType , ULONG DeviceCharacteristics , BOOLEAN Exclusive , PDEVICE_OBJECT * DeviceObject ) ; #line 14957 __declspec(dllimport) BOOLEAN IoIsWdmVersionAvailable(UCHAR MajorVersion , UCHAR MinorVersion ) ; #line 14966 __declspec(dllimport) NTSTATUS IoCreateFile(PHANDLE FileHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes , PIO_STATUS_BLOCK IoStatusBlock , PLARGE_INTEGER AllocationSize , ULONG FileAttributes , ULONG ShareAccess , ULONG Disposition , ULONG CreateOptions , PVOID EaBuffer , ULONG EaLength , CREATE_FILE_TYPE CreateFileType , PVOID ExtraCreateParameters , ULONG Options ) ; #line 14986 __declspec(dllimport) PKEVENT IoCreateNotificationEvent(PUNICODE_STRING EventName , PHANDLE EventHandle ) ; #line 14993 __declspec(dllimport) NTSTATUS IoCreateSymbolicLink(PUNICODE_STRING SymbolicLinkName , PUNICODE_STRING DeviceName ) ; #line 15002 __declspec(dllimport) PKEVENT IoCreateSynchronizationEvent(PUNICODE_STRING EventName , PHANDLE EventHandle ) ; #line 15011 __declspec(dllimport) NTSTATUS IoCreateUnprotectedSymbolicLink(PUNICODE_STRING SymbolicLinkName , PUNICODE_STRING DeviceName ) ; #line 15049 __declspec(dllimport) void IoDeleteController(PCONTROLLER_OBJECT ControllerObject ) ; #line 15057 __declspec(dllimport) void IoDeleteDevice(PDEVICE_OBJECT DeviceObject ) ; #line 15063 __declspec(dllimport) NTSTATUS IoDeleteSymbolicLink(PUNICODE_STRING SymbolicLinkName ) ; #line 15069 __declspec(dllimport) void IoDetachDevice(PDEVICE_OBJECT TargetDevice ) ; #line 15077 __declspec(dllimport) void IoDisconnectInterrupt(PKINTERRUPT InterruptObject ) ; #line 15084 __declspec(dllimport) void IoFreeController(PCONTROLLER_OBJECT ControllerObject ) ; #line 15092 __declspec(dllimport) void IoFreeIrp(PIRP Irp ) ; #line 15098 __declspec(dllimport) void IoFreeMdl(PMDL Mdl ) ; #line 15104 __declspec(dllimport) PDEVICE_OBJECT IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject ) ; #line 15110 __declspec(dllimport) PCONFIGURATION_INFORMATION IoGetConfigurationInformation(void ) ; #line 15141 __declspec(dllimport) PDEVICE_OBJECT IoGetDeviceToVerify(PETHREAD Thread ) ; #line 15149 __declspec(dllimport) PVOID IoGetDriverObjectExtension(PDRIVER_OBJECT DriverObject , PVOID ClientIdentificationAddress ) ; #line 15156 __declspec(dllimport) PEPROCESS IoGetCurrentProcess(void ) ; #line 15164 __declspec(dllimport) NTSTATUS IoGetDeviceObjectPointer(PUNICODE_STRING ObjectName , ACCESS_MASK DesiredAccess , PFILE_OBJECT * FileObject , PDEVICE_OBJECT * DeviceObject ) ; #line 15173 __declspec(dllimport) struct _DMA_ADAPTER * IoGetDmaAdapter(PDEVICE_OBJECT PhysicalDeviceObject , struct _DEVICE_DESCRIPTION * DeviceDescription , PULONG NumberOfMapRegisters ) ; #line 15183 __declspec(dllimport) PGENERIC_MAPPING IoGetFileObjectGenericMapping(void ) ; #line 15228 __declspec(dllimport) PVOID IoGetInitialStack(void ) ; #line 15234 __declspec(dllimport) void IoGetStackLimits(PULONG_PTR LowLimit , PULONG_PTR HighLimit ) ; #line 15246 __inline ULONG_PTR IoGetRemainingStackSize(void ) { #line 15252 ULONG_PTR Top ; ULONG_PTR Bottom ; #line 15255 IoGetStackLimits(& Bottom, & Top); return (ULONG_PTR )(& Top) - Bottom; } #line 15286 __declspec(dllimport) PDEVICE_OBJECT IoGetRelatedDeviceObject(PFILE_OBJECT FileObject ) ; #line 15326 __declspec(dllimport) void IoInitializeIrp(PIRP Irp , USHORT PacketSize , CCHAR StackSize ) ; #line 15334 __declspec(dllimport) NTSTATUS IoInitializeTimer(PDEVICE_OBJECT DeviceObject , PIO_TIMER_ROUTINE TimerRoutine , PVOID Context ) ; #line 15343 __declspec(dllimport) void IoReuseIrp(PIRP Irp , NTSTATUS Iostatus ) ; #line 15351 __declspec(dllimport) void IoCancelFileOpen(PDEVICE_OBJECT DeviceObject , PFILE_OBJECT FileObject ) ; #line 15390 __declspec(dllimport) PIRP IoMakeAssociatedIrp(PIRP Irp , CCHAR StackSize ) ; #line 15426 __declspec(dllimport) NTSTATUS IoQueryDeviceDescription(PINTERFACE_TYPE BusType , PULONG BusNumber , PCONFIGURATION_TYPE ControllerType , PULONG ControllerNumber , PCONFIGURATION_TYPE PeripheralType , PULONG PeripheralNumber , PIO_QUERY_DEVICE_ROUTINE CalloutRoutine , PVOID Context ) ; #line 15439 __declspec(dllimport) void IoRaiseHardError(PIRP Irp , PVPB Vpb , PDEVICE_OBJECT RealDeviceObject ) ; #line 15447 __declspec(dllimport) BOOLEAN IoRaiseInformationalHardError(NTSTATUS ErrorStatus , PUNICODE_STRING String , PKTHREAD Thread ) ; #line 15455 __declspec(dllimport) BOOLEAN IoSetThreadHardErrorMode(BOOLEAN EnableHardErrors ) ; #line 15461 __declspec(dllimport) void IoRegisterBootDriverReinitialization(PDRIVER_OBJECT DriverObject , PDRIVER_REINITIALIZE DriverReinitializationRoutine , PVOID Context ) ; #line 15469 __declspec(dllimport) void IoRegisterDriverReinitialization(PDRIVER_OBJECT DriverObject , PDRIVER_REINITIALIZE DriverReinitializationRoutine , PVOID Context ) ; #line 15478 __declspec(dllimport) NTSTATUS IoRegisterShutdownNotification(PDEVICE_OBJECT DeviceObject ) ; #line 15484 __declspec(dllimport) NTSTATUS IoRegisterLastChanceShutdownNotification(PDEVICE_OBJECT DeviceObject ) ; #line 15492 __declspec(dllimport) void IoReleaseCancelSpinLock(KIRQL Irql ) ; #line 15499 __declspec(dllimport) void IoRemoveShareAccess(PFILE_OBJECT FileObject , PSHARE_ACCESS ShareAccess ) ; #line 15507 __declspec(dllimport) NTSTATUS IoReportResourceUsage(PUNICODE_STRING DriverClassName , PDRIVER_OBJECT DriverObject , PCM_RESOURCE_LIST DriverList , ULONG DriverListSize , PDEVICE_OBJECT DeviceObject , PCM_RESOURCE_LIST DeviceList , ULONG DeviceListSize , BOOLEAN OverrideConflict , PBOOLEAN ConflictDetected ) ; #line 15641 __declspec(dllimport) void IoSetHardErrorOrVerifyDevice(PIRP Irp , PDEVICE_OBJECT DeviceObject ) ; #line 15743 __declspec(dllimport) void IoSetShareAccess(ACCESS_MASK DesiredAccess , ULONG DesiredShareAccess , PFILE_OBJECT FileObject , PSHARE_ACCESS ShareAccess ) ; #line 15754 typedef struct _IO_REMOVE_LOCK_TRACKING_BLOCK * PIO_REMOVE_LOCK_TRACKING_BLOCK ; #line 15756 typedef struct _IO_REMOVE_LOCK_COMMON_BLOCK { BOOLEAN Removed ; BOOLEAN Reserved[3] ; LONG IoCount ; KEVENT RemoveEvent ; } IO_REMOVE_LOCK_COMMON_BLOCK ; #line 15764 typedef struct _IO_REMOVE_LOCK_DBG_BLOCK { LONG Signature ; LONG HighWatermark ; LONGLONG MaxLockedTicks ; LONG AllocateTag ; LIST_ENTRY LockList ; KSPIN_LOCK Spin ; LONG LowMemoryCount ; ULONG Reserved1[4] ; PVOID Reserved2 ; PIO_REMOVE_LOCK_TRACKING_BLOCK Blocks ; } IO_REMOVE_LOCK_DBG_BLOCK ; typedef struct _IO_REMOVE_LOCK { IO_REMOVE_LOCK_COMMON_BLOCK Common ; } IO_REMOVE_LOCK , * PIO_REMOVE_LOCK ; #line 15787 __declspec(dllimport) void __stdcall IoInitializeRemoveLockEx(PIO_REMOVE_LOCK Lock , ULONG AllocateTag , ULONG MaxLockedMinutes , ULONG HighWatermark , ULONG RemlockSize ) ; #line 15808 __declspec(dllimport) NTSTATUS __stdcall IoAcquireRemoveLockEx(PIO_REMOVE_LOCK RemoveLock , PVOID Tag , PCSTR File , ULONG Line , ULONG RemlockSize ) ; #line 15857 __declspec(dllimport) void __stdcall IoReleaseRemoveLockEx(PIO_REMOVE_LOCK RemoveLock , PVOID Tag , ULONG RemlockSize ) ; #line 15893 __declspec(dllimport) void __stdcall IoReleaseRemoveLockAndWaitEx(PIO_REMOVE_LOCK RemoveLock , PVOID Tag , ULONG RemlockSize ) ; #line 15949 __declspec(dllimport) void IoStartNextPacket(PDEVICE_OBJECT DeviceObject , BOOLEAN Cancelable ) ; #line 15956 __declspec(dllimport) void IoStartNextPacketByKey(PDEVICE_OBJECT DeviceObject , BOOLEAN Cancelable , ULONG Key ) ; #line 15964 __declspec(dllimport) void IoStartPacket(PDEVICE_OBJECT DeviceObject , PIRP Irp , PULONG Key , PDRIVER_CANCEL CancelFunction ) ; #line 15975 __declspec(dllimport) void IoStartTimer(PDEVICE_OBJECT DeviceObject ) ; #line 15981 __declspec(dllimport) void IoStopTimer(PDEVICE_OBJECT DeviceObject ) ; #line 15988 __declspec(dllimport) void IoUnregisterShutdownNotification(PDEVICE_OBJECT DeviceObject ) ; #line 15996 __declspec(dllimport) void IoUpdateShareAccess(PFILE_OBJECT FileObject , PSHARE_ACCESS ShareAccess ) ; #line 16003 __declspec(dllimport) void IoWriteErrorLogEntry(PVOID ElEntry ) ; #line 16009 typedef struct _IO_WORKITEM * PIO_WORKITEM ; typedef void ( * PIO_WORKITEM_ROUTINE )(PDEVICE_OBJECT DeviceObject , PVOID Context ) ; #line 16018 PIO_WORKITEM IoAllocateWorkItem(PDEVICE_OBJECT DeviceObject ) ; #line 16023 void IoFreeWorkItem(PIO_WORKITEM IoWorkItem ) ; #line 16028 void IoQueueWorkItem(PIO_WORKITEM IoWorkItem , PIO_WORKITEM_ROUTINE WorkerRoutine , WORK_QUEUE_TYPE QueueType , PVOID Context ) ; #line 16040 __declspec(dllimport) NTSTATUS IoWMIRegistrationControl(PDEVICE_OBJECT DeviceObject , ULONG Action ) ; #line 16064 __declspec(dllimport) NTSTATUS IoWMIAllocateInstanceIds(GUID * Guid , ULONG InstanceCount , ULONG * FirstInstanceId ) ; #line 16072 __declspec(dllimport) NTSTATUS IoWMISuggestInstanceName(PDEVICE_OBJECT PhysicalDeviceObject , PUNICODE_STRING SymbolicLinkName , BOOLEAN CombineNames , PUNICODE_STRING SuggestedInstanceName ) ; #line 16081 __declspec(dllimport) NTSTATUS IoWMIWriteEvent(PVOID WnodeEventItem ) ; #line 16100 typedef enum { DevicePropertyDeviceDescription, DevicePropertyHardwareID, DevicePropertyCompatibleIDs, DevicePropertyBootConfiguration, DevicePropertyBootConfigurationTranslated, DevicePropertyClassName, DevicePropertyClassGuid, DevicePropertyDriverKeyName, DevicePropertyManufacturer, DevicePropertyFriendlyName, DevicePropertyLocationInformation, DevicePropertyPhysicalDeviceObjectName, DevicePropertyBusTypeGuid, DevicePropertyLegacyBusType, DevicePropertyBusNumber, DevicePropertyEnumeratorName, DevicePropertyAddress, DevicePropertyUINumber } DEVICE_REGISTRY_PROPERTY ; typedef BOOLEAN ( * PTRANSLATE_BUS_ADDRESS )(PVOID Context , PHYSICAL_ADDRESS BusAddress , ULONG Length , PULONG AddressSpace , PPHYSICAL_ADDRESS TranslatedAddress ) ; #line 16129 typedef struct _DMA_ADAPTER * ( * PGET_DMA_ADAPTER )(PVOID Context , struct _DEVICE_DESCRIPTION * DeviceDescriptor , PULONG NumberOfMapRegisters ) ; #line 16135 typedef ULONG ( * PGET_SET_DEVICE_DATA )(PVOID Context , ULONG DataType , PVOID Buffer , ULONG Offset , ULONG Length ) ; #line 16148 typedef struct _PNP_BUS_INFORMATION { GUID BusTypeGuid ; INTERFACE_TYPE LegacyBusType ; ULONG BusNumber ; } PNP_BUS_INFORMATION , * PPNP_BUS_INFORMATION ; #line 16162 typedef struct _LEGACY_BUS_INFORMATION { GUID BusTypeGuid ; INTERFACE_TYPE LegacyBusType ; ULONG BusNumber ; } LEGACY_BUS_INFORMATION , * PLEGACY_BUS_INFORMATION ; typedef struct _BUS_INTERFACE_STANDARD { USHORT Size ; USHORT Version ; PVOID Context ; PINTERFACE_REFERENCE InterfaceReference ; PINTERFACE_DEREFERENCE InterfaceDereference ; PTRANSLATE_BUS_ADDRESS TranslateBusAddress ; PGET_DMA_ADAPTER GetDmaAdapter ; PGET_SET_DEVICE_DATA SetBusData ; PGET_SET_DEVICE_DATA GetBusData ; } BUS_INTERFACE_STANDARD , * PBUS_INTERFACE_STANDARD ; #line 16190 typedef BOOLEAN ( * PGPE_SERVICE_ROUTINE )(PVOID , PVOID ) ; #line 16194 typedef NTSTATUS ( * PGPE_CONNECT_VECTOR )(PDEVICE_OBJECT , ULONG , KINTERRUPT_MODE , BOOLEAN , PGPE_SERVICE_ROUTINE , PVOID , PVOID ) ; #line 16203 typedef NTSTATUS ( * PGPE_DISCONNECT_VECTOR )(PVOID ) ; #line 16206 typedef NTSTATUS ( * PGPE_ENABLE_EVENT )(PDEVICE_OBJECT , PVOID ) ; #line 16210 typedef NTSTATUS ( * PGPE_DISABLE_EVENT )(PDEVICE_OBJECT , PVOID ) ; #line 16214 typedef NTSTATUS ( * PGPE_CLEAR_STATUS )(PDEVICE_OBJECT , PVOID ) ; #line 16218 typedef void ( * PDEVICE_NOTIFY_CALLBACK )(PVOID , ULONG ) ; #line 16222 typedef NTSTATUS ( * PREGISTER_FOR_DEVICE_NOTIFICATIONS )(PDEVICE_OBJECT , PDEVICE_NOTIFY_CALLBACK , PVOID ) ; #line 16227 typedef void ( * PUNREGISTER_FOR_DEVICE_NOTIFICATIONS )(PDEVICE_OBJECT , PDEVICE_NOTIFY_CALLBACK ) ; #line 16231 typedef struct _ACPI_INTERFACE_STANDARD { USHORT Size ; USHORT Version ; PVOID Context ; PINTERFACE_REFERENCE InterfaceReference ; PINTERFACE_DEREFERENCE InterfaceDereference ; PGPE_CONNECT_VECTOR GpeConnectVector ; PGPE_DISCONNECT_VECTOR GpeDisconnectVector ; PGPE_ENABLE_EVENT GpeEnableEvent ; PGPE_DISABLE_EVENT GpeDisableEvent ; PGPE_CLEAR_STATUS GpeClearStatus ; PREGISTER_FOR_DEVICE_NOTIFICATIONS RegisterForDeviceNotifications ; PUNREGISTER_FOR_DEVICE_NOTIFICATIONS UnregisterForDeviceNotifications ; } ACPI_INTERFACE_STANDARD , * PACPI_INTERFACE_STANDARD ; #line 16255 typedef enum _ACPI_REG_TYPE { PM1a_ENABLE, PM1b_ENABLE, PM1a_STATUS, PM1b_STATUS, PM1a_CONTROL, PM1b_CONTROL, GP_STATUS, GP_ENABLE, SMI_CMD, MaxRegType } ACPI_REG_TYPE , * PACPI_REG_TYPE ; typedef USHORT ( * PREAD_ACPI_REGISTER )(ACPI_REG_TYPE AcpiReg , ULONG Register ) ; #line 16272 typedef void ( * PWRITE_ACPI_REGISTER )(ACPI_REG_TYPE AcpiReg , ULONG Register , USHORT Value ) ; #line 16278 typedef struct ACPI_REGS_INTERFACE_STANDARD { USHORT Size ; USHORT Version ; PVOID Context ; PINTERFACE_REFERENCE InterfaceReference ; PINTERFACE_DEREFERENCE InterfaceDereference ; PREAD_ACPI_REGISTER ReadAcpiRegister ; PWRITE_ACPI_REGISTER WriteAcpiRegister ; } ACPI_REGS_INTERFACE_STANDARD , * PACPI_REGS_INTERFACE_STANDARD ; #line 16300 typedef struct { PVOID LinkNode ; ULONG StaticVector ; UCHAR Flags ; } ROUTING_TOKEN , * PROUTING_TOKEN ; #line 16314 typedef NTSTATUS ( * PGET_INTERRUPT_ROUTING )(PDEVICE_OBJECT Pdo , ULONG * Bus , ULONG * PciSlot , UCHAR * InterruptLine , UCHAR * InterruptPin , UCHAR * ClassCode , UCHAR * SubClassCode , PDEVICE_OBJECT * ParentPdo , ROUTING_TOKEN * RoutingToken , UCHAR * Flags ) ; #line 16329 typedef NTSTATUS ( * PSET_INTERRUPT_ROUTING_TOKEN )(PDEVICE_OBJECT Pdo , PROUTING_TOKEN RoutingToken ) ; #line 16336 typedef void ( * PUPDATE_INTERRUPT_LINE )(PDEVICE_OBJECT Pdo , UCHAR LineRegister ) ; #line 16343 typedef struct _INT_ROUTE_INTERFACE_STANDARD { USHORT Size ; USHORT Version ; PVOID Context ; PINTERFACE_REFERENCE InterfaceReference ; PINTERFACE_DEREFERENCE InterfaceDereference ; PGET_INTERRUPT_ROUTING GetInterruptRouting ; PSET_INTERRUPT_ROUTING_TOKEN SetInterruptRoutingToken ; PUPDATE_INTERRUPT_LINE UpdateInterruptLine ; } INT_ROUTE_INTERFACE_STANDARD , * PINT_ROUTE_INTERFACE_STANDARD ; #line 16366 typedef struct _IO_ASSIGNED_RESOURCES { ULONG Count ; PASSIGNED_RESOURCE AssignedResources[1] ; } IO_ASSIGNED_RESOURCES , * PIO_ASSIGNED_RESOURCES ; __declspec(dllimport) NTSTATUS IoGetAssignedResourcesForSuballocation(INTERFACE_TYPE InterfaceType , ULONG BusNumber , ULONG SlotNumber , PIO_RESOURCE_DESCRIPTOR ResourceDescriptor , PIO_ASSIGNED_RESOURCES * List ) ; #line 16381 __declspec(dllimport) NTSTATUS IoReportDetectedDevice(PDRIVER_OBJECT DriverObject , INTERFACE_TYPE LegacyBusType , ULONG BusNumber , ULONG SlotNumber , PCM_RESOURCE_LIST ResourceList , PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements , BOOLEAN ResourceAssigned , PDEVICE_OBJECT * DeviceObject ) ; #line 16396 __declspec(dllimport) void IoInvalidateDeviceRelations(PDEVICE_OBJECT DeviceObject , DEVICE_RELATION_TYPE Type ) ; #line 16403 __declspec(dllimport) void IoRequestDeviceEject(PDEVICE_OBJECT PhysicalDeviceObject ) ; #line 16409 __declspec(dllimport) NTSTATUS IoGetDeviceProperty(PDEVICE_OBJECT DeviceObject , DEVICE_REGISTRY_PROPERTY DeviceProperty , ULONG BufferLength , PVOID PropertyBuffer , PULONG ResultLength ) ; #line 16427 __declspec(dllimport) NTSTATUS IoOpenDeviceRegistryKey(PDEVICE_OBJECT DeviceObject , ULONG DevInstKeyType , ACCESS_MASK DesiredAccess , PHANDLE DevInstRegKey ) ; #line 16436 __declspec(dllimport) NTSTATUS __stdcall IoRegisterDeviceInterface(PDEVICE_OBJECT PhysicalDeviceObject , const GUID * InterfaceClassGuid , PUNICODE_STRING ReferenceString , PUNICODE_STRING SymbolicLinkName ) ; #line 16446 __declspec(dllimport) NTSTATUS IoOpenDeviceInterfaceRegistryKey(PUNICODE_STRING SymbolicLinkName , ACCESS_MASK DesiredAccess , PHANDLE DeviceInterfaceKey ) ; #line 16456 __declspec(dllimport) NTSTATUS IoSetDeviceInterfaceState(PUNICODE_STRING SymbolicLinkName , BOOLEAN Enable ) ; #line 16465 __declspec(dllimport) NTSTATUS __stdcall IoGetDeviceInterfaces(const GUID * InterfaceClassGuid , PDEVICE_OBJECT PhysicalDeviceObject , ULONG Flags , PWSTR * SymbolicLinkList ) ; #line 16477 __declspec(dllimport) NTSTATUS __stdcall IoGetDeviceInterfaceAlias(PUNICODE_STRING SymbolicLinkName , const GUID * AliasInterfaceClassGuid , PUNICODE_STRING AliasSymbolicLinkName ) ; #line 16490 typedef enum _IO_NOTIFICATION_EVENT_CATEGORY { EventCategoryReserved, EventCategoryHardwareProfileChange, EventCategoryDeviceInterfaceChange, EventCategoryTargetDeviceChange } IO_NOTIFICATION_EVENT_CATEGORY ; #line 16504 typedef NTSTATUS ( * PDRIVER_NOTIFICATION_CALLBACK_ROUTINE )(PVOID NotificationStructure , PVOID Context ) ; #line 16512 __declspec(dllimport) NTSTATUS IoRegisterPlugPlayNotification(IO_NOTIFICATION_EVENT_CATEGORY EventCategory , ULONG EventCategoryFlags , PVOID EventCategoryData , PDRIVER_OBJECT DriverObject , PDRIVER_NOTIFICATION_CALLBACK_ROUTINE CallbackRoutine , PVOID Context , PVOID * NotificationEntry ) ; #line 16524 __declspec(dllimport) NTSTATUS IoUnregisterPlugPlayNotification(PVOID NotificationEntry ) ; #line 16530 __declspec(dllimport) NTSTATUS IoReportTargetDeviceChange(PDEVICE_OBJECT PhysicalDeviceObject , PVOID NotificationStructure ) ; #line 16537 typedef void ( * PDEVICE_CHANGE_COMPLETE_CALLBACK )(PVOID Context ) ; #line 16543 __declspec(dllimport) void IoInvalidateDeviceState(PDEVICE_OBJECT PhysicalDeviceObject ) ; #line 16559 __declspec(dllimport) NTSTATUS IoReportTargetDeviceChangeAsynchronous(PDEVICE_OBJECT PhysicalDeviceObject , PVOID NotificationStructure , PDEVICE_CHANGE_COMPLETE_CALLBACK Callback , PVOID Context ) ; #line 16573 typedef enum _ARBITER_ACTION { ArbiterActionTestAllocation, ArbiterActionRetestAllocation, ArbiterActionCommitAllocation, ArbiterActionRollbackAllocation, ArbiterActionQueryAllocatedResources, ArbiterActionWriteReservedResources, ArbiterActionQueryConflict, ArbiterActionQueryArbitrate, ArbiterActionAddReserved, ArbiterActionBootAllocation } ARBITER_ACTION , * PARBITER_ACTION ; typedef struct _ARBITER_CONFLICT_INFO { PDEVICE_OBJECT OwningObject ; ULONGLONG Start ; ULONGLONG End ; } ARBITER_CONFLICT_INFO , * PARBITER_CONFLICT_INFO ; #line 16608 typedef struct _ARBITER_PARAMETERS { union { struct { PLIST_ENTRY ArbitrationList ; ULONG AllocateFromCount ; PCM_PARTIAL_RESOURCE_DESCRIPTOR AllocateFrom ; } TestAllocation ; struct { PLIST_ENTRY ArbitrationList ; ULONG AllocateFromCount ; PCM_PARTIAL_RESOURCE_DESCRIPTOR AllocateFrom ; } RetestAllocation ; struct { PLIST_ENTRY ArbitrationList ; } BootAllocation ; struct { PCM_PARTIAL_RESOURCE_LIST * AllocatedResources ; } QueryAllocatedResources ; struct { PDEVICE_OBJECT PhysicalDeviceObject ; PIO_RESOURCE_DESCRIPTOR ConflictingResource ; PULONG ConflictCount ; PARBITER_CONFLICT_INFO * Conflicts ; } QueryConflict ; struct { PLIST_ENTRY ArbitrationList ; } QueryArbitrate ; struct { PDEVICE_OBJECT ReserveDevice ; } AddReserved ; } Parameters ; } ARBITER_PARAMETERS , * PARBITER_PARAMETERS ; #line 16719 typedef enum _ARBITER_REQUEST_SOURCE { ArbiterRequestUndefined = - 1, ArbiterRequestLegacyReported, ArbiterRequestHalReported, ArbiterRequestLegacyAssigned, ArbiterRequestPnpDetected, ArbiterRequestPnpEnumerated } ARBITER_REQUEST_SOURCE ; #line 16731 typedef enum _ARBITER_RESULT { ArbiterResultUndefined = - 1, ArbiterResultSuccess, ArbiterResultExternalConflict, ArbiterResultNullRequest } ARBITER_RESULT ; #line 16748 __declspec(dllimport) NTSTATUS IoReportResourceForDetection(PDRIVER_OBJECT DriverObject , PCM_RESOURCE_LIST DriverList , ULONG DriverListSize , PDEVICE_OBJECT DeviceObject , PCM_RESOURCE_LIST DeviceList , ULONG DeviceListSize , PBOOLEAN ConflictDetected ) ; #line 16761 typedef struct _ARBITER_LIST_ENTRY { LIST_ENTRY ListEntry ; ULONG AlternativeCount ; PIO_RESOURCE_DESCRIPTOR Alternatives ; PDEVICE_OBJECT PhysicalDeviceObject ; ARBITER_REQUEST_SOURCE RequestSource ; ULONG Flags ; LONG_PTR WorkSpace ; INTERFACE_TYPE InterfaceType ; ULONG SlotNumber ; ULONG BusNumber ; PCM_PARTIAL_RESOURCE_DESCRIPTOR Assignment ; PIO_RESOURCE_DESCRIPTOR SelectedAlternative ; ARBITER_RESULT Result ; } ARBITER_LIST_ENTRY , * PARBITER_LIST_ENTRY ; #line 16832 typedef NTSTATUS ( * PARBITER_HANDLER )(PVOID Context , ARBITER_ACTION Action , PARBITER_PARAMETERS Parameters ) ; #line 16853 typedef struct _ARBITER_INTERFACE { USHORT Size ; USHORT Version ; PVOID Context ; PINTERFACE_REFERENCE InterfaceReference ; PINTERFACE_DEREFERENCE InterfaceDereference ; PARBITER_HANDLER ArbiterHandler ; ULONG Flags ; } ARBITER_INTERFACE , * PARBITER_INTERFACE ; #line 16880 typedef enum _RESOURCE_TRANSLATION_DIRECTION { TranslateChildToParent, TranslateParentToChild } RESOURCE_TRANSLATION_DIRECTION ; #line 16889 typedef NTSTATUS ( * PTRANSLATE_RESOURCE_HANDLER )(PVOID Context , PCM_PARTIAL_RESOURCE_DESCRIPTOR Source , RESOURCE_TRANSLATION_DIRECTION Direction , ULONG AlternativesCount , IO_RESOURCE_DESCRIPTOR Alternatives[] , PDEVICE_OBJECT PhysicalDeviceObject , PCM_PARTIAL_RESOURCE_DESCRIPTOR Target ) ; #line 16901 typedef NTSTATUS ( * PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER )(PVOID Context , PIO_RESOURCE_DESCRIPTOR Source , PDEVICE_OBJECT PhysicalDeviceObject , PULONG TargetCount , PIO_RESOURCE_DESCRIPTOR * Target ) ; #line 16915 typedef struct _TRANSLATOR_INTERFACE { USHORT Size ; USHORT Version ; PVOID Context ; PINTERFACE_REFERENCE InterfaceReference ; PINTERFACE_DEREFERENCE InterfaceDereference ; PTRANSLATE_RESOURCE_HANDLER TranslateResources ; PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER TranslateResourceRequirements ; } TRANSLATOR_INTERFACE , * PTRANSLATOR_INTERFACE ; #line 16931 typedef NTSTATUS ( * PLEGACY_DEVICE_DETECTION_HANDLER )(PVOID Context , INTERFACE_TYPE LegacyBusType , ULONG BusNumber , ULONG SlotNumber , PDEVICE_OBJECT * PhysicalDeviceObject ) ; #line 16945 typedef struct _LEGACY_DEVICE_DETECTION_INTERFACE { USHORT Size ; USHORT Version ; PVOID Context ; PINTERFACE_REFERENCE InterfaceReference ; PINTERFACE_DEREFERENCE InterfaceDereference ; PLEGACY_DEVICE_DETECTION_HANDLER LegacyDeviceDetection ; } LEGACY_DEVICE_DETECTION_INTERFACE , * PLEGACY_DEVICE_DETECTION_INTERFACE ; #line 16959 typedef struct _PLUGPLAY_NOTIFICATION_HEADER { USHORT Version ; USHORT Size ; GUID Event ; } PLUGPLAY_NOTIFICATION_HEADER , * PPLUGPLAY_NOTIFICATION_HEADER ; #line 16972 typedef struct _HWPROFILE_CHANGE_NOTIFICATION { USHORT Version ; USHORT Size ; GUID Event ; } HWPROFILE_CHANGE_NOTIFICATION , * PHWPROFILE_CHANGE_NOTIFICATION ; #line 16986 typedef struct _DEVICE_INTERFACE_CHANGE_NOTIFICATION { USHORT Version ; USHORT Size ; GUID Event ; GUID InterfaceClassGuid ; PUNICODE_STRING SymbolicLinkName ; } DEVICE_INTERFACE_CHANGE_NOTIFICATION , * PDEVICE_INTERFACE_CHANGE_NOTIFICATION ; #line 17006 typedef struct _TARGET_DEVICE_REMOVAL_NOTIFICATION { USHORT Version ; USHORT Size ; GUID Event ; PFILE_OBJECT FileObject ; } TARGET_DEVICE_REMOVAL_NOTIFICATION , * PTARGET_DEVICE_REMOVAL_NOTIFICATION ; #line 17026 typedef struct _TARGET_DEVICE_CUSTOM_NOTIFICATION { USHORT Version ; USHORT Size ; GUID Event ; PFILE_OBJECT FileObject ; LONG NameBufferOffset ; UCHAR CustomDataBuffer[1] ; } TARGET_DEVICE_CUSTOM_NOTIFICATION , * PTARGET_DEVICE_CUSTOM_NOTIFICATION ; #line 17054 typedef struct _DEVICE_DESCRIPTION { ULONG Version ; BOOLEAN Master ; BOOLEAN ScatterGather ; BOOLEAN DemandMode ; BOOLEAN AutoInitialize ; BOOLEAN Dma32BitAddresses ; BOOLEAN IgnoreCount ; BOOLEAN Reserved1 ; BOOLEAN Dma64BitAddresses ; ULONG BusNumber ; ULONG DmaChannel ; INTERFACE_TYPE InterfaceType ; DMA_WIDTH DmaWidth ; DMA_SPEED DmaSpeed ; ULONG MaximumLength ; ULONG DmaPort ; } DEVICE_DESCRIPTION , * PDEVICE_DESCRIPTION ; #line 17086 typedef BOOLEAN ( * PHAL_RESET_DISPLAY_PARAMETERS )(ULONG Columns , ULONG Rows ) ; #line 17093 __declspec(dllimport) void HalAcquireDisplayOwnership(PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters ) ; #line 17114 __declspec(dllimport) void KeFlushWriteBuffer(void ) ; #line 17124 __declspec(dllimport) NTSTATUS HalAssignSlotResources(PUNICODE_STRING RegistryPath , PUNICODE_STRING DriverClassName , PDRIVER_OBJECT DriverObject , PDEVICE_OBJECT DeviceObject , INTERFACE_TYPE BusType , ULONG BusNumber , ULONG SlotNumber , PCM_RESOURCE_LIST * AllocatedResources ) ; #line 17137 __declspec(dllimport) ULONG HalGetInterruptVector(INTERFACE_TYPE InterfaceType , ULONG BusNumber , ULONG BusInterruptLevel , ULONG BusInterruptVector , PKIRQL Irql , PKAFFINITY Affinity ) ; #line 17148 __declspec(dllimport) ULONG HalSetBusData(BUS_DATA_TYPE BusDataType , ULONG BusNumber , ULONG SlotNumber , PVOID Buffer , ULONG Length ) ; #line 17159 __declspec(dllimport) ULONG HalSetBusDataByOffset(BUS_DATA_TYPE BusDataType , ULONG BusNumber , ULONG SlotNumber , PVOID Buffer , ULONG Offset , ULONG Length ) ; #line 17170 __declspec(dllimport) BOOLEAN HalTranslateBusAddress(INTERFACE_TYPE InterfaceType , ULONG BusNumber , PHYSICAL_ADDRESS BusAddress , PULONG AddressSpace , PPHYSICAL_ADDRESS TranslatedAddress ) ; #line 17196 __declspec(dllimport) PVOID HalAllocateCrashDumpRegisters(PADAPTER_OBJECT AdapterObject , PULONG NumberOfMapRegisters ) ; #line 17204 __declspec(dllimport) ULONG HalGetBusData(BUS_DATA_TYPE BusDataType , ULONG BusNumber , ULONG SlotNumber , PVOID Buffer , ULONG Length ) ; #line 17215 __declspec(dllimport) ULONG HalGetBusDataByOffset(BUS_DATA_TYPE BusDataType , ULONG BusNumber , ULONG SlotNumber , PVOID Buffer , ULONG Offset , ULONG Length ) ; #line 17226 __declspec(dllimport) PADAPTER_OBJECT HalGetAdapter(PDEVICE_DESCRIPTION DeviceDescription , PULONG NumberOfMapRegisters ) ; #line 17237 __declspec(dllimport) BOOLEAN HalMakeBeep(ULONG Frequency ) ; #line 17282 __declspec(dllimport) NTSTATUS IoReadPartitionTable(PDEVICE_OBJECT DeviceObject , ULONG SectorSize , BOOLEAN ReturnRecognizedPartitions , struct _DRIVE_LAYOUT_INFORMATION * * PartitionBuffer ) ; #line 17291 __declspec(dllimport) NTSTATUS IoSetPartitionInformation(PDEVICE_OBJECT DeviceObject , ULONG SectorSize , ULONG PartitionNumber , ULONG PartitionType ) ; #line 17300 __declspec(dllimport) NTSTATUS IoWritePartitionTable(PDEVICE_OBJECT DeviceObject , ULONG SectorSize , ULONG SectorsPerTrack , ULONG NumberOfHeads , struct _DRIVE_LAYOUT_INFORMATION * PartitionBuffer ) ; #line 17315 __declspec(dllimport) LARGE_INTEGER KeQueryPerformanceCounter(PLARGE_INTEGER PerformanceFrequency ) ; #line 17326 __declspec(dllimport) void KeStallExecutionProcessor(ULONG MicroSeconds ) ; #line 17333 typedef void ( * PDEVICE_CONTROL_COMPLETION )(struct _DEVICE_CONTROL_CONTEXT * ControlContext ) ; #line 17339 typedef struct _DEVICE_CONTROL_CONTEXT { NTSTATUS Status ; PDEVICE_HANDLER_OBJECT DeviceHandler ; PDEVICE_OBJECT DeviceObject ; ULONG ControlCode ; PVOID Buffer ; PULONG BufferLength ; PVOID Context ; } DEVICE_CONTROL_CONTEXT , * PDEVICE_CONTROL_CONTEXT ; typedef PBUS_HANDLER (_fastcall * pHalHandlerForBus )(INTERFACE_TYPE InterfaceType , ULONG BusNumber ) ; #line 17355 typedef void (_fastcall * pHalReferenceBusHandler )(PBUS_HANDLER BusHandler ) ; #line 17365 typedef enum _HAL_QUERY_INFORMATION_CLASS { HalInstalledBusInformation, HalProfileSourceInformation, HalInformationClassUnused1, HalPowerInformation, HalProcessorSpeedInformation, HalCallbackInformation, HalMapRegisterInformation, HalMcaLogInformation, HalFrameBufferCachingInformation, HalDisplayBiosInformation, HalProcessorFeatureInformation } HAL_QUERY_INFORMATION_CLASS , * PHAL_QUERY_INFORMATION_CLASS ; #line 17381 typedef enum _HAL_SET_INFORMATION_CLASS { HalProfileSourceInterval, HalProfileSourceInterruptHandler, HalMcaRegisterDriver } HAL_SET_INFORMATION_CLASS , * PHAL_SET_INFORMATION_CLASS ; #line 17388 typedef NTSTATUS ( * pHalQuerySystemInformation )(HAL_QUERY_INFORMATION_CLASS InformationClass , ULONG BufferSize , PVOID Buffer , PULONG ReturnedLength ) ; #line 17397 NTSTATUS HaliQuerySystemInformation(HAL_SET_INFORMATION_CLASS InformationClass , ULONG BufferSize , PVOID Buffer , PULONG ReturnedLength ) ; #line 17405 typedef NTSTATUS ( * pHalSetSystemInformation )(HAL_SET_INFORMATION_CLASS InformationClass , ULONG BufferSize , PVOID Buffer ) ; #line 17413 NTSTATUS HaliSetSystemInformation(HAL_SET_INFORMATION_CLASS InformationClass , ULONG BufferSize , PVOID Buffer ) ; #line 17420 typedef void (_fastcall * pHalExamineMBR )(PDEVICE_OBJECT DeviceObject , ULONG SectorSize , ULONG MBRTypeIdentifier , PVOID * Buffer ) ; #line 17429 typedef void (_fastcall * pHalIoAssignDriveLetters )(struct _LOADER_PARAMETER_BLOCK * LoaderBlock , PSTRING NtDeviceName , PUCHAR NtSystemPath , PSTRING NtSystemPathString ) ; #line 17438 typedef NTSTATUS (_fastcall * pHalIoReadPartitionTable )(PDEVICE_OBJECT DeviceObject , ULONG SectorSize , BOOLEAN ReturnRecognizedPartitions , struct _DRIVE_LAYOUT_INFORMATION * * PartitionBuffer ) ; #line 17447 typedef NTSTATUS (_fastcall * pHalIoSetPartitionInformation )(PDEVICE_OBJECT DeviceObject , ULONG SectorSize , ULONG PartitionNumber , ULONG PartitionType ) ; #line 17456 typedef NTSTATUS (_fastcall * pHalIoWritePartitionTable )(PDEVICE_OBJECT DeviceObject , ULONG SectorSize , ULONG SectorsPerTrack , ULONG NumberOfHeads , struct _DRIVE_LAYOUT_INFORMATION * PartitionBuffer ) ; #line 17466 typedef NTSTATUS ( * pHalQueryBusSlots )(PBUS_HANDLER BusHandler , ULONG BufferSize , PULONG SlotNumbers , PULONG ReturnedLength ) ; #line 17475 typedef NTSTATUS ( * pHalInitPnpDriver )(void ) ; #line 17481 NTSTATUS HaliInitPnpDriver(void ) ; #line 17486 typedef struct _PM_DISPATCH_TABLE { ULONG Signature ; ULONG Version ; PVOID Function[1] ; } PM_DISPATCH_TABLE , * PPM_DISPATCH_TABLE ; typedef NTSTATUS ( * pHalInitPowerManagement )(PPM_DISPATCH_TABLE PmDriverDispatchTable , PPM_DISPATCH_TABLE * PmHalDispatchTable ) ; #line 17499 NTSTATUS HaliInitPowerManagement(PPM_DISPATCH_TABLE PmDriverDispatchTable , PPM_DISPATCH_TABLE * PmHalDispatchTable ) ; #line 17505 typedef struct _DMA_ADAPTER * ( * pHalGetDmaAdapter )(PVOID Context , struct _DEVICE_DESCRIPTION * DeviceDescriptor , PULONG NumberOfMapRegisters ) ; #line 17513 struct _DMA_ADAPTER * HaliGetDmaAdapter(PVOID Context , struct _DEVICE_DESCRIPTION * DeviceDescriptor , PULONG NumberOfMapRegisters ) ; #line 17520 typedef NTSTATUS ( * pHalGetInterruptTranslator )(INTERFACE_TYPE ParentInterfaceType , ULONG ParentBusNumber , INTERFACE_TYPE BridgeInterfaceType , USHORT Size , USHORT Version , PTRANSLATOR_INTERFACE Translator , PULONG BridgeBusNumber ) ; #line 17532 NTSTATUS HaliGetInterruptTranslator(INTERFACE_TYPE ParentInterfaceType , ULONG ParentBusNumber , INTERFACE_TYPE BridgeInterfaceType , USHORT Size , USHORT Version , PTRANSLATOR_INTERFACE Translator , PULONG BridgeBusNumber ) ; #line 17543 typedef BOOLEAN ( * pHalTranslateBusAddress )(INTERFACE_TYPE InterfaceType , ULONG BusNumber , PHYSICAL_ADDRESS BusAddress , PULONG AddressSpace , PPHYSICAL_ADDRESS TranslatedAddress ) ; #line 17553 typedef NTSTATUS ( * pHalAssignSlotResources )(PUNICODE_STRING RegistryPath , PUNICODE_STRING DriverClassName , PDRIVER_OBJECT DriverObject , PDEVICE_OBJECT DeviceObject , INTERFACE_TYPE BusType , ULONG BusNumber , ULONG SlotNumber , PCM_RESOURCE_LIST * AllocatedResources ) ; #line 17566 typedef void ( * pHalHaltSystem )(void ) ; #line 17572 typedef void ( * pHalResetDisplay )(void ) ; #line 17578 typedef BOOLEAN ( * pHalFindBusAddressTranslation )(PHYSICAL_ADDRESS BusAddress , PULONG AddressSpace , PPHYSICAL_ADDRESS TranslatedAddress , PULONG_PTR Context , BOOLEAN NextBus ) ; #line 17588 typedef struct { ULONG Version ; pHalQuerySystemInformation HalQuerySystemInformation ; pHalSetSystemInformation HalSetSystemInformation ; pHalQueryBusSlots HalQueryBusSlots ; ULONG Spare1 ; pHalExamineMBR HalExamineMBR ; pHalIoAssignDriveLetters HalIoAssignDriveLetters ; pHalIoReadPartitionTable HalIoReadPartitionTable ; pHalIoSetPartitionInformation HalIoSetPartitionInformation ; pHalIoWritePartitionTable HalIoWritePartitionTable ; pHalHandlerForBus HalReferenceHandlerForBus ; pHalReferenceBusHandler HalReferenceBusHandler ; pHalReferenceBusHandler HalDereferenceBusHandler ; pHalInitPnpDriver HalInitPnpDriver ; pHalInitPowerManagement HalInitPowerManagement ; pHalGetDmaAdapter HalGetDmaAdapter ; pHalGetInterruptTranslator HalGetInterruptTranslator ; } HAL_DISPATCH , * PHAL_DISPATCH ; #line 17613 extern PHAL_DISPATCH HalDispatchTable ; #line 17650 typedef struct _HAL_BUS_INFORMATION { INTERFACE_TYPE BusType ; BUS_DATA_TYPE ConfigurationType ; ULONG BusNumber ; ULONG Reserved ; } HAL_BUS_INFORMATION , * PHAL_BUS_INFORMATION ; #line 17658 typedef struct _HAL_PROFILE_SOURCE_INFORMATION { KPROFILE_SOURCE Source ; BOOLEAN Supported ; ULONG Interval ; } HAL_PROFILE_SOURCE_INFORMATION , * PHAL_PROFILE_SOURCE_INFORMATION ; #line 17665 typedef struct _HAL_PROFILE_SOURCE_INTERVAL { KPROFILE_SOURCE Source ; ULONG_PTR Interval ; } HAL_PROFILE_SOURCE_INTERVAL , * PHAL_PROFILE_SOURCE_INTERVAL ; #line 17671 typedef enum _HAL_DISPLAY_BIOS_INFORMATION { HalDisplayInt10Bios, HalDisplayEmulatedBios, HalDisplayNoBios } HAL_DISPLAY_BIOS_INFORMATION , * PHAL_DISPLAY_BIOS_INFORMATION ; #line 17678 typedef struct _HAL_POWER_INFORMATION { ULONG TBD ; } HAL_POWER_INFORMATION , * PHAL_POWER_INFORMATION ; #line 17683 typedef struct _HAL_PROCESSOR_SPEED_INFO { ULONG TBD ; } HAL_PROCESSOR_SPEED_INFORMATION , * PHAL_PROCESSOR_SPEED_INFORMATION ; #line 17688 typedef struct _HAL_CALLBACKS { PCALLBACK_OBJECT___0 SetSystemInformation ; PCALLBACK_OBJECT___0 BusCheck ; } HAL_CALLBACKS , * PHAL_CALLBACKS ; #line 17694 typedef struct _HAL_PROCESSOR_FEATURE { ULONG UsableFeatureBits ; } HAL_PROCESSOR_FEATURE ; #line 17706 typedef union _MCI_ADDR { struct { ULONG Address ; ULONG Reserved ; } ; ULONGLONG QuadPart ; } MCI_ADDR , * PMCI_ADDR ; #line 17716 typedef enum { HAL_MCE_RECORD, HAL_MCA_RECORD } MCA_EXCEPTION_TYPE ; #line 17726 typedef struct _MCA_EXCEPTION { ULONG VersionNumber ; MCA_EXCEPTION_TYPE ExceptionType ; LARGE_INTEGER TimeStamp ; ULONG ProcessorNumber ; union { struct { UCHAR BankNumber ; MCI_STATS Status ; MCI_ADDR Address ; ULONGLONG Misc ; } Mca ; struct { ULONGLONG Address ; ULONGLONG Type ; } Mce ; } u ; } MCA_EXCEPTION , * PMCA_EXCEPTION ; #line 17752 typedef void ( * PDRIVER_EXCPTN_CALLBACK )(PVOID Context , PMCA_EXCEPTION BankLog ) ; #line 17762 typedef struct _MCA_DRIVER_INFO { PDRIVER_EXCPTN_CALLBACK ExceptionCallback ; PKDEFERRED_ROUTINE DpcCallback ; PVOID DeviceContext ; } MCA_DRIVER_INFO , * PMCA_DRIVER_INFO ; #line 17772 typedef struct _SCATTER_GATHER_ELEMENT { PHYSICAL_ADDRESS Address ; ULONG Length ; ULONG_PTR Reserved ; } SCATTER_GATHER_ELEMENT , * PSCATTER_GATHER_ELEMENT ; #pragma warning(disable:4200) #line 17779 typedef struct _SCATTER_GATHER_LIST { ULONG NumberOfElements ; ULONG_PTR Reserved ; SCATTER_GATHER_ELEMENT Elements[] ; } SCATTER_GATHER_LIST , * PSCATTER_GATHER_LIST ; #line 17784 #pragma warning(default:4200) #line 17788 typedef struct _DMA_OPERATIONS * PDMA_OPERATIONS ; typedef struct _DMA_ADAPTER { USHORT Version ; USHORT Size ; PDMA_OPERATIONS DmaOperations ; } DMA_ADAPTER , * PDMA_ADAPTER ; #line 17797 typedef void ( * PPUT_DMA_ADAPTER )(PDMA_ADAPTER DmaAdapter ) ; #line 17801 typedef PVOID ( * PALLOCATE_COMMON_BUFFER )(PDMA_ADAPTER DmaAdapter , ULONG Length , PPHYSICAL_ADDRESS LogicalAddress , BOOLEAN CacheEnabled ) ; #line 17808 typedef void ( * PFREE_COMMON_BUFFER )(PDMA_ADAPTER DmaAdapter , ULONG Length , PHYSICAL_ADDRESS LogicalAddress , PVOID VirtualAddress , BOOLEAN CacheEnabled ) ; #line 17816 typedef NTSTATUS ( * PALLOCATE_ADAPTER_CHANNEL )(PDMA_ADAPTER DmaAdapter , PDEVICE_OBJECT DeviceObject , ULONG NumberOfMapRegisters , PDRIVER_CONTROL ExecutionRoutine , PVOID Context ) ; #line 17824 typedef BOOLEAN ( * PFLUSH_ADAPTER_BUFFERS )(PDMA_ADAPTER DmaAdapter , PMDL Mdl , PVOID MapRegisterBase , PVOID CurrentVa , ULONG Length , BOOLEAN WriteToDevice ) ; #line 17833 typedef void ( * PFREE_ADAPTER_CHANNEL )(PDMA_ADAPTER DmaAdapter ) ; #line 17837 typedef void ( * PFREE_MAP_REGISTERS )(PDMA_ADAPTER DmaAdapter , PVOID MapRegisterBase , ULONG NumberOfMapRegisters ) ; #line 17843 typedef PHYSICAL_ADDRESS ( * PMAP_TRANSFER )(PDMA_ADAPTER DmaAdapter , PMDL Mdl , PVOID MapRegisterBase , PVOID CurrentVa , PULONG Length , BOOLEAN WriteToDevice ) ; #line 17852 typedef ULONG ( * PGET_DMA_ALIGNMENT )(PDMA_ADAPTER DmaAdapter ) ; #line 17856 typedef ULONG ( * PREAD_DMA_COUNTER )(PDMA_ADAPTER DmaAdapter ) ; #line 17860 typedef void ( * PDRIVER_LIST_CONTROL )(struct _DEVICE_OBJECT * DeviceObject , struct _IRP * Irp , PSCATTER_GATHER_LIST ScatterGather , PVOID Context ) ; #line 17868 typedef NTSTATUS ( * PGET_SCATTER_GATHER_LIST )(PDMA_ADAPTER DmaAdapter , PDEVICE_OBJECT DeviceObject , PMDL Mdl , PVOID CurrentVa , ULONG Length , PDRIVER_LIST_CONTROL ExecutionRoutine , PVOID Context , BOOLEAN WriteToDevice ) ; #line 17880 typedef void ( * PPUT_SCATTER_GATHER_LIST )(PDMA_ADAPTER DmaAdapter , PSCATTER_GATHER_LIST ScatterGather , BOOLEAN WriteToDevice ) ; #line 17887 typedef struct _DMA_OPERATIONS { ULONG Size ; PPUT_DMA_ADAPTER PutDmaAdapter ; PALLOCATE_COMMON_BUFFER AllocateCommonBuffer ; PFREE_COMMON_BUFFER FreeCommonBuffer ; PALLOCATE_ADAPTER_CHANNEL AllocateAdapterChannel ; PFLUSH_ADAPTER_BUFFERS FlushAdapterBuffers ; PFREE_ADAPTER_CHANNEL FreeAdapterChannel ; PFREE_MAP_REGISTERS FreeMapRegisters ; PMAP_TRANSFER MapTransfer ; PGET_DMA_ALIGNMENT GetDmaAlignment ; PREAD_DMA_COUNTER ReadDmaCounter ; PGET_SCATTER_GATHER_LIST GetScatterGatherList ; PPUT_SCATTER_GATHER_LIST PutScatterGatherList ; } DMA_OPERATIONS ; #line 18126 __declspec(dllimport) NTSTATUS HalAllocateAdapterChannel(PADAPTER_OBJECT AdapterObject , PWAIT_CONTEXT_BLOCK Wcb , ULONG NumberOfMapRegisters , PDRIVER_CONTROL ExecutionRoutine ) ; #line 18135 __declspec(dllimport) PVOID HalAllocateCommonBuffer(PADAPTER_OBJECT AdapterObject , ULONG Length , PPHYSICAL_ADDRESS LogicalAddress , BOOLEAN CacheEnabled ) ; #line 18144 __declspec(dllimport) void HalFreeCommonBuffer(PADAPTER_OBJECT AdapterObject , ULONG Length , PHYSICAL_ADDRESS LogicalAddress , PVOID VirtualAddress , BOOLEAN CacheEnabled ) ; #line 18154 __declspec(dllimport) ULONG HalReadDmaCounter(PADAPTER_OBJECT AdapterObject ) ; #line 18160 __declspec(dllimport) BOOLEAN IoFlushAdapterBuffers(PADAPTER_OBJECT AdapterObject , PMDL Mdl , PVOID MapRegisterBase , PVOID CurrentVa , ULONG Length , BOOLEAN WriteToDevice ) ; #line 18171 __declspec(dllimport) void IoFreeAdapterChannel(PADAPTER_OBJECT AdapterObject ) ; #line 18177 __declspec(dllimport) void IoFreeMapRegisters(PADAPTER_OBJECT AdapterObject , PVOID MapRegisterBase , ULONG NumberOfMapRegisters ) ; #line 18185 __declspec(dllimport) PHYSICAL_ADDRESS IoMapTransfer(PADAPTER_OBJECT AdapterObject , PMDL Mdl , PVOID MapRegisterBase , PVOID CurrentVa , PULONG Length , BOOLEAN WriteToDevice ) ; #line 18197 NTSTATUS HalGetScatterGatherList(PADAPTER_OBJECT DmaAdapter , PDEVICE_OBJECT DeviceObject , PMDL Mdl , PVOID CurrentVa , ULONG Length , PDRIVER_LIST_CONTROL ExecutionRoutine , PVOID Context , BOOLEAN WriteToDevice ) ; #line 18209 void HalPutScatterGatherList(PADAPTER_OBJECT DmaAdapter , PSCATTER_GATHER_LIST ScatterGather , BOOLEAN WriteToDevice ) ; #line 18216 void HalPutDmaAdapter(PADAPTER_OBJECT DmaAdapter ) ; #line 18222 __declspec(dllimport) void PoSetSystemState(EXECUTION_STATE Flags ) ; #line 18228 __declspec(dllimport) PVOID PoRegisterSystemState(PVOID StateHandle , EXECUTION_STATE Flags ) ; #line 18235 typedef void ( * PREQUEST_POWER_COMPLETE )(PDEVICE_OBJECT DeviceObject , UCHAR MinorFunction , POWER_STATE PowerState , PVOID Context , PIO_STATUS_BLOCK IoStatus ) ; #line 18245 __declspec(dllimport) NTSTATUS PoRequestPowerIrp(PDEVICE_OBJECT DeviceObject , UCHAR MinorFunction , POWER_STATE PowerState , PREQUEST_POWER_COMPLETE CompletionFunction , PVOID Context , PIRP * Irp ) ; #line 18256 __declspec(dllimport) void PoUnregisterSystemState(PVOID StateHandle ) ; #line 18263 __declspec(dllimport) POWER_STATE PoSetPowerState(PDEVICE_OBJECT DeviceObject , POWER_STATE_TYPE Type , POWER_STATE State ) ; #line 18271 __declspec(dllimport) NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 18278 __declspec(dllimport) void PoStartNextPowerIrp(PIRP Irp ) ; #line 18285 __declspec(dllimport) PULONG PoRegisterDeviceForIdleDetection(PDEVICE_OBJECT DeviceObject , ULONG ConservationIdleTime , ULONG PerformanceIdleTime , DEVICE_POWER_STATE State ) ; #line 18311 __declspec(dllimport) BOOLEAN FsRtlIsTotalDeviceFailure(NTSTATUS Status ) ; #line 18321 typedef struct _OBJECT_HANDLE_INFORMATION { ULONG HandleAttributes ; ACCESS_MASK GrantedAccess ; } OBJECT_HANDLE_INFORMATION , * POBJECT_HANDLE_INFORMATION ; __declspec(dllimport) NTSTATUS ObReferenceObjectByHandle(HANDLE Handle , ACCESS_MASK DesiredAccess , POBJECT_TYPE ObjectType , KPROCESSOR_MODE AccessMode , PVOID * Object , POBJECT_HANDLE_INFORMATION HandleInformation ) ; #line 18342 __declspec(dllimport) void _fastcall ObfReferenceObject(PVOID Object ) ; #line 18350 __declspec(dllimport) NTSTATUS ObReferenceObjectByPointer(PVOID Object , ACCESS_MASK DesiredAccess , POBJECT_TYPE ObjectType , KPROCESSOR_MODE AccessMode ) ; #line 18359 __declspec(dllimport) void _fastcall ObfDereferenceObject(PVOID Object ) ; #line 18366 NTSTATUS ObGetObjectSecurity(PVOID Object , PSECURITY_DESCRIPTOR * SecurityDescriptor , PBOOLEAN MemoryAllocated ) ; #line 18373 void ObReleaseObjectSecurity(PSECURITY_DESCRIPTOR SecurityDescriptor , BOOLEAN MemoryAllocated ) ; #line 18402 typedef struct _PCI_SLOT_NUMBER { union { struct { ULONG DeviceNumber : 5; ULONG FunctionNumber : 3; ULONG Reserved : 24; } bits ; ULONG AsULONG ; } u ; } PCI_SLOT_NUMBER , * PPCI_SLOT_NUMBER ; #line 18418 typedef struct _PCI_COMMON_CONFIG { USHORT VendorID ; USHORT DeviceID ; USHORT Command ; USHORT Status ; UCHAR RevisionID ; UCHAR ProgIf ; UCHAR SubClass ; UCHAR BaseClass ; UCHAR CacheLineSize ; UCHAR LatencyTimer ; UCHAR HeaderType ; UCHAR BIST ; union { struct _PCI_HEADER_TYPE_0 { ULONG BaseAddresses[6] ; ULONG CIS ; USHORT SubVendorID ; USHORT SubSystemID ; ULONG ROMBaseAddress ; UCHAR CapabilitiesPtr ; UCHAR Reserved1[3] ; ULONG Reserved2 ; UCHAR InterruptLine ; UCHAR InterruptPin ; UCHAR MinimumGrant ; UCHAR MaximumLatency ; } type0 ; struct _PCI_HEADER_TYPE_1 { ULONG BaseAddresses[2] ; UCHAR PrimaryBus ; UCHAR SecondaryBus ; UCHAR SubordinateBus ; UCHAR SecondaryLatency ; UCHAR IOBase ; UCHAR IOLimit ; USHORT SecondaryStatus ; USHORT MemoryBase ; USHORT MemoryLimit ; USHORT PrefetchBase ; USHORT PrefetchLimit ; ULONG PrefetchBaseUpper32 ; ULONG PrefetchLimitUpper32 ; USHORT IOBaseUpper16 ; USHORT IOLimitUpper16 ; UCHAR CapabilitiesPtr ; UCHAR Reserved1[3] ; ULONG ROMBaseAddress ; UCHAR InterruptLine ; UCHAR InterruptPin ; USHORT BridgeControl ; } type1 ; struct _PCI_HEADER_TYPE_2 { ULONG SocketRegistersBaseAddress ; UCHAR CapabilitiesPtr ; UCHAR Reserved ; USHORT SecondaryStatus ; UCHAR PrimaryBus ; UCHAR SecondaryBus ; UCHAR SubordinateBus ; UCHAR SecondaryLatency ; struct { ULONG Base ; ULONG Limit ; } Range[5 - 1] ; UCHAR InterruptLine ; UCHAR InterruptPin ; USHORT BridgeControl ; } type2 ; } u ; UCHAR DeviceSpecific[192] ; } PCI_COMMON_CONFIG , * PPCI_COMMON_CONFIG ; #line 18591 typedef struct _PCI_CAPABILITIES_HEADER { UCHAR CapabilityID ; UCHAR Next ; } PCI_CAPABILITIES_HEADER , * PPCI_CAPABILITIES_HEADER ; #line 18600 typedef struct _PCI_PMC { UCHAR Version : 3; UCHAR PMEClock : 1; UCHAR Rsvd1 : 1; UCHAR DeviceSpecificInitialization : 1; UCHAR Rsvd2 : 2; struct _PM_SUPPORT { UCHAR Rsvd2 : 1; UCHAR D1 : 1; UCHAR D2 : 1; UCHAR PMED0 : 1; UCHAR PMED1 : 1; UCHAR PMED2 : 1; UCHAR PMED3Hot : 1; UCHAR PMED3Cold : 1; } Support ; } PCI_PMC , * PPCI_PMC ; typedef struct _PCI_PMCSR { USHORT PowerState : 2; USHORT Rsvd1 : 6; USHORT PMEEnable : 1; USHORT DataSelect : 4; USHORT DataScale : 2; USHORT PMEStatus : 1; } PCI_PMCSR , * PPCI_PMCSR ; #line 18628 typedef struct _PCI_PMCSR_BSE { UCHAR Rsvd1 : 6; UCHAR D3HotSupportsStopClock : 1; UCHAR BusPowerClockControlEnabled : 1; } PCI_PMCSR_BSE , * PPCI_PMCSR_BSE ; #line 18635 typedef struct _PCI_PM_CAPABILITY { PCI_CAPABILITIES_HEADER Header ; union { PCI_PMC Capabilities ; USHORT AsUSHORT ; } PMC ; union { PCI_PMCSR ControlStatus ; USHORT AsUSHORT ; } PMCSR ; union { PCI_PMCSR_BSE BridgeSupport ; UCHAR AsUCHAR ; } PMCSR_BSE ; UCHAR Data ; } PCI_PM_CAPABILITY , * PPCI_PM_CAPABILITY ; #line 18679 typedef struct _PCI_AGP_CAPABILITY { PCI_CAPABILITIES_HEADER Header ; USHORT Minor : 4; USHORT Major : 4; USHORT Rsvd1 : 8; struct _PCI_AGP_STATUS { ULONG Rate : 3; ULONG Rsvd1 : 1; ULONG FastWrite : 1; ULONG FourGB : 1; ULONG Rsvd2 : 3; ULONG SideBandAddressing : 1; ULONG Rsvd3 : 14; ULONG RequestQueueDepthMaximum : 8; } AGPStatus ; struct _PCI_AGP_COMMAND { ULONG Rate : 3; ULONG Rsvd1 : 1; ULONG FastWriteEnable : 1; ULONG FourGBEnable : 1; ULONG Rsvd2 : 2; ULONG AGPEnable : 1; ULONG SBAEnable : 1; ULONG Rsvd3 : 14; ULONG RequestQueueDepth : 8; } AGPCommand ; } PCI_AGP_CAPABILITY , * PPCI_AGP_CAPABILITY ; #line 18720 typedef struct _PCI_MSI_CAPABILITY { PCI_CAPABILITIES_HEADER Header ; struct _PCI_MSI_MESSAGE_CONTROL { USHORT MSIEnable : 1; USHORT MultipleMessageCapable : 3; USHORT MultipleMessageEnable : 3; USHORT CapableOf64Bits : 1; USHORT Reserved : 8; } MessageControl ; union { struct _PCI_MSI_MESSAGE_ADDRESS { ULONG_PTR Reserved : 2; ULONG_PTR Address : 30; } Register ; ULONG_PTR Raw ; } MessageAddress ; union { struct _PCI_MSI_64BIT_DATA { ULONG MessageUpperAddress ; USHORT MessageData ; } Bit64 ; struct _PCI_MSI_32BIT_DATA { USHORT MessageData ; ULONG Unused ; } Bit32 ; } Data ; } PCI_MSI_CAPABILITY , * PPCI_PCI_CAPABILITY ; #line 18946 typedef void ( * PciPin2Line )(struct _BUS_HANDLER * BusHandler , struct _BUS_HANDLER * RootHandler , PCI_SLOT_NUMBER SlotNumber , PPCI_COMMON_CONFIG PciData ) ; #line 18954 typedef void ( * PciLine2Pin )(struct _BUS_HANDLER * BusHandler , struct _BUS_HANDLER * RootHandler , PCI_SLOT_NUMBER SlotNumber , PPCI_COMMON_CONFIG PciNewData , PPCI_COMMON_CONFIG PciOldData ) ; #line 18963 typedef void ( * PciReadWriteConfig )(struct _BUS_HANDLER * BusHandler , PCI_SLOT_NUMBER Slot , PVOID Buffer , ULONG Offset , ULONG Length ) ; #line 18975 typedef struct _PCIBUSDATA { ULONG Tag ; ULONG Version ; PciReadWriteConfig ReadConfig ; PciReadWriteConfig WriteConfig ; PciPin2Line Pin2Line ; PciLine2Pin Line2Pin ; PCI_SLOT_NUMBER ParentSlot ; PVOID Reserved[4] ; } PCIBUSDATA , * PPCIBUSDATA ; typedef ULONG ( * PCI_READ_WRITE_CONFIG )(PVOID Context , UCHAR BusOffset , ULONG Slot , PVOID Buffer , ULONG Offset , ULONG Length ) ; #line 18995 typedef void ( * PCI_PIN_TO_LINE )(PVOID Context , PPCI_COMMON_CONFIG PciData ) ; #line 19000 typedef void ( * PCI_LINE_TO_PIN )(PVOID Context , PPCI_COMMON_CONFIG PciNewData , PPCI_COMMON_CONFIG PciOldData ) ; #line 19006 typedef struct _PCI_BUS_INTERFACE_STANDARD { USHORT Size ; USHORT Version ; PVOID Context ; PINTERFACE_REFERENCE InterfaceReference ; PINTERFACE_DEREFERENCE InterfaceDereference ; PCI_READ_WRITE_CONFIG ReadConfig ; PCI_READ_WRITE_CONFIG WriteConfig ; PCI_PIN_TO_LINE PinToLine ; PCI_LINE_TO_PIN LineToPin ; } PCI_BUS_INTERFACE_STANDARD , * PPCI_BUS_INTERFACE_STANDARD ; #line 19028 typedef BOOLEAN ( * PPCI_IS_DEVICE_PRESENT )(USHORT VendorID , USHORT DeviceID , UCHAR RevisionID , USHORT SubVendorID , USHORT SubSystemID , ULONG Flags ) ; #line 19043 typedef struct _PCI_DEVICE_PRESENT_INTERFACE { USHORT Size ; USHORT Version ; PVOID Context ; PINTERFACE_REFERENCE InterfaceReference ; PINTERFACE_DEREFERENCE InterfaceDereference ; PPCI_IS_DEVICE_PRESENT IsDevicePresent ; } PCI_DEVICE_PRESENT_INTERFACE , * PPCI_DEVICE_PRESENT_INTERFACE ; #line 19066 extern POBJECT_TYPE * IoFileObjectType ; extern POBJECT_TYPE * ExEventObjectType ; extern POBJECT_TYPE * ExSemaphoreObjectType ; #line 19074 __declspec(dllimport) NTSTATUS __stdcall ZwCreateFile(PHANDLE FileHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes , PIO_STATUS_BLOCK IoStatusBlock , PLARGE_INTEGER AllocationSize , ULONG FileAttributes , ULONG ShareAccess , ULONG CreateDisposition , ULONG CreateOptions , PVOID EaBuffer , ULONG EaLength ) ; #line 19091 __declspec(dllimport) NTSTATUS __stdcall ZwOpenFile(PHANDLE FileHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes , PIO_STATUS_BLOCK IoStatusBlock , ULONG ShareAccess , ULONG OpenOptions ) ; #line 19103 __declspec(dllimport) NTSTATUS __stdcall ZwQueryInformationFile(HANDLE FileHandle , PIO_STATUS_BLOCK IoStatusBlock , PVOID FileInformation , ULONG Length , FILE_INFORMATION_CLASS FileInformationClass ) ; #line 19114 __declspec(dllimport) NTSTATUS __stdcall ZwSetInformationFile(HANDLE FileHandle , PIO_STATUS_BLOCK IoStatusBlock , PVOID FileInformation , ULONG Length , FILE_INFORMATION_CLASS FileInformationClass ) ; #line 19125 __declspec(dllimport) NTSTATUS __stdcall ZwReadFile(HANDLE FileHandle , HANDLE Event , PIO_APC_ROUTINE ApcRoutine , PVOID ApcContext , PIO_STATUS_BLOCK IoStatusBlock , PVOID Buffer , ULONG Length , PLARGE_INTEGER ByteOffset , PULONG Key ) ; #line 19140 __declspec(dllimport) NTSTATUS __stdcall ZwWriteFile(HANDLE FileHandle , HANDLE Event , PIO_APC_ROUTINE ApcRoutine , PVOID ApcContext , PIO_STATUS_BLOCK IoStatusBlock , PVOID Buffer , ULONG Length , PLARGE_INTEGER ByteOffset , PULONG Key ) ; #line 19155 __declspec(dllimport) NTSTATUS __stdcall ZwClose(HANDLE Handle ) ; #line 19162 __declspec(dllimport) NTSTATUS __stdcall ZwCreateDirectoryObject(PHANDLE DirectoryHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes ) ; #line 19171 __declspec(dllimport) NTSTATUS __stdcall ZwMakeTemporaryObject(HANDLE Handle ) ; #line 19178 __declspec(dllimport) NTSTATUS __stdcall ZwOpenSection(PHANDLE SectionHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes ) ; #line 19187 __declspec(dllimport) NTSTATUS __stdcall ZwMapViewOfSection(HANDLE SectionHandle , HANDLE ProcessHandle , PVOID * BaseAddress , ULONG ZeroBits , ULONG CommitSize , PLARGE_INTEGER SectionOffset , PSIZE_T ViewSize , SECTION_INHERIT InheritDisposition , ULONG AllocationType , ULONG Protect ) ; #line 19203 __declspec(dllimport) NTSTATUS __stdcall ZwUnmapViewOfSection(HANDLE ProcessHandle , PVOID BaseAddress ) ; #line 19211 __declspec(dllimport) NTSTATUS __stdcall ZwSetInformationThread(HANDLE ThreadHandle , THREADINFOCLASS ThreadInformationClass , PVOID ThreadInformation , ULONG ThreadInformationLength ) ; #line 19221 __declspec(dllimport) NTSTATUS __stdcall ZwCreateKey(PHANDLE KeyHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes , ULONG TitleIndex , PUNICODE_STRING Class , ULONG CreateOptions , PULONG Disposition ) ; #line 19234 __declspec(dllimport) NTSTATUS __stdcall ZwOpenKey(PHANDLE KeyHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes ) ; #line 19243 __declspec(dllimport) NTSTATUS __stdcall ZwDeleteKey(HANDLE KeyHandle ) ; #line 19250 __declspec(dllimport) NTSTATUS __stdcall ZwEnumerateKey(HANDLE KeyHandle , ULONG Index , KEY_INFORMATION_CLASS KeyInformationClass , PVOID KeyInformation , ULONG Length , PULONG ResultLength ) ; #line 19262 __declspec(dllimport) NTSTATUS __stdcall ZwEnumerateValueKey(HANDLE KeyHandle , ULONG Index , KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass , PVOID KeyValueInformation , ULONG Length , PULONG ResultLength ) ; #line 19274 __declspec(dllimport) NTSTATUS __stdcall ZwFlushKey(HANDLE KeyHandle ) ; #line 19281 __declspec(dllimport) NTSTATUS __stdcall ZwQueryKey(HANDLE KeyHandle , KEY_INFORMATION_CLASS KeyInformationClass , PVOID KeyInformation , ULONG Length , PULONG ResultLength ) ; #line 19292 __declspec(dllimport) NTSTATUS __stdcall ZwQueryValueKey(HANDLE KeyHandle , PUNICODE_STRING ValueName , KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass , PVOID KeyValueInformation , ULONG Length , PULONG ResultLength ) ; #line 19304 __declspec(dllimport) NTSTATUS __stdcall ZwSetValueKey(HANDLE KeyHandle , PUNICODE_STRING ValueName , ULONG TitleIndex , ULONG Type , PVOID Data , ULONG DataSize ) ; #line 19316 __declspec(dllimport) NTSTATUS __stdcall ZwOpenSymbolicLinkObject(PHANDLE LinkHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes ) ; #line 19325 __declspec(dllimport) NTSTATUS __stdcall ZwQuerySymbolicLinkObject(HANDLE LinkHandle , PUNICODE_STRING LinkTarget , PULONG ReturnedLength ) ; #line 19334 NTSTATUS ZwCreateTimer(PHANDLE TimerHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes , TIMER_TYPE TimerType ) ; #line 19342 NTSTATUS ZwOpenTimer(PHANDLE TimerHandle , ACCESS_MASK DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes ) ; #line 19349 NTSTATUS ZwCancelTimer(HANDLE TimerHandle , PBOOLEAN CurrentState ) ; #line 19355 NTSTATUS ZwSetTimer(HANDLE TimerHandle , PLARGE_INTEGER DueTime , PTIMER_APC_ROUTINE TimerApcRoutine , PVOID TimerContext , BOOLEAN WakeTimer , LONG Period , PBOOLEAN PreviousState ) ; #line 43 "C:/NTDDK/inc/ntddscsi.h" extern const GUID ScsiRawInterfaceGuid ; extern const GUID WmiScsiAddressGuid ; #line 89 typedef struct _SCSI_PASS_THROUGH { USHORT Length ; UCHAR ScsiStatus ; UCHAR PathId ; UCHAR TargetId ; UCHAR Lun ; UCHAR CdbLength ; UCHAR SenseInfoLength ; UCHAR DataIn ; ULONG DataTransferLength ; ULONG TimeOutValue ; ULONG_PTR DataBufferOffset ; ULONG SenseInfoOffset ; UCHAR Cdb[16] ; } SCSI_PASS_THROUGH , * PSCSI_PASS_THROUGH ; #line 109 typedef struct _SCSI_PASS_THROUGH_DIRECT { USHORT Length ; UCHAR ScsiStatus ; UCHAR PathId ; UCHAR TargetId ; UCHAR Lun ; UCHAR CdbLength ; UCHAR SenseInfoLength ; UCHAR DataIn ; ULONG DataTransferLength ; ULONG TimeOutValue ; PVOID DataBuffer ; ULONG SenseInfoOffset ; UCHAR Cdb[16] ; } SCSI_PASS_THROUGH_DIRECT , * PSCSI_PASS_THROUGH_DIRECT ; #line 130 typedef struct _SCSI_BUS_DATA { UCHAR NumberOfLogicalUnits ; UCHAR InitiatorBusId ; ULONG InquiryDataOffset ; } SCSI_BUS_DATA , * PSCSI_BUS_DATA ; #line 141 typedef struct _SCSI_ADAPTER_BUS_INFO { UCHAR NumberOfBuses ; SCSI_BUS_DATA BusData[1] ; } SCSI_ADAPTER_BUS_INFO , * PSCSI_ADAPTER_BUS_INFO ; #line 151 typedef struct _SCSI_INQUIRY_DATA { UCHAR PathId ; UCHAR TargetId ; UCHAR Lun ; BOOLEAN DeviceClaimed ; ULONG InquiryDataLength ; ULONG NextInquiryDataOffset ; UCHAR InquiryData[1] ; } SCSI_INQUIRY_DATA , * PSCSI_INQUIRY_DATA ; #line 165 typedef struct _SRB_IO_CONTROL { ULONG HeaderLength ; UCHAR Signature[8] ; ULONG Timeout ; ULONG ControlCode ; ULONG ReturnCode ; ULONG Length ; } SRB_IO_CONTROL , * PSRB_IO_CONTROL ; #line 178 typedef struct _IO_SCSI_CAPABILITIES { ULONG Length ; ULONG MaximumTransferLength ; ULONG MaximumPhysicalPages ; ULONG SupportedAsynchronousEvents ; ULONG AlignmentMask ; BOOLEAN TaggedQueuing ; BOOLEAN AdapterScansDown ; BOOLEAN AdapterUsesPio ; } IO_SCSI_CAPABILITIES , * PIO_SCSI_CAPABILITIES ; #line 230 typedef struct _SCSI_ADDRESS { ULONG Length ; UCHAR PortNumber ; UCHAR PathId ; UCHAR TargetId ; UCHAR Lun ; } SCSI_ADDRESS , * PSCSI_ADDRESS ; #line 242 struct _ADAPTER_OBJECT ; typedef struct _DUMP_POINTERS { struct _ADAPTER_OBJECT * AdapterObject ; PVOID MappedRegisterBase ; PVOID DumpData ; PVOID CommonBufferVa ; LARGE_INTEGER CommonBufferPa ; ULONG CommonBufferSize ; BOOLEAN AllocateCommonBuffers ; UCHAR Spare1[3] ; PVOID DeviceObject ; } DUMP_POINTERS , * PDUMP_POINTERS ; #line 28 "C:/NTDDK/inc/ntddcdrm.h" #pragma once #line 44 "C:/NTDDK/inc/ntddstor.h" extern const GUID DiskClassGuid ; extern const GUID CdRomClassGuid ; extern const GUID PartitionClassGuid ; extern const GUID TapeClassGuid ; extern const GUID WriteOnceDiskClassGuid ; extern const GUID VolumeClassGuid ; extern const GUID MediumChangerClassGuid ; extern const GUID FloppyClassGuid ; extern const GUID CdChangerClassGuid ; extern const GUID StoragePortClassGuid ; #line 128 typedef struct _STORAGE_DEVICE_NUMBER { ULONG DeviceType ; ULONG DeviceNumber ; ULONG PartitionNumber ; } STORAGE_DEVICE_NUMBER , * PSTORAGE_DEVICE_NUMBER ; #line 154 typedef struct _STORAGE_BUS_RESET_REQUEST { UCHAR PathId ; } STORAGE_BUS_RESET_REQUEST , * PSTORAGE_BUS_RESET_REQUEST ; #line 168 typedef struct _PREVENT_MEDIA_REMOVAL { BOOLEAN PreventMediaRemoval ; } PREVENT_MEDIA_REMOVAL , * PPREVENT_MEDIA_REMOVAL ; #line 175 typedef struct _TAPE_STATISTICS { ULONG Version ; ULONG Flags ; LARGE_INTEGER RecoveredWrites ; LARGE_INTEGER UnrecoveredWrites ; LARGE_INTEGER RecoveredReads ; LARGE_INTEGER UnrecoveredReads ; UCHAR CompressionRatioReads ; UCHAR CompressionRatioWrites ; } TAPE_STATISTICS , * PTAPE_STATISTICS ; #line 193 typedef struct _TAPE_GET_STATISTICS { ULONG Operation ; } TAPE_GET_STATISTICS , * PTAPE_GET_STATISTICS ; #line 206 typedef enum _STORAGE_MEDIA_TYPE { DDS_4mm = 0x20, MiniQic, Travan, QIC, MP_8mm, AME_8mm, AIT1_8mm, DLT, NCTP, IBM_3480, IBM_3490E, IBM_Magstar_3590, IBM_Magstar_MP, STK_DATA_D3, SONY_DTF, DV_6mm, DMI, SONY_D2, CLEANER_CARTRIDGE, CD_ROM, CD_R, CD_RW, DVD_ROM, DVD_R, DVD_RW, MO_3_RW, MO_5_WO, MO_5_RW, MO_5_LIMDOW, PC_5_WO, PC_5_RW, PD_5_RW, ABL_5_WO, PINNACLE_APEX_5_RW, SONY_12_WO, PHILIPS_12_WO, HITACHI_12_WO, CYGNET_12_WO, KODAK_14_WO, MO_NFR_525, NIKON_12_RW, IOMEGA_ZIP, IOMEGA_JAZ, SYQUEST_EZ135, SYQUEST_EZFLYER, SYQUEST_SYJET, AVATAR_F2, MP2_8mm, DST_S, DST_M, DST_L, VXATape_1, VXATape_2, STK_EAGLE, LTO_Ultrium, LTO_Accelis } STORAGE_MEDIA_TYPE , * PSTORAGE_MEDIA_TYPE ; #line 306 typedef enum _STORAGE_BUS_TYPE { BusTypeUnknown = 0x00, BusTypeScsi, BusTypeAtapi, BusTypeAta, BusType1394, BusTypeSsa, BusTypeFibre, BusTypeUsb, BusTypeRAID, BusTypeMaxReserved = 0x7F } STORAGE_BUS_TYPE , * PSTORAGE_BUS_TYPE ; typedef struct _DEVICE_MEDIA_INFO { union { struct { LARGE_INTEGER Cylinders ; STORAGE_MEDIA_TYPE MediaType ; ULONG TracksPerCylinder ; ULONG SectorsPerTrack ; ULONG BytesPerSector ; ULONG NumberMediaSides ; ULONG MediaCharacteristics ; } DiskInfo ; struct { LARGE_INTEGER Cylinders ; STORAGE_MEDIA_TYPE MediaType ; ULONG TracksPerCylinder ; ULONG SectorsPerTrack ; ULONG BytesPerSector ; ULONG NumberMediaSides ; ULONG MediaCharacteristics ; } RemovableDiskInfo ; struct { STORAGE_MEDIA_TYPE MediaType ; ULONG MediaCharacteristics ; ULONG CurrentBlockSize ; STORAGE_BUS_TYPE BusType ; union { struct { UCHAR MediumType ; UCHAR DensityCode ; } ScsiInformation ; } BusSpecificData ; } TapeInfo ; } DeviceSpecific ; } DEVICE_MEDIA_INFO , * PDEVICE_MEDIA_INFO ; #line 362 typedef struct _GET_MEDIA_TYPES { ULONG DeviceType ; ULONG MediaInfoCount ; DEVICE_MEDIA_INFO MediaInfo[1] ; } GET_MEDIA_TYPES , * PGET_MEDIA_TYPES ; #line 381 typedef struct _STORAGE_PREDICT_FAILURE { ULONG PredictFailure ; UCHAR VendorSpecific[512] ; } STORAGE_PREDICT_FAILURE , * PSTORAGE_PREDICT_FAILURE ; #line 414 typedef enum _STORAGE_QUERY_TYPE { PropertyStandardQuery = 0, PropertyExistsQuery, PropertyMaskQuery, PropertyQueryMaxDefined } STORAGE_QUERY_TYPE , * PSTORAGE_QUERY_TYPE ; #line 425 typedef enum _STORAGE_PROPERTY_ID { StorageDeviceProperty = 0, StorageAdapterProperty } STORAGE_PROPERTY_ID , * PSTORAGE_PROPERTY_ID ; #line 435 typedef struct _STORAGE_PROPERTY_QUERY { STORAGE_PROPERTY_ID PropertyId ; STORAGE_QUERY_TYPE QueryType ; UCHAR AdditionalParameters[1] ; } STORAGE_PROPERTY_QUERY , * PSTORAGE_PROPERTY_QUERY ; #line 462 typedef struct _STORAGE_DESCRIPTOR_HEADER { ULONG Version ; ULONG Size ; } STORAGE_DESCRIPTOR_HEADER , * PSTORAGE_DESCRIPTOR_HEADER ; #line 478 typedef struct _STORAGE_DEVICE_DESCRIPTOR { ULONG Version ; ULONG Size ; UCHAR DeviceType ; UCHAR DeviceTypeModifier ; BOOLEAN RemovableMedia ; BOOLEAN CommandQueueing ; ULONG VendorIdOffset ; ULONG ProductIdOffset ; ULONG ProductRevisionOffset ; ULONG SerialNumberOffset ; STORAGE_BUS_TYPE BusType ; ULONG RawPropertiesLength ; UCHAR RawDeviceProperties[1] ; } STORAGE_DEVICE_DESCRIPTOR , * PSTORAGE_DEVICE_DESCRIPTOR ; #line 581 typedef struct _STORAGE_ADAPTER_DESCRIPTOR { ULONG Version ; ULONG Size ; ULONG MaximumTransferLength ; ULONG MaximumPhysicalPages ; ULONG AlignmentMask ; BOOLEAN AdapterUsesPio ; BOOLEAN AdapterScansDown ; BOOLEAN CommandQueueing ; BOOLEAN AcceleratedTransfer ; BOOLEAN BusType ; USHORT BusMajorVersion ; USHORT BusMinorVersion ; } STORAGE_ADAPTER_DESCRIPTOR , * PSTORAGE_ADAPTER_DESCRIPTOR ; #line 112 "C:/NTDDK/inc/ntddcdrm.h" typedef struct _TRACK_DATA { UCHAR Reserved ; UCHAR Control : 4; UCHAR Adr : 4; UCHAR TrackNumber ; UCHAR Reserved1 ; UCHAR Address[4] ; } TRACK_DATA , * PTRACK_DATA ; typedef struct _CDROM_TOC { UCHAR Length[2] ; UCHAR FirstTrack ; UCHAR LastTrack ; TRACK_DATA TrackData[100] ; } CDROM_TOC , * PCDROM_TOC ; #line 144 typedef struct _CDROM_PLAY_AUDIO_MSF { UCHAR StartingM ; UCHAR StartingS ; UCHAR StartingF ; UCHAR EndingM ; UCHAR EndingS ; UCHAR EndingF ; } CDROM_PLAY_AUDIO_MSF , * PCDROM_PLAY_AUDIO_MSF ; #line 157 typedef struct _CDROM_SEEK_AUDIO_MSF { UCHAR M ; UCHAR S ; UCHAR F ; } CDROM_SEEK_AUDIO_MSF , * PCDROM_SEEK_AUDIO_MSF ; #line 168 typedef struct _CDROM_DISK_DATA { ULONG DiskData ; } CDROM_DISK_DATA , * PCDROM_DISK_DATA ; #line 186 typedef struct _CDROM_SUB_Q_DATA_FORMAT { UCHAR Format ; UCHAR Track ; } CDROM_SUB_Q_DATA_FORMAT , * PCDROM_SUB_Q_DATA_FORMAT ; #line 196 typedef struct _SUB_Q_HEADER { UCHAR Reserved ; UCHAR AudioStatus ; UCHAR DataLength[2] ; } SUB_Q_HEADER , * PSUB_Q_HEADER ; typedef struct _SUB_Q_CURRENT_POSITION { SUB_Q_HEADER Header ; UCHAR FormatCode ; UCHAR Control : 4; UCHAR ADR : 4; UCHAR TrackNumber ; UCHAR IndexNumber ; UCHAR AbsoluteAddress[4] ; UCHAR TrackRelativeAddress[4] ; } SUB_Q_CURRENT_POSITION , * PSUB_Q_CURRENT_POSITION ; typedef struct _SUB_Q_MEDIA_CATALOG_NUMBER { SUB_Q_HEADER Header ; UCHAR FormatCode ; UCHAR Reserved[3] ; UCHAR Reserved1 : 7; UCHAR Mcval : 1; UCHAR MediaCatalog[15] ; } SUB_Q_MEDIA_CATALOG_NUMBER , * PSUB_Q_MEDIA_CATALOG_NUMBER ; typedef struct _SUB_Q_TRACK_ISRC { SUB_Q_HEADER Header ; UCHAR FormatCode ; UCHAR Reserved0 ; UCHAR Track ; UCHAR Reserved1 ; UCHAR Reserved2 : 7; UCHAR Tcval : 1; UCHAR TrackIsrc[15] ; } SUB_Q_TRACK_ISRC , * PSUB_Q_TRACK_ISRC ; typedef union _SUB_Q_CHANNEL_DATA { SUB_Q_CURRENT_POSITION CurrentPosition ; SUB_Q_MEDIA_CATALOG_NUMBER MediaCatalog ; SUB_Q_TRACK_ISRC TrackIsrc ; } SUB_Q_CHANNEL_DATA , * PSUB_Q_CHANNEL_DATA ; #line 272 typedef struct _CDROM_AUDIO_CONTROL { UCHAR LbaFormat ; USHORT LogicalBlocksPerSecond ; } CDROM_AUDIO_CONTROL , * PCDROM_AUDIO_CONTROL ; #line 283 typedef struct _VOLUME_CONTROL { UCHAR PortVolume[4] ; } VOLUME_CONTROL , * PVOLUME_CONTROL ; typedef enum _TRACK_MODE_TYPE { YellowMode2, XAForm2, CDDA } TRACK_MODE_TYPE , * PTRACK_MODE_TYPE ; #line 297 typedef struct __RAW_READ_INFO { LARGE_INTEGER DiskOffset ; ULONG SectorCount ; TRACK_MODE_TYPE TrackMode ; } RAW_READ_INFO , * PRAW_READ_INFO ; #line 16 "C:/NTDDK/inc/stdio.h" #pragma once #line 32 #pragma pack(push, 8) #line 89 typedef char * va_list ; #line 118 struct _iobuf { char * _ptr ; int _cnt ; char * _base ; int _flag ; int _file ; int _charbuf ; int _bufsiz ; char * _tmpfname ; } ; #line 128 typedef struct _iobuf FILE ; #line 184 extern FILE _iob[] ; #line 198 typedef __int64 fpos_t ; #line 239 int __cdecl _filbuf(FILE * ) ; int __cdecl _flsbuf(int , FILE * ) ; #line 245 FILE * __cdecl _fsopen(const char * , const char * , int ) ; #line 248 void __cdecl clearerr(FILE * ) ; int __cdecl fclose(FILE * ) ; int __cdecl _fcloseall(void ) ; #line 255 FILE * __cdecl _fdopen(int , const char * ) ; #line 258 int __cdecl feof(FILE * ) ; int __cdecl ferror(FILE * ) ; int __cdecl fflush(FILE * ) ; int __cdecl fgetc(FILE * ) ; int __cdecl _fgetchar(void ) ; int __cdecl fgetpos(FILE * , fpos_t * ) ; char * __cdecl fgets(char * , int , FILE * ) ; #line 269 int __cdecl _fileno(FILE * ) ; #line 272 int __cdecl _flushall(void ) ; FILE * __cdecl fopen(const char * , const char * ) ; int __cdecl fprintf(FILE * , const char * , ...) ; int __cdecl fputc(int , FILE * ) ; int __cdecl _fputchar(int ) ; int __cdecl fputs(const char * , FILE * ) ; size_t __cdecl fread(void * , size_t , size_t , FILE * ) ; FILE * __cdecl freopen(const char * , const char * , FILE * ) ; int __cdecl fscanf(FILE * , const char * , ...) ; int __cdecl fsetpos(FILE * , const fpos_t * ) ; int __cdecl fseek(FILE * , long , int ) ; long __cdecl ftell(FILE * ) ; size_t __cdecl fwrite(const void * , size_t , size_t , FILE * ) ; int __cdecl getc(FILE * ) ; int __cdecl getchar(void ) ; int __cdecl _getmaxstdio(void ) ; char * __cdecl gets(char * ) ; int __cdecl _getw(FILE * ) ; void __cdecl perror(const char * ) ; int __cdecl _pclose(FILE * ) ; FILE * __cdecl _popen(const char * , const char * ) ; int __cdecl printf(const char * , ...) ; int __cdecl putc(int , FILE * ) ; int __cdecl putchar(int ) ; int __cdecl puts(const char * ) ; int __cdecl _putw(int , FILE * ) ; int __cdecl remove(const char * ) ; int __cdecl rename(const char * , const char * ) ; void __cdecl rewind(FILE * ) ; int __cdecl _rmtmp(void ) ; int __cdecl scanf(const char * , ...) ; void __cdecl setbuf(FILE * , char * ) ; int __cdecl _setmaxstdio(int ) ; int __cdecl setvbuf(FILE * , char * , int , size_t ) ; int __cdecl _snprintf(char * , size_t , const char * , ...) ; int __cdecl sprintf(char * , const char * , ...) ; int __cdecl sscanf(const char * , const char * , ...) ; char * __cdecl _tempnam(const char * , const char * ) ; FILE * __cdecl tmpfile(void ) ; char * __cdecl tmpnam(char * ) ; int __cdecl ungetc(int , FILE * ) ; int __cdecl _unlink(const char * ) ; int __cdecl vfprintf(FILE * , const char * , va_list ) ; int __cdecl vprintf(const char * , va_list ) ; int __cdecl _vsnprintf(char * , size_t , const char * , va_list ) ; int __cdecl vsprintf(char * , const char * , va_list ) ; #line 330 FILE * __cdecl _wfsopen(const wchar_t * , const wchar_t * , int ) ; #line 333 wint_t __cdecl fgetwc(FILE * ) ; wint_t __cdecl _fgetwchar(void ) ; wint_t __cdecl fputwc(wint_t , FILE * ) ; wint_t __cdecl _fputwchar(wint_t ) ; wint_t __cdecl getwc(FILE * ) ; wint_t __cdecl getwchar(void ) ; wint_t __cdecl putwc(wint_t , FILE * ) ; wint_t __cdecl putwchar(wint_t ) ; wint_t __cdecl ungetwc(wint_t , FILE * ) ; #line 343 wchar_t * __cdecl fgetws(wchar_t * , int , FILE * ) ; int __cdecl fputws(const wchar_t * , FILE * ) ; wchar_t * __cdecl _getws(wchar_t * ) ; int __cdecl _putws(const wchar_t * ) ; #line 348 int __cdecl fwprintf(FILE * , const wchar_t * , ...) ; int __cdecl wprintf(const wchar_t * , ...) ; int __cdecl _snwprintf(wchar_t * , size_t , const wchar_t * , ...) ; int __cdecl swprintf(wchar_t * , const wchar_t * , ...) ; int __cdecl vfwprintf(FILE * , const wchar_t * , va_list ) ; int __cdecl vwprintf(const wchar_t * , va_list ) ; int __cdecl _vsnwprintf(wchar_t * , size_t , const wchar_t * , va_list ) ; int __cdecl vswprintf(wchar_t * , const wchar_t * , va_list ) ; int __cdecl fwscanf(FILE * , const wchar_t * , ...) ; int __cdecl swscanf(const wchar_t * , const wchar_t * , ...) ; int __cdecl wscanf(const wchar_t * , ...) ; #line 365 FILE * __cdecl _wfdopen(int , const wchar_t * ) ; FILE * __cdecl _wfopen(const wchar_t * , const wchar_t * ) ; FILE * __cdecl _wfreopen(const wchar_t * , const wchar_t * , FILE * ) ; void __cdecl _wperror(const wchar_t * ) ; FILE * __cdecl _wpopen(const wchar_t * , const wchar_t * ) ; int __cdecl _wremove(const wchar_t * ) ; wchar_t * __cdecl _wtempnam(const wchar_t * , const wchar_t * ) ; wchar_t * __cdecl _wtmpnam(wchar_t * ) ; #line 412 int __cdecl fcloseall(void ) ; FILE * __cdecl fdopen(int , const char * ) ; int __cdecl fgetchar(void ) ; int __cdecl fileno(FILE * ) ; int __cdecl flushall(void ) ; int __cdecl fputchar(int ) ; int __cdecl getw(FILE * ) ; int __cdecl putw(int , FILE * ) ; int __cdecl rmtmp(void ) ; char * __cdecl tempnam(const char * , const char * ) ; int __cdecl unlink(const char * ) ; #line 431 #pragma pack(pop) #line 61 "C:/NTDDK/inc/ddk/srb.h" typedef PHYSICAL_ADDRESS SCSI_PHYSICAL_ADDRESS , * PSCSI_PHYSICAL_ADDRESS ; typedef struct _ACCESS_RANGE { SCSI_PHYSICAL_ADDRESS RangeStart ; ULONG RangeLength ; BOOLEAN RangeInMemory ; } ACCESS_RANGE , * PACCESS_RANGE ; #line 75 typedef struct _PORT_CONFIGURATION_INFORMATION { ULONG Length ; ULONG SystemIoBusNumber ; INTERFACE_TYPE AdapterInterfaceType ; ULONG BusInterruptLevel ; ULONG BusInterruptVector ; KINTERRUPT_MODE InterruptMode ; ULONG MaximumTransferLength ; ULONG NumberOfPhysicalBreaks ; ULONG DmaChannel ; ULONG DmaPort ; DMA_WIDTH DmaWidth ; DMA_SPEED DmaSpeed ; ULONG AlignmentMask ; ULONG NumberOfAccessRanges ; ACCESS_RANGE ( * AccessRanges )[] ; PVOID Reserved ; UCHAR NumberOfBuses ; CCHAR InitiatorBusId[8] ; BOOLEAN ScatterGather ; BOOLEAN Master ; BOOLEAN CachesData ; BOOLEAN AdapterScansDown ; BOOLEAN AtdiskPrimaryClaimed ; BOOLEAN AtdiskSecondaryClaimed ; BOOLEAN Dma32BitAddresses ; BOOLEAN DemandMode ; BOOLEAN MapBuffers ; BOOLEAN NeedPhysicalAddresses ; BOOLEAN TaggedQueuing ; BOOLEAN AutoRequestSense ; BOOLEAN MultipleRequestPerLu ; BOOLEAN ReceiveEvent ; BOOLEAN RealModeInitialized ; BOOLEAN BufferAccessScsiPortControlled ; UCHAR MaximumNumberOfTargets ; UCHAR ReservedUchars[2] ; ULONG SlotNumber ; ULONG BusInterruptLevel2 ; ULONG BusInterruptVector2 ; KINTERRUPT_MODE InterruptMode2 ; ULONG DmaChannel2 ; ULONG DmaPort2 ; DMA_WIDTH DmaWidth2 ; DMA_SPEED DmaSpeed2 ; ULONG DeviceExtensionSize ; ULONG SpecificLuExtensionSize ; ULONG SrbExtensionSize ; UCHAR Dma64BitAddresses ; BOOLEAN ResetTargetSupported ; UCHAR MaximumNumberOfLogicalUnits ; BOOLEAN WmiDataProvider ; } PORT_CONFIGURATION_INFORMATION , * PPORT_CONFIGURATION_INFORMATION ; #line 376 typedef enum _SCSI_ADAPTER_CONTROL_TYPE { ScsiQuerySupportedControlTypes = 0, ScsiStopAdapter, ScsiRestartAdapter, ScsiSetBootConfig, ScsiSetRunningConfig, ScsiAdapterControlMax, MakeAdapterControlTypeSizeOfUlong = 0xffffffff } SCSI_ADAPTER_CONTROL_TYPE , * PSCSI_ADAPTER_CONTROL_TYPE ; #line 390 typedef enum _SCSI_ADAPTER_CONTROL_STATUS { ScsiAdapterControlSuccess = 0, ScsiAdapterControlUnsuccessful } SCSI_ADAPTER_CONTROL_STATUS , * PSCSI_ADAPTER_CONTROL_STATUS ; #line 403 #pragma warning(disable:4200) #line 404 typedef struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST { ULONG MaxControlType ; BOOLEAN SupportedTypeList[0] ; } SCSI_SUPPORTED_CONTROL_TYPE_LIST , * PSCSI_SUPPORTED_CONTROL_TYPE_LIST ; #line 422 #pragma warning(default:4200) #line 446 typedef struct _SCSI_REQUEST_BLOCK { USHORT Length ; UCHAR Function ; UCHAR SrbStatus ; UCHAR ScsiStatus ; UCHAR PathId ; UCHAR TargetId ; UCHAR Lun ; UCHAR QueueTag ; UCHAR QueueAction ; UCHAR CdbLength ; UCHAR SenseInfoBufferLength ; ULONG SrbFlags ; ULONG DataTransferLength ; ULONG TimeOutValue ; PVOID DataBuffer ; PVOID SenseInfoBuffer ; struct _SCSI_REQUEST_BLOCK * NextSrb ; PVOID OriginalRequest ; PVOID SrbExtension ; union { ULONG InternalStatus ; ULONG QueueSortKey ; } ; UCHAR Cdb[16] ; } SCSI_REQUEST_BLOCK , * PSCSI_REQUEST_BLOCK ; #line 490 typedef struct _SCSI_WMI_REQUEST_BLOCK { USHORT Length ; UCHAR Function ; UCHAR SrbStatus ; UCHAR WMISubFunction ; UCHAR PathId ; UCHAR TargetId ; UCHAR Lun ; UCHAR Reserved1 ; UCHAR WMIFlags ; UCHAR Reserved2[2] ; ULONG SrbFlags ; ULONG DataTransferLength ; ULONG TimeOutValue ; PVOID DataBuffer ; PVOID DataPath ; PVOID Reserved3 ; PVOID OriginalRequest ; PVOID SrbExtension ; ULONG Reserved4 ; UCHAR Reserved5[16] ; } SCSI_WMI_REQUEST_BLOCK , * PSCSI_WMI_REQUEST_BLOCK ; #line 633 typedef BOOLEAN ( * PHW_INITIALIZE )(PVOID DeviceExtension ) ; #line 639 typedef BOOLEAN ( * PHW_STARTIO )(PVOID DeviceExtension , PSCSI_REQUEST_BLOCK Srb ) ; #line 646 typedef BOOLEAN ( * PHW_INTERRUPT )(PVOID DeviceExtension ) ; #line 652 typedef void ( * PHW_TIMER )(PVOID DeviceExtension ) ; #line 658 typedef void ( * PHW_DMA_STARTED )(PVOID DeviceExtension ) ; #line 664 typedef ULONG ( * PHW_FIND_ADAPTER )(PVOID DeviceExtension , PVOID HwContext , PVOID BusInformation , PCHAR ArgumentString , PPORT_CONFIGURATION_INFORMATION ConfigInfo , PBOOLEAN Again ) ; #line 675 typedef BOOLEAN ( * PHW_RESET_BUS )(PVOID DeviceExtension , ULONG PathId ) ; #line 682 typedef BOOLEAN ( * PHW_ADAPTER_STATE )(PVOID DeviceExtension , PVOID Context , BOOLEAN SaveState ) ; #line 690 typedef SCSI_ADAPTER_CONTROL_STATUS ( * PHW_ADAPTER_CONTROL )(PVOID DeviceExtension , SCSI_ADAPTER_CONTROL_TYPE ControlType , PVOID Parameters ) ; #line 728 typedef enum _SCSI_NOTIFICATION_TYPE { RequestComplete, NextRequest, NextLuRequest, ResetDetected, CallDisableInterrupts, CallEnableInterrupts, RequestTimerCall, BusChangeDetected, WMIEvent, WMIReregister } SCSI_NOTIFICATION_TYPE , * PSCSI_NOTIFICATION_TYPE ; #line 746 typedef struct _HW_INITIALIZATION_DATA { ULONG HwInitializationDataSize ; INTERFACE_TYPE AdapterInterfaceType ; PHW_INITIALIZE HwInitialize ; PHW_STARTIO HwStartIo ; PHW_INTERRUPT HwInterrupt ; PHW_FIND_ADAPTER HwFindAdapter ; PHW_RESET_BUS HwResetBus ; PHW_DMA_STARTED HwDmaStarted ; PHW_ADAPTER_STATE HwAdapterState ; ULONG DeviceExtensionSize ; ULONG SpecificLuExtensionSize ; ULONG SrbExtensionSize ; ULONG NumberOfAccessRanges ; PVOID Reserved ; BOOLEAN MapBuffers ; BOOLEAN NeedPhysicalAddresses ; BOOLEAN TaggedQueuing ; BOOLEAN AutoRequestSense ; BOOLEAN MultipleRequestPerLu ; BOOLEAN ReceiveEvent ; USHORT VendorIdLength ; PVOID VendorId ; USHORT ReservedUshort ; USHORT DeviceIdLength ; PVOID DeviceId ; PHW_ADAPTER_CONTROL HwAdapterControl ; } HW_INITIALIZATION_DATA , * PHW_INITIALIZATION_DATA ; #line 890 ULONG ScsiPortInitialize(PVOID Argument1 , PVOID Argument2 , struct _HW_INITIALIZATION_DATA * HwInitializationData , PVOID HwContext ) ; #line 899 void ScsiPortFreeDeviceBase(PVOID HwDeviceExtension , PVOID MappedAddress ) ; #line 906 ULONG ScsiPortGetBusData(PVOID DeviceExtension , ULONG BusDataType , ULONG SystemIoBusNumber , ULONG SlotNumber , PVOID Buffer , ULONG Length ) ; #line 917 ULONG ScsiPortSetBusDataByOffset(PVOID DeviceExtension , ULONG BusDataType , ULONG SystemIoBusNumber , ULONG SlotNumber , PVOID Buffer , ULONG Offset , ULONG Length ) ; #line 929 PVOID ScsiPortGetDeviceBase(PVOID HwDeviceExtension , INTERFACE_TYPE BusType , ULONG SystemIoBusNumber , SCSI_PHYSICAL_ADDRESS IoAddress , ULONG NumberOfBytes , BOOLEAN InIoSpace ) ; #line 940 PVOID ScsiPortGetLogicalUnit(PVOID HwDeviceExtension , UCHAR PathId , UCHAR TargetId , UCHAR Lun ) ; #line 949 PSCSI_REQUEST_BLOCK ScsiPortGetSrb(PVOID DeviceExtension , UCHAR PathId , UCHAR TargetId , UCHAR Lun , LONG QueueTag ) ; #line 959 SCSI_PHYSICAL_ADDRESS ScsiPortGetPhysicalAddress(PVOID HwDeviceExtension , PSCSI_REQUEST_BLOCK Srb , PVOID VirtualAddress , ULONG * Length ) ; #line 968 PVOID ScsiPortGetVirtualAddress(PVOID HwDeviceExtension , SCSI_PHYSICAL_ADDRESS PhysicalAddress ) ; #line 975 PVOID ScsiPortGetUncachedExtension(PVOID HwDeviceExtension , PPORT_CONFIGURATION_INFORMATION ConfigInfo , ULONG NumberOfBytes ) ; #line 983 void ScsiPortFlushDma(PVOID DeviceExtension ) ; #line 989 void ScsiPortIoMapTransfer(PVOID HwDeviceExtension , PSCSI_REQUEST_BLOCK Srb , PVOID LogicalAddress , ULONG Length ) ; #line 998 void ScsiPortNotification(SCSI_NOTIFICATION_TYPE NotificationType , PVOID HwDeviceExtension , ...) ; #line 1006 void ScsiPortLogError(PVOID HwDeviceExtension , PSCSI_REQUEST_BLOCK Srb , UCHAR PathId , UCHAR TargetId , UCHAR Lun , ULONG ErrorCode , ULONG UniqueId ) ; #line 1018 void ScsiPortCompleteRequest(PVOID HwDeviceExtension , UCHAR PathId , UCHAR TargetId , UCHAR Lun , UCHAR SrbStatus ) ; #line 1028 void ScsiPortMoveMemory(PVOID WriteBuffer , PVOID ReadBuffer , ULONG Length ) ; #line 1036 UCHAR ScsiPortReadPortUchar(PUCHAR Port ) ; #line 1042 USHORT ScsiPortReadPortUshort(PUSHORT Port ) ; #line 1048 ULONG ScsiPortReadPortUlong(PULONG Port ) ; #line 1054 void ScsiPortReadPortBufferUchar(PUCHAR Port , PUCHAR Buffer , ULONG Count ) ; #line 1062 void ScsiPortReadPortBufferUshort(PUSHORT Port , PUSHORT Buffer , ULONG Count ) ; #line 1070 void ScsiPortReadPortBufferUlong(PULONG Port , PULONG Buffer , ULONG Count ) ; #line 1078 UCHAR ScsiPortReadRegisterUchar(PUCHAR Register ) ; #line 1084 USHORT ScsiPortReadRegisterUshort(PUSHORT Register ) ; #line 1090 ULONG ScsiPortReadRegisterUlong(PULONG Register ) ; #line 1096 void ScsiPortReadRegisterBufferUchar(PUCHAR Register , PUCHAR Buffer , ULONG Count ) ; #line 1104 void ScsiPortReadRegisterBufferUshort(PUSHORT Register , PUSHORT Buffer , ULONG Count ) ; #line 1112 void ScsiPortReadRegisterBufferUlong(PULONG Register , PULONG Buffer , ULONG Count ) ; #line 1120 void ScsiPortStallExecution(ULONG Delay ) ; #line 1126 void ScsiPortWritePortUchar(PUCHAR Port , UCHAR Value ) ; #line 1133 void ScsiPortWritePortUshort(PUSHORT Port , USHORT Value ) ; #line 1140 void ScsiPortWritePortUlong(PULONG Port , ULONG Value ) ; #line 1147 void ScsiPortWritePortBufferUchar(PUCHAR Port , PUCHAR Buffer , ULONG Count ) ; #line 1155 void ScsiPortWritePortBufferUshort(PUSHORT Port , PUSHORT Buffer , ULONG Count ) ; #line 1163 void ScsiPortWritePortBufferUlong(PULONG Port , PULONG Buffer , ULONG Count ) ; #line 1171 void ScsiPortWriteRegisterUchar(PUCHAR Register , UCHAR Value ) ; #line 1178 void ScsiPortWriteRegisterUshort(PUSHORT Register , USHORT Value ) ; #line 1185 void ScsiPortWriteRegisterUlong(PULONG Register , ULONG Value ) ; #line 1192 void ScsiPortWriteRegisterBufferUchar(PUCHAR Register , PUCHAR Buffer , ULONG Count ) ; #line 1200 void ScsiPortWriteRegisterBufferUshort(PUSHORT Register , PUSHORT Buffer , ULONG Count ) ; #line 1208 void ScsiPortWriteRegisterBufferUlong(PULONG Register , PULONG Buffer , ULONG Count ) ; #line 1216 SCSI_PHYSICAL_ADDRESS ScsiPortConvertUlongToPhysicalAddress(ULONG_PTR UlongAddress ) ; #line 1222 ULONG ScsiPortConvertPhysicalAddressToUlong(SCSI_PHYSICAL_ADDRESS Address ) ; #line 1237 BOOLEAN ScsiPortValidateRange(PVOID HwDeviceExtension , INTERFACE_TYPE BusType , ULONG SystemIoBusNumber , SCSI_PHYSICAL_ADDRESS IoAddress , ULONG NumberOfBytes , BOOLEAN InIoSpace ) ; #line 1250 void ScsiDebugPrint(ULONG DebugPrintLevel , PCCHAR DebugMessage , ...) ; #line 32 "C:/NTDDK/inc/ddk/scsi.h" typedef union _CDB { struct _CDB6GENERIC { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR CommandUniqueBits : 4; UCHAR LogicalUnitNumber : 3; UCHAR CommandUniqueBytes[3] ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved : 4; UCHAR VendorUnique : 2; } CDB6GENERIC , * PCDB6GENERIC ; struct _CDB6READWRITE { UCHAR OperationCode ; UCHAR LogicalBlockMsb1 : 5; UCHAR LogicalUnitNumber : 3; UCHAR LogicalBlockMsb0 ; UCHAR LogicalBlockLsb ; UCHAR TransferBlocks ; UCHAR Control ; } CDB6READWRITE , * PCDB6READWRITE ; struct _CDB6INQUIRY { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR LogicalUnitNumber : 3; UCHAR PageCode ; UCHAR IReserved ; UCHAR AllocationLength ; UCHAR Control ; } CDB6INQUIRY , * PCDB6INQUIRY ; struct _CDB6VERIFY { UCHAR OperationCode ; UCHAR Fixed : 1; UCHAR ByteCompare : 1; UCHAR Immediate : 1; UCHAR Reserved : 2; UCHAR LogicalUnitNumber : 3; UCHAR VerificationLength[3] ; UCHAR Control ; } CDB6VERIFY , * PCDB6VERIFY ; struct _CDB6FORMAT { UCHAR OperationCode ; UCHAR FormatControl : 5; UCHAR LogicalUnitNumber : 3; UCHAR FReserved1 ; UCHAR InterleaveMsb ; UCHAR InterleaveLsb ; UCHAR FReserved2 ; } CDB6FORMAT , * PCDB6FORMAT ; struct _CDB10 { UCHAR OperationCode ; UCHAR RelativeAddress : 1; UCHAR Reserved1 : 2; UCHAR ForceUnitAccess : 1; UCHAR DisablePageOut : 1; UCHAR LogicalUnitNumber : 3; UCHAR LogicalBlockByte0 ; UCHAR LogicalBlockByte1 ; UCHAR LogicalBlockByte2 ; UCHAR LogicalBlockByte3 ; UCHAR Reserved2 ; UCHAR TransferBlocksMsb ; UCHAR TransferBlocksLsb ; UCHAR Control ; } CDB10 , * PCDB10 ; struct _CDB12 { UCHAR OperationCode ; UCHAR RelativeAddress : 1; UCHAR Reserved1 : 2; UCHAR ForceUnitAccess : 1; UCHAR DisablePageOut : 1; UCHAR LogicalUnitNumber : 3; UCHAR LogicalBlock[4] ; UCHAR TransferLength[4] ; UCHAR Reserved2 ; UCHAR Control ; } CDB12 , * PCDB12 ; struct _PAUSE_RESUME { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR LogicalUnitNumber : 3; UCHAR Reserved2[6] ; UCHAR Action ; UCHAR Control ; } PAUSE_RESUME , * PPAUSE_RESUME ; struct _READ_TOC { UCHAR OperationCode ; UCHAR Reserved0 : 1; UCHAR Msf : 1; UCHAR Reserved1 : 3; UCHAR LogicalUnitNumber : 3; UCHAR Format2 : 4; UCHAR Reserved2 : 4; UCHAR Reserved3[3] ; UCHAR StartingTrack ; UCHAR AllocationLength[2] ; UCHAR Control : 6; UCHAR Format : 2; } READ_TOC , * PREAD_TOC ; struct _READ_DISK_INFORMATION { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR Lun : 3; UCHAR Reserved2[5] ; UCHAR AllocationLength[2] ; UCHAR Control ; } READ_DISK_INFORMATION , * PREAD_DISK_INFORMATION ; struct _READ_TRACK_INFORMATION { UCHAR OperationCode ; UCHAR Track : 1; UCHAR Reserved1 : 3; UCHAR Reserved2 : 1; UCHAR Lun : 3; UCHAR BlockAddress[4] ; UCHAR Reserved3 ; UCHAR AllocationLength[2] ; UCHAR Control ; } READ_TRACK_INFORMATION , * PREAD_TRACK_INFORMATION ; struct _READ_HEADER { UCHAR OperationCode ; UCHAR Reserved1 : 1; UCHAR Msf : 1; UCHAR Reserved2 : 3; UCHAR Lun : 3; UCHAR LogicalBlockAddress[4] ; UCHAR Reserved3 ; UCHAR AllocationLength[2] ; UCHAR Control ; } READ_HEADER , * PREAD_HEADER ; struct _PLAY_AUDIO { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR LogicalUnitNumber : 3; UCHAR StartingBlockAddress[4] ; UCHAR Reserved2 ; UCHAR PlayLength[2] ; UCHAR Control ; } PLAY_AUDIO , * PPLAY_AUDIO ; struct _PLAY_AUDIO_MSF { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR LogicalUnitNumber : 3; UCHAR Reserved2 ; UCHAR StartingM ; UCHAR StartingS ; UCHAR StartingF ; UCHAR EndingM ; UCHAR EndingS ; UCHAR EndingF ; UCHAR Control ; } PLAY_AUDIO_MSF , * PPLAY_AUDIO_MSF ; struct _PLAY_CD { UCHAR OperationCode ; UCHAR Reserved1 : 1; UCHAR CMSF : 1; UCHAR ExpectedSectorType : 3; UCHAR Lun : 3; union { struct _LBA { UCHAR StartingBlockAddress[4] ; UCHAR PlayLength[4] ; } LBA ; struct _MSF { UCHAR Reserved1 ; UCHAR StartingM ; UCHAR StartingS ; UCHAR StartingF ; UCHAR EndingM ; UCHAR EndingS ; UCHAR EndingF ; UCHAR Reserved2 ; } MSF ; } ; UCHAR Audio : 1; UCHAR Composite : 1; UCHAR Port1 : 1; UCHAR Port2 : 1; UCHAR Reserved2 : 3; UCHAR Speed : 1; UCHAR Control ; } PLAY_CD , * PPLAY_CD ; struct _SCAN_CD { UCHAR OperationCode ; UCHAR RelativeAddress : 1; UCHAR Reserved1 : 3; UCHAR Direct : 1; UCHAR Lun : 3; UCHAR StartingAddress[4] ; UCHAR Reserved2[3] ; UCHAR Reserved3 : 6; UCHAR Type : 2; UCHAR Reserved4 ; UCHAR Control ; } SCAN_CD , * PSCAN_CD ; struct _STOP_PLAY_SCAN { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR Lun : 3; UCHAR Reserved2[7] ; UCHAR Control ; } STOP_PLAY_SCAN , * PSTOP_PLAY_SCAN ; struct _SUBCHANNEL { UCHAR OperationCode ; UCHAR Reserved0 : 1; UCHAR Msf : 1; UCHAR Reserved1 : 3; UCHAR LogicalUnitNumber : 3; UCHAR Reserved2 : 6; UCHAR SubQ : 1; UCHAR Reserved3 : 1; UCHAR Format ; UCHAR Reserved4[2] ; UCHAR TrackNumber ; UCHAR AllocationLength[2] ; UCHAR Control ; } SUBCHANNEL , * PSUBCHANNEL ; struct _READ_CD { UCHAR OperationCode ; UCHAR RelativeAddress : 1; UCHAR Reserved0 : 1; UCHAR ExpectedSectorType : 3; UCHAR Lun : 3; UCHAR StartingLBA[4] ; UCHAR TransferBlocks[3] ; UCHAR Reserved2 : 1; UCHAR ErrorFlags : 2; UCHAR IncludeEDC : 1; UCHAR IncludeUserData : 1; UCHAR HeaderCode : 2; UCHAR IncludeSyncData : 1; UCHAR SubChannelSelection : 3; UCHAR Reserved3 : 5; UCHAR Control ; } READ_CD , * PREAD_CD ; struct _READ_CD_MSF { UCHAR OperationCode ; UCHAR RelativeAddress : 1; UCHAR Reserved1 : 1; UCHAR ExpectedSectorType : 3; UCHAR Lun : 3; UCHAR Reserved2 ; UCHAR StartingM ; UCHAR StartingS ; UCHAR StartingF ; UCHAR EndingM ; UCHAR EndingS ; UCHAR EndingF ; UCHAR Reserved3 ; UCHAR Reserved4 : 1; UCHAR ErrorFlags : 2; UCHAR IncludeEDC : 1; UCHAR IncludeUserData : 1; UCHAR HeaderCode : 2; UCHAR IncludeSyncData : 1; UCHAR SubChannelSelection : 3; UCHAR Reserved5 : 5; UCHAR Control ; } READ_CD_MSF , * PREAD_CD_MSF ; struct _PLXTR_READ_CDDA { UCHAR OperationCode ; UCHAR Reserved0 : 5; UCHAR LogicalUnitNumber : 3; UCHAR LogicalBlockByte0 ; UCHAR LogicalBlockByte1 ; UCHAR LogicalBlockByte2 ; UCHAR LogicalBlockByte3 ; UCHAR TransferBlockByte0 ; UCHAR TransferBlockByte1 ; UCHAR TransferBlockByte2 ; UCHAR TransferBlockByte3 ; UCHAR SubCode ; UCHAR Control ; } PLXTR_READ_CDDA , * PPLXTR_READ_CDDA ; struct _NEC_READ_CDDA { UCHAR OperationCode ; UCHAR Reserved0 ; UCHAR LogicalBlockByte0 ; UCHAR LogicalBlockByte1 ; UCHAR LogicalBlockByte2 ; UCHAR LogicalBlockByte3 ; UCHAR Reserved1 ; UCHAR TransferBlockByte0 ; UCHAR TransferBlockByte1 ; UCHAR Control ; } NEC_READ_CDDA , * PNEC_READ_CDDA ; struct _MODE_SENSE { UCHAR OperationCode ; UCHAR Reserved1 : 3; UCHAR Dbd : 1; UCHAR Reserved2 : 1; UCHAR LogicalUnitNumber : 3; UCHAR PageCode : 6; UCHAR Pc : 2; UCHAR Reserved3 ; UCHAR AllocationLength ; UCHAR Control ; } MODE_SENSE , * PMODE_SENSE ; struct _MODE_SENSE10 { UCHAR OperationCode ; UCHAR Reserved1 : 3; UCHAR Dbd : 1; UCHAR Reserved2 : 1; UCHAR LogicalUnitNumber : 3; UCHAR PageCode : 6; UCHAR Pc : 2; UCHAR Reserved3[4] ; UCHAR AllocationLength[2] ; UCHAR Control ; } MODE_SENSE10 , * PMODE_SENSE10 ; struct _MODE_SELECT { UCHAR OperationCode ; UCHAR SPBit : 1; UCHAR Reserved1 : 3; UCHAR PFBit : 1; UCHAR LogicalUnitNumber : 3; UCHAR Reserved2[2] ; UCHAR ParameterListLength ; UCHAR Control ; } MODE_SELECT , * PMODE_SELECT ; struct _MODE_SELECT10 { UCHAR OperationCode ; UCHAR SPBit : 1; UCHAR Reserved1 : 3; UCHAR PFBit : 1; UCHAR LogicalUnitNumber : 3; UCHAR Reserved2[5] ; UCHAR ParameterListLength[2] ; UCHAR Control ; } MODE_SELECT10 , * PMODE_SELECT10 ; struct _LOCATE { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR CPBit : 1; UCHAR BTBit : 1; UCHAR Reserved1 : 2; UCHAR LogicalUnitNumber : 3; UCHAR Reserved3 ; UCHAR LogicalBlockAddress[4] ; UCHAR Reserved4 ; UCHAR Partition ; UCHAR Control ; } LOCATE , * PLOCATE ; struct _LOGSENSE { UCHAR OperationCode ; UCHAR SPBit : 1; UCHAR PPCBit : 1; UCHAR Reserved1 : 3; UCHAR LogicalUnitNumber : 3; UCHAR PageCode : 6; UCHAR PCBit : 2; UCHAR Reserved2 ; UCHAR Reserved3 ; UCHAR ParameterPointer[2] ; UCHAR AllocationLength[2] ; UCHAR Control ; } LOGSENSE , * PLOGSENSE ; struct _LOGSELECT { UCHAR OperationCode ; UCHAR SPBit : 1; UCHAR PCRBit : 1; UCHAR Reserved1 : 3; UCHAR LogicalUnitNumber : 3; UCHAR Reserved : 6; UCHAR PCBit : 2; UCHAR Reserved2[4] ; UCHAR ParameterListLength[2] ; UCHAR Control ; } LOGSELECT , * PLOGSELECT ; struct _PRINT { UCHAR OperationCode ; UCHAR Reserved : 5; UCHAR LogicalUnitNumber : 3; UCHAR TransferLength[3] ; UCHAR Control ; } PRINT , * PPRINT ; struct _SEEK { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR LogicalUnitNumber : 3; UCHAR LogicalBlockAddress[4] ; UCHAR Reserved2[3] ; UCHAR Control ; } SEEK , * PSEEK ; struct _ERASE { UCHAR OperationCode ; UCHAR Long : 1; UCHAR Immediate : 1; UCHAR Reserved1 : 3; UCHAR LogicalUnitNumber : 3; UCHAR Reserved2[3] ; UCHAR Control ; } ERASE , * PERASE ; struct _START_STOP { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR Reserved1 : 4; UCHAR LogicalUnitNumber : 3; UCHAR Reserved2[2] ; UCHAR Start : 1; UCHAR LoadEject : 1; UCHAR Reserved3 : 6; UCHAR Control ; } START_STOP , * PSTART_STOP ; struct _MEDIA_REMOVAL { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR LogicalUnitNumber : 3; UCHAR Reserved2[2] ; UCHAR Prevent : 1; UCHAR Persistant : 1; UCHAR Reserved3 : 6; UCHAR Control ; } MEDIA_REMOVAL , * PMEDIA_REMOVAL ; struct _SEEK_BLOCK { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR Reserved1 : 7; UCHAR BlockAddress[3] ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved2 : 4; UCHAR VendorUnique : 2; } SEEK_BLOCK , * PSEEK_BLOCK ; struct _REQUEST_BLOCK_ADDRESS { UCHAR OperationCode ; UCHAR Reserved1[3] ; UCHAR AllocationLength ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved2 : 4; UCHAR VendorUnique : 2; } REQUEST_BLOCK_ADDRESS , * PREQUEST_BLOCK_ADDRESS ; struct _PARTITION { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR Sel : 1; UCHAR PartitionSelect : 6; UCHAR Reserved1[3] ; UCHAR Control ; } PARTITION , * PPARTITION ; struct _WRITE_TAPE_MARKS { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR WriteSetMarks : 1; UCHAR Reserved : 3; UCHAR LogicalUnitNumber : 3; UCHAR TransferLength[3] ; UCHAR Control ; } WRITE_TAPE_MARKS , * PWRITE_TAPE_MARKS ; struct _SPACE_TAPE_MARKS { UCHAR OperationCode ; UCHAR Code : 3; UCHAR Reserved : 2; UCHAR LogicalUnitNumber : 3; UCHAR NumMarksMSB ; UCHAR NumMarks ; UCHAR NumMarksLSB ; union { UCHAR value ; struct { UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved : 4; UCHAR VendorUnique : 2; } Fields ; } Byte6 ; } SPACE_TAPE_MARKS , * PSPACE_TAPE_MARKS ; struct _READ_POSITION { UCHAR Operation ; UCHAR BlockType : 1; UCHAR Reserved1 : 4; UCHAR Lun : 3; UCHAR Reserved2[7] ; UCHAR Control ; } READ_POSITION , * PREAD_POSITION ; struct _CDB6READWRITETAPE { UCHAR OperationCode ; UCHAR VendorSpecific : 5; UCHAR Reserved : 3; UCHAR TransferLenMSB ; UCHAR TransferLen ; UCHAR TransferLenLSB ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved1 : 4; UCHAR VendorUnique : 2; } CDB6READWRITETAPE , * PCDB6READWRITETAPE ; struct _INIT_ELEMENT_STATUS { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR LogicalUnitNubmer : 3; UCHAR Reserved2[3] ; UCHAR Reserved3 : 7; UCHAR NoBarCode : 1; } INIT_ELEMENT_STATUS , * PINIT_ELEMENT_STATUS ; struct _INITIALIZE_ELEMENT_RANGE { UCHAR OperationCode ; UCHAR Range : 1; UCHAR Reserved1 : 4; UCHAR LogicalUnitNubmer : 3; UCHAR FirstElementAddress[2] ; UCHAR Reserved2[2] ; UCHAR NumberOfElements[2] ; UCHAR Reserved3 ; UCHAR Reserved4 : 7; UCHAR NoBarCode : 1; } INITIALIZE_ELEMENT_RANGE , * PINITIALIZE_ELEMENT_RANGE ; struct _POSITION_TO_ELEMENT { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR LogicalUnitNumber : 3; UCHAR TransportElementAddress[2] ; UCHAR DestinationElementAddress[2] ; UCHAR Reserved2[2] ; UCHAR Flip : 1; UCHAR Reserved3 : 7; UCHAR Control ; } POSITION_TO_ELEMENT , * PPOSITION_TO_ELEMENT ; struct _MOVE_MEDIUM { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR LogicalUnitNumber : 3; UCHAR TransportElementAddress[2] ; UCHAR SourceElementAddress[2] ; UCHAR DestinationElementAddress[2] ; UCHAR Reserved2[2] ; UCHAR Flip : 1; UCHAR Reserved3 : 7; UCHAR Control ; } MOVE_MEDIUM , * PMOVE_MEDIUM ; struct _EXCHANGE_MEDIUM { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR LogicalUnitNumber : 3; UCHAR TransportElementAddress[2] ; UCHAR SourceElementAddress[2] ; UCHAR Destination1ElementAddress[2] ; UCHAR Destination2ElementAddress[2] ; UCHAR Flip1 : 1; UCHAR Flip2 : 1; UCHAR Reserved3 : 6; UCHAR Control ; } EXCHANGE_MEDIUM , * PEXCHANGE_MEDIUM ; struct _READ_ELEMENT_STATUS { UCHAR OperationCode ; UCHAR ElementType : 4; UCHAR VolTag : 1; UCHAR LogicalUnitNumber : 3; UCHAR StartingElementAddress[2] ; UCHAR NumberOfElements[2] ; UCHAR Reserved1 ; UCHAR AllocationLength[3] ; UCHAR Reserved2 ; UCHAR Control ; } READ_ELEMENT_STATUS , * PREAD_ELEMENT_STATUS ; struct _SEND_VOLUME_TAG { UCHAR OperationCode ; UCHAR ElementType : 4; UCHAR Reserved1 : 1; UCHAR LogicalUnitNumber : 3; UCHAR StartingElementAddress[2] ; UCHAR Reserved2 ; UCHAR ActionCode : 5; UCHAR Reserved3 : 3; UCHAR Reserved4[2] ; UCHAR ParameterListLength[2] ; UCHAR Reserved5 ; UCHAR Control ; } SEND_VOLUME_TAG , * PSEND_VOLUME_TAG ; struct _REQUEST_VOLUME_ELEMENT_ADDRESS { UCHAR OperationCode ; UCHAR ElementType : 4; UCHAR VolTag : 1; UCHAR LogicalUnitNumber : 3; UCHAR StartingElementAddress[2] ; UCHAR NumberElements[2] ; UCHAR Reserved1 ; UCHAR AllocationLength[3] ; UCHAR Reserved2 ; UCHAR Control ; } REQUEST_VOLUME_ELEMENT_ADDRESS , * PREQUEST_VOLUME_ELEMENT_ADDRESS ; struct _LOAD_UNLOAD { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR Reserved1 : 4; UCHAR Lun : 3; UCHAR Reserved2[2] ; UCHAR Start : 1; UCHAR LoadEject : 1; UCHAR Reserved3 : 6; UCHAR Reserved4[3] ; UCHAR Slot ; UCHAR Reserved5[3] ; } LOAD_UNLOAD , * PLOAD_UNLOAD ; struct _MECH_STATUS { UCHAR OperationCode ; UCHAR Reserved : 5; UCHAR Lun : 3; UCHAR Reserved1[6] ; UCHAR AllocationLength[2] ; UCHAR Reserved2[1] ; UCHAR Control ; } MECH_STATUS , * PMECH_STATUS ; struct _SYNCHRONIZE_CACHE10 { UCHAR OperationCode ; UCHAR RelAddr : 1; UCHAR Immediate : 1; UCHAR Reserved : 3; UCHAR Lun : 3; UCHAR LogicalBlockAddress[4] ; UCHAR Reserved2 ; UCHAR BlockCount[2] ; UCHAR Control ; } SYNCHRONIZE_CACHE10 , * PSYNCHRONIZE_CACHE10 ; struct _GET_EVENT_STATUS_NOTIFICATION { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR Reserved : 4; UCHAR Lun : 3; UCHAR Reserved2[2] ; UCHAR NotificationClassRequest ; UCHAR Reserved3[2] ; UCHAR EventListLength[2] ; UCHAR Control ; } GET_EVENT_STATUS_NOTIFICATION , * PGET_EVENT_STATUS_NOTIFICATION ; struct _READ_DVD_STRUCTURE { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR Lun : 3; UCHAR RMDBlockNumber[4] ; UCHAR LayerNumber ; UCHAR Format ; UCHAR AllocationLength[2] ; UCHAR Reserved3 : 6; UCHAR AGID : 2; UCHAR Control ; } READ_DVD_STRUCTURE , * PREAD_DVD_STRUCTURE ; struct _SEND_KEY { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR Lun : 3; UCHAR Reserved2[6] ; UCHAR ParameterListLength[2] ; UCHAR KeyFormat : 6; UCHAR AGID : 2; UCHAR Control ; } SEND_KEY , * PSEND_KEY ; struct _REPORT_KEY { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR Lun : 3; UCHAR LogicalBlockAddress[4] ; UCHAR Reserved2[2] ; UCHAR AllocationLength[2] ; UCHAR KeyFormat : 6; UCHAR AGID : 2; UCHAR Control ; } REPORT_KEY , * PREPORT_KEY ; struct _SET_READ_AHEAD { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR Lun : 3; UCHAR TriggerLBA[4] ; UCHAR ReadAheadLBA[4] ; UCHAR Reserved2 ; UCHAR Control ; } SET_READ_AHEAD , * PSET_READ_AHEAD ; struct _READ_FORMATTED_CAPACITIES { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR Lun : 3; UCHAR Reserved2[5] ; UCHAR AllocationLength[2] ; UCHAR Control ; } READ_FORMATTED_CAPACITIES , * PREAD_FORMATTED_CAPACITIES ; struct _REPORT_LUNS { UCHAR OperationCode ; UCHAR Reserved1[5] ; UCHAR AllocationLength[4] ; UCHAR Reserved2[1] ; UCHAR Control ; } REPORT_LUNS , * PREPORT_LUNS ; ULONG AsUlong[4] ; UCHAR AsByte[16] ; } CDB , * PCDB ; #line 889 typedef struct _NOTIFICATION_EVENT_STATUS_HEADER { UCHAR EventDataLength[2] ; UCHAR NotificationClass : 3; UCHAR Reserved : 4; UCHAR NEA : 1; UCHAR SupportedEventClasses ; UCHAR ClassEventData[0] ; } NOTIFICATION_EVENT_STATUS_HEADER , * PNOTIFICATION_EVENT_STATUS_HEADER ; #line 913 typedef struct _NOTIFICATION_POWER_STATUS { UCHAR PowerEvent : 4; UCHAR Reserved : 4; UCHAR PowerStatus ; UCHAR Reserved2[2] ; } NOTIFICATION_POWER_STATUS , * PNOTIFICATION_POWER_STATUS ; #line 926 typedef struct _NOTIFICATION_MEDIA_STATUS { UCHAR MediaStatus : 4; UCHAR Reserved : 4; UCHAR PowerStatus ; UCHAR StartSlot ; UCHAR EndSlot ; } NOTIFICATION_MEDIA_STATUS , * PNOTIFICATION_MEDIA_STATUS ; #line 944 typedef struct _NOTIFICATION_BUSY_STATUS { UCHAR DeviceBusyEvent : 4; UCHAR Reserved : 4; UCHAR DeviceBusyStatus ; UCHAR Time[2] ; } NOTIFICATION_BUSY_STATUS , * PNOTIFICATION_BUSY_STATUS ; #line 962 typedef struct _READ_DVD_STRUCTURES_HEADER { UCHAR Length[2] ; UCHAR Reserved[2] ; UCHAR Data[0] ; } READ_DVD_STRUCTURES_HEADER , * PREAD_DVD_STRUCTURES_HEADER ; #line 1022 typedef struct _CDVD_KEY_HEADER { UCHAR DataLength[2] ; UCHAR Reserved[2] ; UCHAR Data[0] ; } CDVD_KEY_HEADER , * PCDVD_KEY_HEADER ; typedef struct _CDVD_REPORT_AGID_DATA { UCHAR Reserved1[3] ; UCHAR Reserved2 : 6; UCHAR AGID : 2; } CDVD_REPORT_AGID_DATA , * PCDVD_REPORT_AGID_DATA ; typedef struct _CDVD_CHALLENGE_KEY_DATA { UCHAR ChallengeKeyValue[10] ; UCHAR Reserved[2] ; } CDVD_CHALLENGE_KEY_DATA , * PCDVD_CHALLENGE_KEY_DATA ; typedef struct _CDVD_KEY_DATA { UCHAR Key[5] ; UCHAR Reserved[3] ; } CDVD_KEY_DATA , * PCDVD_KEY_DATA ; typedef struct _CDVD_REPORT_ASF_DATA { UCHAR Reserved1[3] ; UCHAR Success : 1; UCHAR Reserved2 : 7; } CDVD_REPORT_ASF_DATA , * PCDVD_REPORT_ASF_DATA ; typedef struct _CDVD_TITLE_KEY_HEADER { UCHAR DataLength[2] ; UCHAR Reserved1[1] ; UCHAR Reserved2 : 3; UCHAR CGMS : 2; UCHAR CP_SEC : 1; UCHAR CPM : 1; UCHAR Zero : 1; CDVD_KEY_DATA TitleKey ; } CDVD_TITLE_KEY_HEADER , * PCDVD_TITLE_KEY_HEADER ; #line 1065 typedef struct _FORMATTED_CAPACITY_DESCRIPTOR { UCHAR NumberOfBlocks[4] ; UCHAR Maximum : 1; UCHAR Valid : 1; UCHAR BlockLength[3] ; } FORMATTED_CAPACITY_DESCRIPTOR , * PFORMATTED_CAPACITY_DESCRIPTOR ; typedef struct _FORMATTED_CAPACITY_LIST { UCHAR Reserved[3] ; UCHAR CapacityListLength ; FORMATTED_CAPACITY_DESCRIPTOR Descriptors[0] ; } FORMATTED_CAPACITY_LIST , * PFORMATTED_CAPACITY_LIST ; #line 1106 typedef struct _OPC_TABLE_ENTRY { UCHAR Speed[2] ; UCHAR OPCValue[6] ; } OPC_TABLE_ENTRY , * POPC_TABLE_ENTRY ; typedef struct _DISK_INFORMATION { UCHAR Length[2] ; UCHAR DiskStatus : 2; UCHAR LastSessionStatus : 2; UCHAR Erasable : 1; UCHAR Reserved1 : 3; UCHAR FirstTrackNumber ; UCHAR NumberOfSessions ; UCHAR LastSessionFirstTrack ; UCHAR LastSessionLastTrack ; UCHAR Reserved2 : 5; UCHAR GEN : 1; UCHAR DBC_V : 1; UCHAR DID_V : 1; UCHAR DiskType ; UCHAR Reserved3[3] ; UCHAR DiskIdentification[4] ; UCHAR LastSessionLeadIn[4] ; UCHAR LastPossibleStartTime[4] ; UCHAR DiskBarCode[8] ; UCHAR Reserved4 ; UCHAR NumberOPCEntries ; OPC_TABLE_ENTRY OPCTable[0] ; } DISK_INFORMATION , * PDISK_INFORMATION ; #line 1146 typedef struct _DATA_BLOCK_HEADER { UCHAR DataMode ; UCHAR Reserved[4] ; union { UCHAR LogicalBlockAddress[4] ; struct { UCHAR Reserved ; UCHAR M ; UCHAR S ; UCHAR F ; } MSF ; } ; } DATA_BLOCK_HEADER , * PDATA_BLOCK_HEADER ; #line 1174 typedef struct _TRACK_INFORMATION { UCHAR Length[2] ; UCHAR TrackNumber ; UCHAR SessionNumber ; UCHAR Reserved1 ; UCHAR TrackMode : 4; UCHAR Copy : 1; UCHAR Damage : 1; UCHAR Reserved2 : 2; UCHAR DataMode : 4; UCHAR FP : 1; UCHAR Packet : 1; UCHAR Blank : 1; UCHAR RT : 1; UCHAR NWA_V : 1; UCHAR Reserved3 : 7; UCHAR TrackStartAddress[4] ; UCHAR NextWritableAddress[4] ; UCHAR FreeBlocks[4] ; UCHAR FixedPacketSize[4] ; } TRACK_INFORMATION , * PTRACK_INFORMATION ; #line 1418 #pragma pack(1) #line 1419 typedef struct _SCSI_EXTENDED_MESSAGE { UCHAR InitialMessageCode ; UCHAR MessageLength ; UCHAR MessageType ; union _EXTENDED_ARGUMENTS { struct { UCHAR Modifier[4] ; } Modify ; struct { UCHAR TransferPeriod ; UCHAR ReqAckOffset ; } Synchronous ; struct { UCHAR Width ; } Wide ; } ExtendedArguments ; } SCSI_EXTENDED_MESSAGE , * PSCSI_EXTENDED_MESSAGE ; #line 1439 #pragma pack() #line 1488 typedef struct _INQUIRYDATA { UCHAR DeviceType : 5; UCHAR DeviceTypeQualifier : 3; UCHAR DeviceTypeModifier : 7; UCHAR RemovableMedia : 1; UCHAR Versions ; UCHAR ResponseDataFormat : 4; UCHAR HiSupport : 1; UCHAR NormACA : 1; UCHAR ReservedBit : 1; UCHAR AERC : 1; UCHAR AdditionalLength ; UCHAR Reserved[2] ; UCHAR SoftReset : 1; UCHAR CommandQueue : 1; UCHAR Reserved2 : 1; UCHAR LinkedCommands : 1; UCHAR Synchronous : 1; UCHAR Wide16Bit : 1; UCHAR Wide32Bit : 1; UCHAR RelativeAddressing : 1; UCHAR VendorId[8] ; UCHAR ProductId[16] ; UCHAR ProductRevisionLevel[4] ; UCHAR VendorSpecific[20] ; UCHAR Reserved3[40] ; } INQUIRYDATA , * PINQUIRYDATA ; #line 1549 typedef struct _SENSE_DATA { UCHAR ErrorCode : 7; UCHAR Valid : 1; UCHAR SegmentNumber ; UCHAR SenseKey : 4; UCHAR Reserved : 1; UCHAR IncorrectLength : 1; UCHAR EndOfMedia : 1; UCHAR FileMark : 1; UCHAR Information[4] ; UCHAR AdditionalSenseLength ; UCHAR CommandSpecificInformation[4] ; UCHAR AdditionalSenseCode ; UCHAR AdditionalSenseCodeQualifier ; UCHAR FieldReplaceableUnitCode ; UCHAR SenseKeySpecific[3] ; } SENSE_DATA , * PSENSE_DATA ; #line 1732 typedef struct _READ_CAPACITY_DATA { ULONG LogicalBlockAddress ; ULONG BytesPerBlock ; } READ_CAPACITY_DATA , * PREAD_CAPACITY_DATA ; #line 1743 typedef struct _READ_BLOCK_LIMITS { UCHAR Reserved ; UCHAR BlockMaximumSize[3] ; UCHAR BlockMinimumSize[2] ; } READ_BLOCK_LIMITS_DATA , * PREAD_BLOCK_LIMITS_DATA ; #line 1758 typedef struct _MODE_PARAMETER_HEADER { UCHAR ModeDataLength ; UCHAR MediumType ; UCHAR DeviceSpecificParameter ; UCHAR BlockDescriptorLength ; } MODE_PARAMETER_HEADER , * PMODE_PARAMETER_HEADER ; typedef struct _MODE_PARAMETER_HEADER10 { UCHAR ModeDataLength[2] ; UCHAR MediumType ; UCHAR DeviceSpecificParameter ; UCHAR Reserved[2] ; UCHAR BlockDescriptorLength[2] ; } MODE_PARAMETER_HEADER10 , * PMODE_PARAMETER_HEADER10 ; #line 1783 typedef struct _MODE_PARAMETER_BLOCK { UCHAR DensityCode ; UCHAR NumberOfBlocks[3] ; UCHAR Reserved ; UCHAR BlockLength[3] ; } MODE_PARAMETER_BLOCK , * PMODE_PARAMETER_BLOCK ; #line 1794 typedef struct _MODE_DISCONNECT_PAGE { UCHAR PageCode : 6; UCHAR Reserved : 1; UCHAR PageSavable : 1; UCHAR PageLength ; UCHAR BufferFullRatio ; UCHAR BufferEmptyRatio ; UCHAR BusInactivityLimit[2] ; UCHAR BusDisconnectTime[2] ; UCHAR BusConnectTime[2] ; UCHAR MaximumBurstSize[2] ; UCHAR DataTransferDisconnect : 2; UCHAR Reserved2[3] ; } MODE_DISCONNECT_PAGE , * PMODE_DISCONNECT_PAGE ; #line 1813 typedef struct _MODE_CACHING_PAGE { UCHAR PageCode : 6; UCHAR Reserved : 1; UCHAR PageSavable : 1; UCHAR PageLength ; UCHAR ReadDisableCache : 1; UCHAR MultiplicationFactor : 1; UCHAR WriteCacheEnable : 1; UCHAR Reserved2 : 5; UCHAR WriteRetensionPriority : 4; UCHAR ReadRetensionPriority : 4; UCHAR DisablePrefetchTransfer[2] ; UCHAR MinimumPrefetch[2] ; UCHAR MaximumPrefetch[2] ; UCHAR MaximumPrefetchCeiling[2] ; } MODE_CACHING_PAGE , * PMODE_CACHING_PAGE ; #line 1834 typedef struct _MODE_FLEXIBLE_DISK_PAGE { UCHAR PageCode : 6; UCHAR Reserved : 1; UCHAR PageSavable : 1; UCHAR PageLength ; UCHAR TransferRate[2] ; UCHAR NumberOfHeads ; UCHAR SectorsPerTrack ; UCHAR BytesPerSector[2] ; UCHAR NumberOfCylinders[2] ; UCHAR StartWritePrecom[2] ; UCHAR StartReducedCurrent[2] ; UCHAR StepRate[2] ; UCHAR StepPluseWidth ; UCHAR HeadSettleDelay[2] ; UCHAR MotorOnDelay ; UCHAR MotorOffDelay ; UCHAR Reserved2 : 5; UCHAR MotorOnAsserted : 1; UCHAR StartSectorNumber : 1; UCHAR TrueReadySignal : 1; UCHAR StepPlusePerCyclynder : 4; UCHAR Reserved3 : 4; UCHAR WriteCompenstation ; UCHAR HeadLoadDelay ; UCHAR HeadUnloadDelay ; UCHAR Pin2Usage : 4; UCHAR Pin34Usage : 4; UCHAR Pin1Usage : 4; UCHAR Pin4Usage : 4; UCHAR MediumRotationRate[2] ; UCHAR Reserved4[2] ; } MODE_FLEXIBLE_DISK_PAGE , * PMODE_FLEXIBLE_DISK_PAGE ; #line 1872 typedef struct _MODE_FORMAT_PAGE { UCHAR PageCode : 6; UCHAR Reserved : 1; UCHAR PageSavable : 1; UCHAR PageLength ; UCHAR TracksPerZone[2] ; UCHAR AlternateSectorsPerZone[2] ; UCHAR AlternateTracksPerZone[2] ; UCHAR AlternateTracksPerLogicalUnit[2] ; UCHAR SectorsPerTrack[2] ; UCHAR BytesPerPhysicalSector[2] ; UCHAR Interleave[2] ; UCHAR TrackSkewFactor[2] ; UCHAR CylinderSkewFactor[2] ; UCHAR Reserved2 : 4; UCHAR SurfaceFirst : 1; UCHAR RemovableMedia : 1; UCHAR HardSectorFormating : 1; UCHAR SoftSectorFormating : 1; UCHAR Reserved3[3] ; } MODE_FORMAT_PAGE , * PMODE_FORMAT_PAGE ; #line 1898 typedef struct _MODE_RIGID_GEOMETRY_PAGE { UCHAR PageCode : 6; UCHAR Reserved : 1; UCHAR PageSavable : 1; UCHAR PageLength ; UCHAR NumberOfCylinders[3] ; UCHAR NumberOfHeads ; UCHAR StartWritePrecom[3] ; UCHAR StartReducedCurrent[3] ; UCHAR DriveStepRate[2] ; UCHAR LandZoneCyclinder[3] ; UCHAR RotationalPositionLock : 2; UCHAR Reserved2 : 6; UCHAR RotationOffset ; UCHAR Reserved3 ; UCHAR RoataionRate[2] ; UCHAR Reserved4[2] ; } MODE_RIGID_GEOMETRY_PAGE , * PMODE_RIGID_GEOMETRY_PAGE ; #line 1921 typedef struct _MODE_READ_WRITE_RECOVERY_PAGE { UCHAR PageCode : 6; UCHAR Reserved1 : 1; UCHAR PSBit : 1; UCHAR PageLength ; UCHAR DCRBit : 1; UCHAR DTEBit : 1; UCHAR PERBit : 1; UCHAR EERBit : 1; UCHAR RCBit : 1; UCHAR TBBit : 1; UCHAR ARRE : 1; UCHAR AWRE : 1; UCHAR ReadRetryCount ; UCHAR Reserved4[4] ; UCHAR WriteRetryCount ; UCHAR Reserved5[3] ; } MODE_READ_WRITE_RECOVERY_PAGE , * PMODE_READ_WRITE_RECOVERY_PAGE ; #line 1946 typedef struct _MODE_READ_RECOVERY_PAGE { UCHAR PageCode : 6; UCHAR Reserved1 : 1; UCHAR PSBit : 1; UCHAR PageLength ; UCHAR DCRBit : 1; UCHAR DTEBit : 1; UCHAR PERBit : 1; UCHAR Reserved2 : 1; UCHAR RCBit : 1; UCHAR TBBit : 1; UCHAR Reserved3 : 2; UCHAR ReadRetryCount ; UCHAR Reserved4[4] ; } MODE_READ_RECOVERY_PAGE , * PMODE_READ_RECOVERY_PAGE ; #line 1969 typedef struct _MODE_INFO_EXCEPTIONS { UCHAR PageCode : 6; UCHAR Reserved1 : 1; UCHAR PSBit : 1; UCHAR PageLength ; UCHAR LogErr : 1; UCHAR Reserved2 : 1; UCHAR Test : 1; UCHAR Dexcpt : 1; UCHAR Reserved3 : 3; UCHAR Perf : 1; UCHAR ReportMethod : 4; UCHAR Reserved4 : 4; UCHAR IntervalTimer[4] ; UCHAR ReportCount[4] ; } MODE_INFO_EXCEPTIONS , * PMODE_INFO_EXCEPTIONS ; #line 2000 typedef struct _POWER_CONDITION_PAGE { UCHAR PageCode : 6; UCHAR Reserved : 1; UCHAR PSBit : 1; UCHAR PageLength ; UCHAR Reserved2 ; UCHAR Standby : 1; UCHAR Idle : 1; UCHAR Reserved3 : 6; UCHAR IdleTimer[4] ; UCHAR StandbyTimer[4] ; } POWER_CONDITION_PAGE , * PPOWER_CONDITION_PAGE ; #line 2019 typedef struct _CDDA_OUTPUT_PORT { UCHAR ChannelSelection : 4; UCHAR Reserved : 4; UCHAR Volume ; } CDDA_OUTPUT_PORT , * PCDDA_OUTPUT_PORT ; #line 2026 typedef struct _CDAUDIO_CONTROL_PAGE { UCHAR PageCode : 6; UCHAR Reserved : 1; UCHAR PSBit : 1; UCHAR PageLength ; UCHAR Reserved2 : 1; UCHAR StopOnTrackCrossing : 1; UCHAR Immediate : 1; UCHAR Reserved3 : 5; UCHAR Reserved4[3] ; UCHAR Obsolete[2] ; CDDA_OUTPUT_PORT CDDAOutputPorts[4] ; } CDAUDIO_CONTROL_PAGE , * PCDAUDIO_CONTROL_PAGE ; #line 2055 typedef struct _CDVD_FEATURE_SET_PAGE { UCHAR PageCode : 6; UCHAR Reserved : 1; UCHAR PSBit : 1; UCHAR PageLength ; UCHAR CDAudio[2] ; UCHAR EmbeddedChanger[2] ; UCHAR PacketSMART[2] ; UCHAR PersistantPrevent[2] ; UCHAR EventStatusNotification[2] ; UCHAR DigitalOutput[2] ; UCHAR CDSequentialRecordable[2] ; UCHAR DVDSequentialRecordable[2] ; UCHAR RandomRecordable[2] ; UCHAR KeyExchange[2] ; UCHAR Reserved2[2] ; } CDVD_FEATURE_SET_PAGE , * PCDVD_FEATURE_SET_PAGE ; #line 2079 typedef struct _CDVD_INACTIVITY_TIMEOUT_PAGE { UCHAR PageCode : 6; UCHAR Reserved : 1; UCHAR PSBit : 1; UCHAR PageLength ; UCHAR Reserved2[2] ; UCHAR SWPP : 1; UCHAR DISP : 1; UCHAR Reserved3 : 6; UCHAR Reserved4 ; UCHAR GroupOneMinimumTimeout[2] ; UCHAR GroupTwoMinimumTimeout[2] ; } CDVD_INACTIVITY_TIMEOUT_PAGE , * PCDVD_INACTIVITY_TIMEOUT_PAGE ; #line 2110 typedef struct _CDVD_CAPABILITIES_PAGE { UCHAR PageCode : 6; UCHAR Reserved : 1; UCHAR PSBit : 1; UCHAR PageLength ; UCHAR CDRRead : 1; UCHAR CDERead : 1; UCHAR Method2 : 1; UCHAR DVDROMRead : 1; UCHAR DVDRRead : 1; UCHAR DVDRAMRead : 1; UCHAR Reserved2 : 2; UCHAR CDRWrite : 1; UCHAR CDEWrite : 1; UCHAR TestWrite : 1; UCHAR Reserved3 : 1; UCHAR DVDRWrite : 1; UCHAR DVDRAMWrite : 1; UCHAR Reserved4 : 2; UCHAR AudioPlay : 1; UCHAR Composite : 1; UCHAR DigitalPortOne : 1; UCHAR DigitalPortTwo : 1; UCHAR Mode2Form1 : 1; UCHAR Mode2Form2 : 1; UCHAR MultiSession : 1; UCHAR Reserved5 : 1; UCHAR CDDA : 1; UCHAR CDDAAccurate : 1; UCHAR RWSupported : 1; UCHAR RWDeinterleaved : 1; UCHAR C2Pointers : 1; UCHAR ISRC : 1; UCHAR UPC : 1; UCHAR ReadBarCodeCapable : 1; UCHAR Lock : 1; UCHAR LockState : 1; UCHAR PreventJumper : 1; UCHAR Eject : 1; UCHAR Reserved6 : 1; UCHAR LoadingMechanismType : 3; UCHAR SeparateVolume : 1; UCHAR SeperateChannelMute : 1; UCHAR SupportsDiskPresent : 1; UCHAR SWSlotSelection : 1; UCHAR SideChangeCapable : 1; UCHAR RWInLeadInReadable : 1; UCHAR Reserved7 : 2; UCHAR ObsoleteReserved[2] ; UCHAR NumberVolumeLevels[2] ; UCHAR BufferSize[2] ; UCHAR ObsoleteReserved2[2] ; UCHAR ObsoleteReserved3 ; UCHAR Reserved8 : 1; UCHAR BCK : 1; UCHAR RCK : 1; UCHAR LSBF : 1; UCHAR Length : 2; UCHAR Reserved9 : 2; UCHAR ObsoleteReserved4[2] ; UCHAR CopyManagementRevision[2] ; UCHAR Reserved10[2] ; } CDVD_CAPABILITIES_PAGE , * PCDVD_CAPABILITIES_PAGE ; #line 2185 typedef struct _LUN_LIST { UCHAR LunListLength[4] ; UCHAR Reserved[4] ; UCHAR Lun[0][8] ; } LUN_LIST , * PLUN_LIST ; #line 2211 typedef struct _MODE_PARM_READ_WRITE { MODE_PARAMETER_HEADER ParameterListHeader ; MODE_PARAMETER_BLOCK ParameterListBlock ; } MODE_PARM_READ_WRITE_DATA , * PMODE_PARM_READ_WRITE_DATA ; #line 2242 typedef struct _PORT_OUTPUT { UCHAR ChannelSelection ; UCHAR Volume ; } PORT_OUTPUT , * PPORT_OUTPUT ; typedef struct _AUDIO_OUTPUT { UCHAR CodePage ; UCHAR ParameterLength ; UCHAR Immediate ; UCHAR Reserved[2] ; UCHAR LbaFormat ; UCHAR LogicalBlocksPerSecond[2] ; PORT_OUTPUT PortOutput[4] ; } AUDIO_OUTPUT , * PAUDIO_OUTPUT ; #line 2268 typedef struct _MECHANICAL_STATUS_INFORMATION_HEADER { UCHAR CurrentSlot : 5; UCHAR ChangerState : 2; UCHAR Fault : 1; UCHAR Reserved : 5; UCHAR MechanismState : 3; UCHAR CurrentLogicalBlockAddress[3] ; UCHAR NumberAvailableSlots ; UCHAR SlotTableLength[2] ; } MECHANICAL_STATUS_INFORMATION_HEADER , * PMECHANICAL_STATUS_INFORMATION_HEADER ; #line 2279 typedef struct _SLOT_TABLE_INFORMATION { UCHAR DiscChanged : 1; UCHAR Reserved : 6; UCHAR DiscPresent : 1; UCHAR Reserved2[3] ; } SLOT_TABLE_INFORMATION , * PSLOT_TABLE_INFORMATION ; typedef struct _MECHANICAL_STATUS { MECHANICAL_STATUS_INFORMATION_HEADER MechanicalStatusHeader ; SLOT_TABLE_INFORMATION SlotTableInfo[1] ; } MECHANICAL_STATUS , * PMECHANICAL_STATUS ; #line 2298 typedef struct _TAPE_POSITION_DATA { UCHAR Reserved1 : 2; UCHAR BlockPositionUnsupported : 1; UCHAR Reserved2 : 3; UCHAR EndOfPartition : 1; UCHAR BeginningOfPartition : 1; UCHAR PartitionNumber ; USHORT Reserved3 ; UCHAR FirstBlock[4] ; UCHAR LastBlock[4] ; UCHAR Reserved4 ; UCHAR NumberOfBlocks[3] ; UCHAR NumberOfBytes[4] ; } TAPE_POSITION_DATA , * PTAPE_POSITION_DATA ; #line 2318 typedef union _FOUR_BYTE { struct { UCHAR Byte0 ; UCHAR Byte1 ; UCHAR Byte2 ; UCHAR Byte3 ; } ; ULONG AsULong ; } FOUR_BYTE , * PFOUR_BYTE ; #line 2330 typedef union _TWO_BYTE { struct { UCHAR Byte0 ; UCHAR Byte1 ; } ; USHORT AsUShort ; } TWO_BYTE , * PTWO_BYTE ; #line 59 "cdaudio.h" typedef struct _CD_DEVICE_EXTENSION { PDEVICE_OBJECT TargetDeviceObject ; PDEVICE_OBJECT TargetPdo ; PDEVICE_OBJECT DeviceObject ; ULONG PagingPathCount ; KEVENT PagingPathCountEvent ; PRKDPC Dpc ; PKTIMER Timer ; LONG Sync ; UCHAR Active ; UCHAR Paused ; UCHAR PausedM ; UCHAR PausedS ; UCHAR PausedF ; UCHAR LastEndM ; UCHAR LastEndS ; UCHAR LastEndF ; BOOLEAN PlayActive ; } CD_DEVICE_EXTENSION , * PCD_DEVICE_EXTENSION ; #line 210 typedef union _NEC_CDB { struct _NEC_READ_TOC { UCHAR OperationCode ; UCHAR Type : 2; UCHAR Reserved1 : 6; UCHAR TrackNumber ; UCHAR Reserved2[6] ; UCHAR Control ; } NEC_READ_TOC , * PNEC_READ_TOC ; struct _NEC_PLAY_AUDIO { UCHAR OperationCode ; UCHAR PlayMode : 3; UCHAR Reserved1 : 5; UCHAR Minute ; UCHAR Second ; UCHAR Frame ; UCHAR Reserved2[4] ; UCHAR Control ; } NEC_PLAY_AUDIO , * PNEC_PLAY_AUDIO ; struct _NEC_SEEK_AUDIO { UCHAR OperationCode ; UCHAR Play : 1; UCHAR Reserved1 : 7; UCHAR Minute ; UCHAR Second ; UCHAR Frame ; UCHAR Reserved2[4] ; UCHAR Control ; } NEC_SEEK_AUDIO , * PNEC_SEEK_AUDIO ; struct _NEC_PAUSE_AUDIO { UCHAR OperationCode ; UCHAR Reserved1[8] ; UCHAR Control ; } NEC_PAUSE_AUDIO , * PNEC_PAUSE_AUDIO ; struct _NEC_READ_Q_CHANNEL { UCHAR OperationCode ; UCHAR TransferSize : 5; UCHAR Reserved1 : 3; UCHAR Reserved2[7] ; UCHAR Control ; } NEC_READ_Q_CHANNEL , * PNEC_READ_Q_CHANNEL ; struct _NEC_EJECT { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR Reserved1 : 7; UCHAR Reserved2[7] ; UCHAR Control ; } NEC_EJECT , * PNEC_EJECT ; } NEC_CDB , * PNEC_CDB ; #line 322 typedef struct _PIONEER_DRIVE_STATUS_BUFFER { UCHAR PageCode : 6; UCHAR Reserved : 2; UCHAR PageLengthMsb ; UCHAR PageLengthLsb ; UCHAR DriveStatusLsb ; UCHAR DriveStatusMsb ; } PIONEER_DRIVE_STATUS_BUFFER , * PPIONEER_DRIVE_STATUS_BUFFER ; #line 337 typedef union _PIONEER_CDB { struct _PNR_START_STOP { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR Reserved1 : 4; UCHAR Lun : 3; UCHAR Reserved2 : 7; UCHAR PCF : 1; UCHAR Reserved3 ; UCHAR Start : 1; UCHAR Eject : 1; UCHAR Reserved4 : 6; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved5 : 4; UCHAR Vendor : 2; } PNR_START_STOP , * PPNR_START_STOP ; struct _PNR_READ_TOC { UCHAR OperationCode ; UCHAR Reserved1 : 5; UCHAR Lun : 3; UCHAR Reserved2[3] ; UCHAR TrackNumber ; UCHAR Reserved3 ; UCHAR AssignedLength[2] ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved4 : 4; UCHAR Type : 2; } PNR_READ_TOC , * PPNR_READ_TOC ; struct _PNR_PLAY_AUDIO { UCHAR OperationCode ; UCHAR PlayMode : 4; UCHAR StopAddr : 1; UCHAR Lun : 3; UCHAR Reserved1 ; UCHAR Minute ; UCHAR Second ; UCHAR Frame ; UCHAR Reserved2[3] ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved3 : 4; UCHAR Type : 2; } PNR_PLAY_AUDIO , * PPNR_PLAY_AUDIO ; struct _PNR_SEEK_AUDIO { UCHAR OperationCode ; UCHAR PlayMode : 4; UCHAR PlayBack : 1; UCHAR Lun : 3; UCHAR Reserved1 ; UCHAR Minute ; UCHAR Second ; UCHAR Frame ; UCHAR Reserved2[3] ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved3 : 4; UCHAR Type : 2; } PNR_SEEK_AUDIO , * PPNR_SEEK_AUDIO ; struct _PNR_PAUSE_AUDIO { UCHAR OperationCode ; UCHAR Reserved1 : 4; UCHAR Pause : 1; UCHAR Lun : 3; UCHAR Reserved2[7] ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved3 : 4; UCHAR Reserved4 : 2; } PNR_PAUSE_AUDIO , * PPNR_PAUSE_AUDIO ; struct _PNR_AUDIO_STATUS { UCHAR OperationCode ; UCHAR Reserved1 : 4; UCHAR Reserved2 : 1; UCHAR Lun : 3; UCHAR Reserved3[6] ; UCHAR AssignedLength ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved4 : 4; UCHAR Reserved5 : 2; } PNR_AUDIO_STATUS , * PPNR_AUDIO_STATUS ; struct _PNR_READ_Q_CHANNEL { UCHAR OperationCode ; UCHAR Reserved1 : 4; UCHAR Reserved2 : 1; UCHAR Lun : 3; UCHAR Reserved3[6] ; UCHAR AssignedLength ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved4 : 4; UCHAR Reserved5 : 2; } PNR_READ_Q_CHANNEL , * PPNR_READ_Q_CHANNEL ; struct _PNR_EJECT { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR Reserved1 : 4; UCHAR Lun : 3; UCHAR Reserved2[7] ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved4 : 4; UCHAR Reserved5 : 2; } PNR_EJECT , * PPNR_EJECT ; struct _PNR_READ_STATUS { UCHAR OperationCode ; UCHAR Reserved1 : 4; UCHAR Lun : 3; UCHAR PageCode : 5; UCHAR PCField : 1; UCHAR Reserved2[5] ; UCHAR AllocationLengthMsb ; UCHAR AllocationLengthLsb ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved3 : 4; UCHAR Reserved4 : 2; } PNR_READ_STATUS , * PPNR_READ_STATUS ; } PNR_CDB , * PPNR_CDB ; #line 528 typedef union _HITACHICDB { struct _READ_DISC_INFO { UCHAR OperationCode ; UCHAR Reserved : 5; UCHAR LogicalUnitNumber : 3; UCHAR Reserved1[7] ; UCHAR AllocationLength[2] ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved2 : 4; UCHAR VendorUniqueBits : 2; } READ_DISC_INFO , * PREAD_DISC_INFO ; struct { UCHAR OperationCode ; UCHAR Immediate : 1; UCHAR Right : 1; UCHAR Left : 1; UCHAR Reserved : 2; UCHAR Lun : 3; UCHAR StartingM ; UCHAR StartingS ; UCHAR StartingF ; UCHAR Reserved1[2] ; UCHAR EndingM ; UCHAR EndingS ; UCHAR EndingF ; UCHAR Reserved2 ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved3 : 4; UCHAR VendorUniqueBits : 2; } PLAY_AUDIO , * PPLAY_AUDIO ; struct _PAUSE { UCHAR OperationCode ; UCHAR Reserved : 5; UCHAR Lun : 3; UCHAR Reserved1[9] ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved2 : 4; UCHAR VendorUnqiueBits : 2; } PAUSE_AUDIO , * PPAUSE_AUDIO ; struct _EJECT { UCHAR OperationCode ; UCHAR Reserved : 5; UCHAR Lun : 3; UCHAR Reserved1[8] ; UCHAR Eject : 1; UCHAR Mode : 1; UCHAR Reserved2 : 6; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved3 : 4; UCHAR VendorUnqiueBits : 2; } EJECT , * PEJECT ; struct _AUDIO_STATUS { UCHAR OperationCode ; UCHAR Reserved : 5; UCHAR Lun : 3; UCHAR Reserved1[9] ; UCHAR Link : 1; UCHAR Flag : 1; UCHAR Reserved2 : 4; UCHAR VendorUnqiueBits : 2; } AUDIO_STATUS , * PAUDIO_STATUS ; struct _STOP_PLAY { UCHAR OperationCode ; UCHAR Reserved[11] ; } STOP_PLAY , * PSTOP_PLAY ; } HITACHICDB , * PHITACHICDB ; #line 45 "cdaudio.c" int __BLAST_NONDET ; void errorFn() { #line 48 ERROR: #line 48 ; } #line 52 int s ; int UNLOADED , NP , DC , SKIP1 , SKIP2 , MPR1 , MPR3 , IPC ; int pended ; PIO_COMPLETION_ROUTINE compFptr ; int compRegistered ; int lowerDriverReturn ; int setEventCalled ; int customIrp ; int routine ; #line 62 int myStatus ; void _BLAST_init() { #line 65 UNLOADED = 0; NP = 1; DC = 2; SKIP1 = 3; SKIP2 = 4; MPR1 = 5; MPR3 = 6; IPC = 7; #line 75 s = UNLOADED; pended = 0; compFptr = 0; compRegistered = 0; lowerDriverReturn = 0; setEventCalled = 0; customIrp = 0; } #line 89 NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject , PUNICODE_STRING RegistryPath ) ; #line 95 NTSTATUS CdAudioCreate(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 101 NTSTATUS CdAudioReadWrite(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 107 NTSTATUS CdAudioDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 113 NTSTATUS CdAudioSendToNextDriver(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 119 BOOLEAN CdAudioIsPlayActive(PDEVICE_OBJECT DeviceObject ) ; #line 124 BOOLEAN NecSupportNeeded(PUCHAR InquiryData ) ; #line 129 NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 135 NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 141 NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 147 NTSTATUS CdAudioHitachiSendPauseCommand(PDEVICE_OBJECT DeviceObject ) ; #line 152 NTSTATUS CdAudioHitachiDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 158 NTSTATUS CdAudio535DeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 165 NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 172 NTSTATUS CdAudioPan533DeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 178 NTSTATUS CdAudioAtapiDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 184 NTSTATUS CdAudioLionOpticsDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 190 NTSTATUS CdAudioHPCdrDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 196 void HpCdrProcessLastSession(PCDROM_TOC Toc ) ; #line 201 NTSTATUS HPCdrCompletion(PDEVICE_OBJECT DeviceObject , PIRP Irp , PVOID Context ) ; #line 208 NTSTATUS CdAudioPower(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 214 NTSTATUS CdAudioForwardIrpSynchronous(PDEVICE_OBJECT DeviceObject , PIRP Irp ) ; #line 220 void CdAudioUnload(PDRIVER_OBJECT DriverObject ) ; #line 231 #pragma alloc_text(INIT, DriverEntry) #line 232 #pragma alloc_text(PAGECDNC, CdAudioNECDeviceControl) #line 233 #pragma alloc_text(PAGECDOT, CdAudioHitachiSendPauseCommand) #line 234 #pragma alloc_text(PAGECDOT, CdAudioHitachiDeviceControl) #line 235 #pragma alloc_text(PAGECDOT, CdAudioDenonDeviceControl) #line 236 #pragma alloc_text(PAGECDNC, CdAudio435DeviceControl) #line 237 #pragma alloc_text(PAGECDNC, CdAudio535DeviceControl) #line 238 #pragma alloc_text(PAGECDOT, CdAudioPioneerDeviceControl) #line 239 #pragma alloc_text(PAGECDNC, CdAudioPan533DeviceControl) #line 240 #pragma alloc_text(PAGECDOT, CdAudioAtapiDeviceControl) #line 241 #pragma alloc_text(PAGECDOT, CdAudioLionOpticsDeviceControl) #line 242 #pragma alloc_text(PAGECDOT, CdAudioHPCdrDeviceControl) #line 243 #pragma alloc_text(PAGECDOT, HpCdrProcessLastSession) #line 244 #pragma alloc_text(PAGECDOT, HPCdrCompletion) #line 247 NTSTATUS SendSrbSynchronous(PCD_DEVICE_EXTENSION Extension , PSCSI_PASS_THROUGH Srb , PVOID Buffer , ULONG BufferLength ) { #line 278 ULONG ioctl ; KEVENT event ; PIRP irp = (void * )0; IO_STATUS_BLOCK ioStatus ; NTSTATUS status; #line 284 Srb->Length = sizeof(SCSI_PASS_THROUGH ); Srb->SenseInfoLength = 0; Srb->SenseInfoOffset = 0; #line 288 if(Buffer) { #line 289 Srb->DataIn = 1; Srb->DataTransferLength = BufferLength; Srb->DataBufferOffset = (ULONG_PTR )Buffer; ioctl = 0x00000004 << 16 | (0x0001 | 0x0002) << 14 | 0x0405 << 2 | 0; } else { #line 294 Srb->DataIn = 0; Srb->DataTransferLength = 0; Srb->DataBufferOffset = 0; ioctl = 0x00000004 << 16 | (0x0001 | 0x0002) << 14 | 0x0401 << 2 | 0; } KeInitializeEvent(& event, NotificationEvent, 0); #line 302 /* irp = IoBuildDeviceIoControlRequest(ioctl, Extension->TargetDeviceObject, Srb, sizeof(SCSI_PASS_THROUGH ), Srb, sizeof(SCSI_PASS_THROUGH ), 0, & event, & ioStatus); */ #line 306 if(! irp) { #line 307 return (NTSTATUS )0xC000009AL; } #line 310 /*BLAST status= IofCallDriver(Extension->TargetDeviceObject, irp); */ #line 311 if(status== (NTSTATUS )0x00000103L) { #line 312 KeWaitForSingleObject(& event, Executive, KernelMode, 0, (void * )0); #line 313 status= ioStatus.Status; } #line 316 return status; } NTSTATUS CdAudioAddDevice(PDRIVER_OBJECT DriverObject , PDEVICE_OBJECT PhysicalDeviceObject ) { #line 346 NTSTATUS status; PDEVICE_OBJECT deviceObject ; PCD_DEVICE_EXTENSION extension ; ULONG regActive = 0xFF; { #line 356 HANDLE deviceParameterHandle ; RTL_QUERY_REGISTRY_TABLE queryTable[2] ; #line 363 status= IoOpenDeviceRegistryKey(PhysicalDeviceObject, 2, (0x00020000L | 0x0001 | 0x0008 | 0x0010) & ~ 0x00100000L, & deviceParameterHandle); #line 368 if(! ((NTSTATUS )status>= 0)) { #line 374 ; #line 376 ; #line 378 regActive = 0xFF; goto AddDeviceEndRegistry; } #line 386 memset(& queryTable, 0, sizeof(queryTable)); #line 392 queryTable->Flags = 0x00000020 | 0x00000004; #line 394 queryTable->Name = "M\0a\0p\0T\0y\0p\0e\0"; queryTable->EntryContext = & regActive; queryTable->DefaultType = 4; queryTable->DefaultData = (void * )0; queryTable->DefaultLength = 0; #line 404 status= RtlQueryRegistryValues(0x40000000, (PWSTR )deviceParameterHandle, queryTable, (void * )0, (void * )0); #line 414 if(! ((NTSTATUS )status>= 0)) { #line 423 ; regActive = 0xFF; } else { #line 426 if(regActive > 10) { #line 436 ; regActive = 0xFF; } else { #line 447 ; } } #line 455 ZwClose(deviceParameterHandle); } #line 459 AddDeviceEndRegistry: { #line 465 if(regActive > 10 && regActive != 0xFF) { #line 471 ; regActive = 0xFF; } } #line 479 ; #line 485 if(regActive == 0) { #line 489 ; return (NTSTATUS )0x00000000L; } #line 497 switch(regActive) { case 8: #line 499 ; MmLockPagableDataSection((PVOID )CdAudioNECDeviceControl); break; #line 503 case 9: #line 503 ; case 10: #line 504 ; MmLockPagableDataSection((PVOID )CdAudioPioneerDeviceControl); break; #line 508 case 4: #line 508 ; MmLockPagableDataSection((PVOID )CdAudioDenonDeviceControl); break; #line 512 case 6: #line 512 ; case 5: #line 513 ; MmLockPagableDataSection((PVOID )CdAudioHitachiDeviceControl); break; #line 517 case 2: #line 517 ; MmLockPagableDataSection((PVOID )CdAudio535DeviceControl); break; #line 521 case 3: #line 521 ; MmLockPagableDataSection((PVOID )CdAudio435DeviceControl); break; #line 525 case 1: #line 525 ; MmLockPagableDataSection((PVOID )CdAudioAtapiDeviceControl); break; #line 529 case 7: #line 529 ; MmLockPagableDataSection((PVOID )CdAudioHPCdrDeviceControl); break; #line 533 case 0xFF: #line 533 ; default : #line 534 ; break; } #line 542 status= IoCreateDevice(DriverObject, sizeof(CD_DEVICE_EXTENSION ), (void * )0, 0x00000002, 0, 0, & deviceObject); if(! ((NTSTATUS )status>= 0)) { #line 550 ; #line 554 return status; } #line 561 deviceObject->Flags |= 0x00000010; #line 563 if(deviceObject->Flags & 0x00004000) { #line 567 ; } else { #line 569 deviceObject->Flags |= 0x00002000; } #line 573 extension = deviceObject->DeviceExtension; memset(extension, 0, sizeof(CD_DEVICE_EXTENSION )); #line 580 extension->TargetDeviceObject = IoAttachDeviceToDeviceStack(deviceObject, PhysicalDeviceObject); #line 583 if(! extension->TargetDeviceObject) { #line 588 ; #line 592 IoDeleteDevice(deviceObject); return (NTSTATUS )0xC000000EL; } #line 596 KeInitializeEvent(& extension->PagingPathCountEvent, SynchronizationEvent, 1); #line 602 extension->Active = (UCHAR )regActive; extension->DeviceObject = deviceObject; extension->TargetPdo = PhysicalDeviceObject; #line 610 deviceObject->Flags &= ~ 0x00000080; #line 612 return (NTSTATUS )0x00000000L; } NTSTATUS CdAudioSignalCompletion(PDEVICE_OBJECT DeviceObject , PIRP Irp , PKEVENT Event ) { #line 646 KeSetEvent(Event, 0, 0); return (NTSTATUS )0xC0000016L; } NTSTATUS CdAudioStartDevice(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 675 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; NTSTATUS status ; KEVENT event ; #line 683 ; #line 685 status= CdAudioForwardIrpSynchronous(DeviceObject, Irp); if(! ((NTSTATUS )status>= 0)) { #line 691 return status; } #line 700 ; #line 706 deviceExtension->Paused = 0; deviceExtension->PausedM = 0; deviceExtension->PausedS = 0; deviceExtension->PausedF = 0; deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; #line 718 ; #line 720 ; #line 728 if(deviceExtension->Active == (UCHAR )0xFF) { SCSI_PASS_THROUGH srb ; PCDB cdb = (PCDB )srb.Cdb; PUCHAR inquiryDataPtr = (void * )0; UCHAR attempt = 0; #line 737 ; #line 743 inquiryDataPtr = (PUCHAR )ExAllocatePoolWithTag(NonPagedPoolCacheAligned, 36, ' AdC'); if(! inquiryDataPtr) { #line 749 ; deviceExtension->Active = 0; #line 752 return (NTSTATUS )0x00000000L; } #line 758 status= (NTSTATUS )0xC0000001L; #line 763 ; #line 768 while(! ((NTSTATUS )status>= 0) && attempt++ < 4) { #line 775 ; #line 781 memset(& srb, 0, sizeof(SCSI_PASS_THROUGH )); #line 787 memset(inquiryDataPtr, 0, 36); #line 793 (cdb->CDB6INQUIRY).OperationCode = 0x12; (cdb->CDB6INQUIRY).AllocationLength = 36; #line 801 srb.CdbLength = 6; srb.TimeOutValue = 10; #line 804 status= SendSrbSynchronous(deviceExtension, & srb, inquiryDataPtr, 36); #line 813 ; } #line 819 if(! ((NTSTATUS )status>= 0)) { ; ExFreePool(inquiryDataPtr); #line 832 deviceExtension->Active = 0; return (NTSTATUS )0x00000000L; } { #line 855 deviceExtension->Active = 0; #line 861 if(! memcmp(& inquiryDataPtr[8], "NEC ", 8)) { #line 862 if(NecSupportNeeded(inquiryDataPtr)) { #line 863 MmLockPagableDataSection((PVOID )CdAudioNECDeviceControl); #line 864 deviceExtension->Active = 8; } } #line 872 if(! memcmp(& inquiryDataPtr[8], "PIONEER ", 8) && ! memcmp(& inquiryDataPtr[16], "CD-ROM DRM-600", 15)) { #line 875 MmLockPagableDataSection((PVOID )CdAudioPioneerDeviceControl); #line 876 deviceExtension->Active = 9; } #line 883 if(inquiryDataPtr[8] == 'D' && inquiryDataPtr[9] == 'E' && inquiryDataPtr[10] == 'N' && inquiryDataPtr[16] == 'D' && inquiryDataPtr[17] == 'R' && inquiryDataPtr[18] == 'D' && inquiryDataPtr[20] == '2' && inquiryDataPtr[21] == '5' && inquiryDataPtr[22] == 'X') { #line 892 MmLockPagableDataSection((PVOID )CdAudioDenonDeviceControl); #line 893 deviceExtension->Active = 4; } #line 896 if(! memcmp(& inquiryDataPtr[8], "CHINON", 6)) { #line 902 if(inquiryDataPtr[27] == '5' && inquiryDataPtr[28] == '3' && inquiryDataPtr[29] == '5' && inquiryDataPtr[32] == 'Q') { MmLockPagableDataSection((PVOID )CdAudio535DeviceControl); #line 908 deviceExtension->Active = 2; } #line 916 if(inquiryDataPtr[27] == '4' && inquiryDataPtr[28] == '3' && (inquiryDataPtr[29] == '5' || inquiryDataPtr[29] == '1') && (inquiryDataPtr[32] == 'M' || inquiryDataPtr[32] == 'N' || inquiryDataPtr[32] == 'S' || inquiryDataPtr[32] == 'U' || inquiryDataPtr[32] == 'H')) { #line 928 MmLockPagableDataSection((PVOID )CdAudio435DeviceControl); #line 929 deviceExtension->Active = 3; } } #line 942 if(! memcmp(& inquiryDataPtr[8], "HITACHI ", 8) && (! memcmp(& inquiryDataPtr[16], "CDR-3650/1650S ", 16) || ! memcmp(& inquiryDataPtr[16], "CDR-1750S ", 16))) { MmLockPagableDataSection((PVOID )CdAudioHitachiDeviceControl); #line 948 deviceExtension->Active = 6; } #line 955 if(! memcmp(& inquiryDataPtr[8], "WEARNES ", 8) && ! memcmp(& inquiryDataPtr[16], "RUB", 3) || ! memcmp(& inquiryDataPtr[8], "OTI ", 8) && ! memcmp(& inquiryDataPtr[16], "DOLPHIN ", 8)) { #line 962 MmLockPagableDataSection((PVOID )CdAudioAtapiDeviceControl); #line 963 deviceExtension->Active = 1; inquiryDataPtr[25] = (UCHAR )0; } #line 971 if(! memcmp(& inquiryDataPtr[8], "FUJITSU ", 8)) { #line 977 if(inquiryDataPtr[16] == 'C' && inquiryDataPtr[17] == 'D' && inquiryDataPtr[18] == 'R' && inquiryDataPtr[20] == '3' && inquiryDataPtr[21] == '6' && inquiryDataPtr[22] == '5' && inquiryDataPtr[23] == '0') { #line 988 MmLockPagableDataSection((PVOID )CdAudioHitachiDeviceControl); #line 989 deviceExtension->Active = 6; inquiryDataPtr[25] = (UCHAR )0; } else { #line 992 if(inquiryDataPtr[16] == 'F' && inquiryDataPtr[17] == 'M' && inquiryDataPtr[18] == 'C' && inquiryDataPtr[21] == '1' && inquiryDataPtr[22] == '0' && (inquiryDataPtr[23] == '1' || inquiryDataPtr[23] == '2')) { #line 1003 MmLockPagableDataSection((PVOID )CdAudioHitachiDeviceControl ); #line 1004 deviceExtension->Active = 5; inquiryDataPtr[25] = (UCHAR )0; } } } #line 1014 if(! memcmp(& inquiryDataPtr[8], "HP ", 8) && ! memcmp(& inquiryDataPtr[16], "C4324/C4325", 11)) { MmLockPagableDataSection((PVOID )CdAudioHPCdrDeviceControl); #line 1018 deviceExtension->Active = 7; } } #line 1023 ExFreePool(inquiryDataPtr); } #line 1028 ; { #line 1035 HANDLE deviceParameterHandle ; ULONG keyValue = (ULONG )deviceExtension->Active; #line 1042 status= IoOpenDeviceRegistryKey(deviceExtension->TargetPdo, 2, (0x00020000L | 0x0002 | 0x0004) & ~ 0x00100000L, & deviceParameterHandle); if(! ((NTSTATUS )status>= 0)) { #line 1050 ; #line 1058 return (NTSTATUS )0x00000000L; } #line 1065 status= RtlWriteRegistryValue(0x40000000, (PWSTR )deviceParameterHandle, "M\0a\0p\0T\0y\0p\0e\0", 4, & keyValue, sizeof(keyValue)); #line 1072 if(! ((NTSTATUS )status>= 0)) { #line 1081 ; } #line 1094 ZwClose(deviceParameterHandle); #line 1098 ; } #line 1102 return (NTSTATUS )0x00000000L; } #line 1106 NTSTATUS CdAudioPnp(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 1131 PIO_STACK_LOCATION irpSp = ((Irp->Tail).Overlay).CurrentStackLocation; NTSTATUS status= (NTSTATUS )0xC00000BBL; #line 1134 switch(irpSp->MinorFunction) { case 0x00: #line 1136 ; { #line 1137 status= CdAudioStartDevice(DeviceObject, Irp); #line 1138 (Irp->IoStatus).Status = status; myStatus = status; IofCompleteRequest(Irp, 0); return status; } #line 1144 case 0x16: #line 1144 ; { #line 1145 ULONG count ; BOOLEAN setPagable ; PCD_DEVICE_EXTENSION deviceExtension ; #line 1150 if(((irpSp->Parameters).UsageNotification).Type != DeviceUsageTypePaging) { #line 1151 return CdAudioSendToNextDriver(DeviceObject, Irp); } deviceExtension = DeviceObject->DeviceExtension; #line 1160 status= KeWaitForSingleObject(& deviceExtension->PagingPathCountEvent, Executive, KernelMode, 0, (void * )0); #line 1169 setPagable = 0; if(! ((irpSp->Parameters).UsageNotification).InPath && deviceExtension->PagingPathCount == 1) { #line 1178 if(DeviceObject->Flags & 0x00004000) { #line 1181 ; } else { #line 1184 ; DeviceObject->Flags |= 0x00002000; setPagable = 1; } } #line 1195 status= CdAudioForwardIrpSynchronous(DeviceObject, Irp); #line 1203 if((NTSTATUS )status>= 0) { { #line 1207 if(((irpSp->Parameters).UsageNotification ).InPath) { #line 1207 InterlockedIncrement(& deviceExtension->PagingPathCount ); } else { #line 1207 InterlockedDecrement(& deviceExtension->PagingPathCount ); } } #line 1207 ; #line 1209 if(((irpSp->Parameters).UsageNotification).InPath ) { #line 1211 if(deviceExtension->PagingPathCount == 1) { #line 1213 ; DeviceObject->Flags &= ~ 0x00002000; } } } else { #line 1225 if(setPagable == 1) { #line 1226 ; DeviceObject->Flags &= ~ 0x00002000; setPagable = 0; } } #line 1237 KeSetEvent(& deviceExtension->PagingPathCountEvent, 0, 0); #line 1243 IofCompleteRequest(Irp, 0); return status; break; } #line 1250 default : #line 1250 ; return CdAudioSendToNextDriver(DeviceObject, Irp); } } #line 1257 NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject , PUNICODE_STRING RegistryPath ) { #line 1282 ULONG i ; #line 1287 //BLAST for(i = 0; i <= 0x1b; i++) { #line 1288 (DriverObject->MajorFunction)[i] = CdAudioSendToNextDriver; } #line 1291 (DriverObject->MajorFunction)[0x03] = CdAudioReadWrite; (DriverObject->MajorFunction)[0x04] = CdAudioReadWrite; (DriverObject->MajorFunction)[0x0e] = CdAudioDeviceControl; (DriverObject->MajorFunction)[0x1b] = CdAudioPnp; (DriverObject->MajorFunction)[0x16] = CdAudioPower; (DriverObject->DriverExtension)->AddDevice = CdAudioAddDevice; DriverObject->DriverUnload = CdAudioUnload; #line 1299 return (NTSTATUS )0x00000000L; } #line 1304 BOOLEAN NecSupportNeeded(PUCHAR InquiryData ) { #line 1327 PINQUIRYDATA inquiryData = (PINQUIRYDATA )InquiryData; ULONG i ; PUCHAR badDriveList[12] = {"CD-ROM DRIVE:80 ", "CD-ROM DRIVE:82 ", "CD-ROM DRIVE:83 ", "CD-ROM DRIVE:84 ", "CD-ROM DRIVE:841", "CD-ROM DRIVE:38 ", "CD-ROM DRIVE 4 M", "CD-ROM DRIVE:500", "CD-ROM DRIVE:400", "CD-ROM DRIVE:401", "CD-ROM DRIVE:501", "CD-ROM DRIVE:900"}; #line 1344 //BLAST for(i = 0; i < 12; i++) { #line 1345 if(RtlCompareMemory(inquiryData->ProductId, badDriveList[i], 16) == 16) { #line 1346 return 1; } } #line 1350 return 0; } #line 1354 NTSTATUS CdAudioReadWrite(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 1380 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; #line 1386 if(deviceExtension->PlayActive) { #line 1387 (Irp->IoStatus).Status = (NTSTATUS )0x80000011L; myStatus = (NTSTATUS )0x80000011L; IofCompleteRequest(Irp, 0); return (NTSTATUS )0x80000011L; } #line 1397 return CdAudioSendToNextDriver(DeviceObject, Irp); } #line 1402 NTSTATUS CdAudioDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 1426 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; NTSTATUS status; #line 1429 switch(deviceExtension->Active) { /* case 0xFF: #line 1431 ; #line 1437 status= CdAudioSendToNextDriver(DeviceObject, Irp); #line 1438 break; #line 1440 case 0: #line 1440 ; #line 1443 ; status= CdAudioSendToNextDriver(DeviceObject, Irp); #line 1445 break; #line 1447 case 8: #line 1447 ; status= CdAudioNECDeviceControl(DeviceObject, Irp); #line 1449 break; #line 1451 case 9: #line 1451 ; case 10: #line 1452 ; status= CdAudioPioneerDeviceControl(DeviceObject, Irp); #line 1454 break; #line 1456 case 4: #line 1456 ; status= CdAudioDenonDeviceControl(DeviceObject, Irp); #line 1458 break; #line 1460 case 5: #line 1460 ; case 6: #line 1461 ; status= CdAudioHitachiDeviceControl(DeviceObject, Irp); #line 1463 break; */ #line 1465 case 2: #line 1465 ; status= CdAudio535DeviceControl(DeviceObject, Irp); #line 1467 break; #line 1469 case 3: #line 1469 ; status= CdAudio435DeviceControl(DeviceObject, Irp); #line 1471 break; #line 1473 case 1: #line 1473 ; status= CdAudioAtapiDeviceControl(DeviceObject, Irp); #line 1475 break; #line 1477 case 7: #line 1477 ; status= CdAudioHPCdrDeviceControl(DeviceObject, Irp); #line 1479 break; #line 1481 default : #line 1481 ; #line 1488 ; ; deviceExtension->Active = 0; status= CdAudioSendToNextDriver(DeviceObject, Irp); } return status; } #line 1500 NTSTATUS CdAudioSendToNextDriver(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 1525 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; if(s == NP) #line 1526 s = SKIP1; else #line 1526 errorFn(); Irp->CurrentLocation++; #line 1527 ((Irp->Tail).Overlay).CurrentStackLocation++; #line 1527 ; return IofCallDriver(deviceExtension->TargetDeviceObject, Irp); } #line 1532 BOOLEAN CdAudioIsPlayActive(PDEVICE_OBJECT DeviceObject ) { #line 1553 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; PIRP irp_CdAudioIsPlayActive ; IO_STATUS_BLOCK ioStatus ; KEVENT event ; NTSTATUS status; PSUB_Q_CURRENT_POSITION currentBuffer ; BOOLEAN returnValue ; #line 1561 if(! deviceExtension->PlayActive) { #line 1562 return 0; } #line 1565 currentBuffer = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(SUB_Q_CURRENT_POSITION ), ' AdC'); #line 1568 if(currentBuffer == (void * )0) { #line 1569 return 0; } #line 1572 ((PCDROM_SUB_Q_DATA_FORMAT )currentBuffer)->Format = 0x01; #line 1574 ((PCDROM_SUB_Q_DATA_FORMAT )currentBuffer)->Track = 0; #line 1581 KeInitializeEvent(& event, NotificationEvent, 0); #line 1588 /* irp_CdAudioIsPlayActive = IoBuildDeviceIoControlRequest(0x00000002 << 16 | 0x0001 << 14 | 0x000B << 2 | 0, deviceExtension->DeviceObject, currentBuffer, sizeof(CDROM_SUB_Q_DATA_FORMAT ), currentBuffer, sizeof(SUB_Q_CURRENT_POSITION ), 0, & event, & ioStatus); */ #line 1598 if(irp_CdAudioIsPlayActive == (void * )0) { #line 1599 ExFreePool(currentBuffer); return 0; } #line 1607 /* status= IofCallDriver(deviceExtension->DeviceObject, irp_CdAudioIsPlayActive); */ #line 1609 if(status== (NTSTATUS )0x00000103L) { #line 1610 KeWaitForSingleObject(& event, Suspended, KernelMode, 0, (void * )0); #line 1611 status= ioStatus.Status; } #line 1614 if(! ((NTSTATUS )status>= 0)) { #line 1615 ExFreePool(currentBuffer); return 0; } #line 1619 if((currentBuffer->Header).AudioStatus == 0x11) { returnValue = 1; } else { #line 1623 returnValue = 0; deviceExtension->PlayActive = 0; } #line 1627 ExFreePool(currentBuffer); #line 1629 return returnValue; } #line 1635 NTSTATUS CdAudioNECDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 1660 PIO_STACK_LOCATION currentIrpStack = ((Irp->Tail).Overlay).CurrentStackLocation; #line 1661 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; PCDROM_TOC cdaudioDataOut = (Irp->AssociatedIrp).SystemBuffer; SCSI_PASS_THROUGH srb ; PNEC_CDB cdb = (PNEC_CDB )srb.Cdb; NTSTATUS status ; ULONG i , bytesTransfered ; PUCHAR Toc ; ULONG retryCount = 0; ULONG address ; LARGE_INTEGER delay ; #line 1673 NECRestart: #line 1679 memset(cdb, 0, 12); #line 1685 switch(((currentIrpStack->Parameters).DeviceIoControl).IoControlCode) { case 0x00000002 << 16 | 0x0001 << 14 | 0x000E << 2 | 0: #line 1687 ; #line 1691 ; #line 1697 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[1])))) { #line 1699 status = (NTSTATUS )0xC0000023L; #line 1701 (Irp->IoStatus).Information = 0; break; } #line 1711 if(CdAudioIsPlayActive(DeviceObject)) { #line 1712 (Irp->IoStatus).Information = 0; status = (NTSTATUS )0x80000011L; break; } #line 1722 Toc = (PUCHAR )ExAllocatePoolWithTag(NonPagedPoolCacheAligned, 1022, ' AdC'); #line 1726 if(Toc == (void * )0) { status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 1738 memset(Toc, 0, 1022); srb.CdbLength = 10; #line 1745 (cdb->NEC_READ_TOC).OperationCode = 0xDE; (cdb->NEC_READ_TOC).Type = 0x03; (cdb->NEC_READ_TOC).TrackNumber = 0xB0; srb.TimeOutValue = 10; #line 1750 status = SendSrbSynchronous(deviceExtension, & srb, Toc, 1022); #line 1757 if(! ((NTSTATUS )status >= 0) && status != (NTSTATUS )0xC000003CL) { #line 1761 ; #line 1763 ExFreePool(Toc); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } else { status = (NTSTATUS )0x00000000L; } #line 1776 bytesTransfered = (LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[1])); #line 1777 (Irp->IoStatus).Information = bytesTransfered; #line 1779 memset(cdaudioDataOut, 0, bytesTransfered); #line 1781 (cdaudioDataOut->Length)[0] = (UCHAR )(bytesTransfered - 2 >> 8); #line 1782 (cdaudioDataOut->Length)[1] = (UCHAR )(bytesTransfered - 2 & 0xFF); #line 1788 if(* (ULONG * )(& Toc[14]) == 0) { #line 1794 ExFreePool(Toc); break; } #line 1802 cdaudioDataOut->FirstTrack = 1; cdaudioDataOut->LastTrack = 2; #line 1810 ; #line 1817 ((cdaudioDataOut->TrackData)[0]).Reserved = 0; ((cdaudioDataOut->TrackData)[0]).Control = (Toc[2] & 0x0F) << 4 | Toc[2] >> 4; ((cdaudioDataOut->TrackData)[0]).TrackNumber = 1; #line 1822 ((cdaudioDataOut->TrackData)[0]).Reserved1 = 0; #line 1829 address = ((((Toc[15] & 0xF0) >> 4) * 10 + (Toc[15] & 0x0F)) * 60 + (((Toc[16] & 0xF0) >> 4) * 10 + (Toc[16] & 0x0F))) * 75 + (((Toc[17] & 0xF0) >> 4) * 10 + (Toc[17] & 0x0F)); #line 1836 (((cdaudioDataOut->TrackData)[0]).Address)[0] = (UCHAR )(address >> 24); #line 1837 (((cdaudioDataOut->TrackData)[0]).Address)[1] = (UCHAR )(address >> 16); #line 1838 (((cdaudioDataOut->TrackData)[0]).Address)[2] = (UCHAR )(address >> 8); #line 1839 (((cdaudioDataOut->TrackData)[0]).Address)[3] = (UCHAR )address; #line 1845 ExFreePool(Toc); break; #line 1848 case 0x00000002 << 16 | 0x0001 << 14 | 0x0000 << 2 | 0: #line 1848 ; #line 1852 ; #line 1858 if(CdAudioIsPlayActive(DeviceObject)) { #line 1859 status = (NTSTATUS )0x80000011L; (Irp->IoStatus).Information = 0; break; } #line 1869 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0])))) { #line 1872 status = (NTSTATUS )0xC0000023L; #line 1874 (Irp->IoStatus).Information = 0; break; } #line 1882 Toc = (PUCHAR )ExAllocatePoolWithTag(NonPagedPoolCacheAligned, 1022, ' AdC'); #line 1886 if(Toc == (void * )0) { status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 1897 ; #line 1903 memset(Toc, 0, 1022); srb.CdbLength = 10; #line 1910 (cdb->NEC_READ_TOC).OperationCode = 0xDE; (cdb->NEC_READ_TOC).Type = 0x03; srb.TimeOutValue = 10; status = SendSrbSynchronous(deviceExtension, & srb, Toc, 1022); #line 1920 if(! ((NTSTATUS )status >= 0) && status != (NTSTATUS )0xC000003CL) { #line 1924 ; #line 1927 if(status != (NTSTATUS )0xC000003CL) { #line 1930 ; (Irp->IoStatus).Information = 0; ExFreePool(Toc); goto SetStatusAndReturn; } } else { status = (NTSTATUS )0x00000000L; } #line 1945 bytesTransfered = ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength > sizeof(CDROM_TOC ) ? sizeof(CDROM_TOC ) : ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength ; #line 1951 cdaudioDataOut->FirstTrack = ((Toc[9] & 0xF0) >> 4) * 10 + (Toc[9] & 0x0F); #line 1952 cdaudioDataOut->LastTrack = ((Toc[19] & 0xF0) >> 4) * 10 + (Toc[19] & 0x0F); #line 1959 ; { #line 1974 ULONG tracksToReturn ; ULONG tracksOnCd ; ULONG tracksInBuffer ; ULONG dataLength ; tracksOnCd = cdaudioDataOut->LastTrack - cdaudioDataOut->FirstTrack + 1; dataLength = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[tracksOnCd]))) - 2; #line 1981 (cdaudioDataOut->Length)[0] = (UCHAR )(dataLength >> 8); (cdaudioDataOut->Length)[1] = (UCHAR )(dataLength & 0xFF); #line 1985 tracksInBuffer = ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength - (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0]))); #line 1987 tracksInBuffer /= sizeof(TRACK_DATA ); #line 1990 tracksToReturn = tracksInBuffer < tracksOnCd ? tracksInBuffer : tracksOnCd; #line 1994 for(i = 0; i < tracksToReturn; i++) { #line 2000 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; ((cdaudioDataOut->TrackData)[i]).Control = (Toc[i * 10 + 32] & 0x0F) << 4 | Toc[i * 10 + 32] >> 4; #line 2003 ((cdaudioDataOut->TrackData)[i]).TrackNumber = (UCHAR )(i + cdaudioDataOut->FirstTrack); ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; (((cdaudioDataOut->TrackData)[i]).Address)[0] = 0; #line 2008 (((cdaudioDataOut->TrackData)[i]).Address)[1] = ((Toc[i * 10 + 39] & 0xF0) >> 4) * 10 + (Toc[i * 10 + 39] & 0x0F); #line 2010 (((cdaudioDataOut->TrackData)[i]).Address)[2] = ((Toc[i * 10 + 40] & 0xF0) >> 4) * 10 + (Toc[i * 10 + 40] & 0x0F); #line 2012 (((cdaudioDataOut->TrackData)[i]).Address)[3] = ((Toc[i * 10 + 41] & 0xF0) >> 4) * 10 + (Toc[i * 10 + 41] & 0x0F); #line 2021 ; } #line 2029 if(tracksInBuffer > tracksOnCd) { #line 2030 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; ((cdaudioDataOut->TrackData)[i]).Control = 0x10; ((cdaudioDataOut->TrackData)[i]).TrackNumber = 0xaa; #line 2033 ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; (((cdaudioDataOut->TrackData)[i]).Address)[0] = 0; #line 2035 (((cdaudioDataOut->TrackData)[i]).Address)[1] = ((Toc[29] & 0xF0) >> 4) * 10 + (Toc[29] & 0x0F); #line 2036 (((cdaudioDataOut->TrackData)[i]).Address)[2] = ((Toc[30] & 0xF0) >> 4) * 10 + (Toc[30] & 0x0F); #line 2037 (((cdaudioDataOut->TrackData)[i]).Address)[3] = ((Toc[31] & 0xF0) >> 4) * 10 + (Toc[31] & 0x0F); #line 2045 ; i++; } #line 2049 (Irp->IoStatus).Information = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[i]))); } #line 2058 ExFreePool(Toc); break; #line 2061 case 0x00000002 << 16 | 0x0001 << 14 | 0x0002 << 2 | 0: #line 2061 ; #line 2063 deviceExtension->PlayActive = 0; #line 2069 return CdAudioSendToNextDriver(DeviceObject, Irp); break; #line 2072 case 0x00000002 << 16 | 0x0001 << 14 | 0x0006 << 2 | 0: #line 2072 ; { #line 2075 PCDROM_PLAY_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; #line 2079 ; #line 2081 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_PLAY_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; (Irp->IoStatus).Information = 0; break; } #line 2094 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->NEC_PLAY_AUDIO).OperationCode = 0xD8; (cdb->NEC_PLAY_AUDIO).PlayMode = 0x01; (cdb->NEC_PLAY_AUDIO).Minute = (inputBuffer->StartingM / 10 << 4) + inputBuffer->StartingM % 10; #line 2099 (cdb->NEC_PLAY_AUDIO).Second = (inputBuffer->StartingS / 10 << 4) + inputBuffer->StartingS % 10; #line 2100 (cdb->NEC_PLAY_AUDIO).Frame = (inputBuffer->StartingF / 10 << 4) + inputBuffer->StartingF % 10; #line 2101 (cdb->NEC_PLAY_AUDIO).Control = 0x40; #line 2108 ; #line 2111 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 2116 if((NTSTATUS )status >= 0) { #line 2122 deviceExtension->PlayActive = 1; #line 2128 memset(cdb, 0, 12); (cdb->NEC_PLAY_AUDIO).OperationCode = 0xD9; (cdb->NEC_PLAY_AUDIO).PlayMode = 0x03; (cdb->NEC_PLAY_AUDIO).Minute = (inputBuffer->EndingM / 10 << 4) + inputBuffer->EndingM % 10; #line 2132 (cdb->NEC_PLAY_AUDIO).Second = (inputBuffer->EndingS / 10 << 4) + inputBuffer->EndingS % 10; #line 2133 (cdb->NEC_PLAY_AUDIO).Frame = (inputBuffer->EndingF / 10 << 4) + inputBuffer->EndingF % 10; #line 2134 (cdb->NEC_PLAY_AUDIO).Control = 0x40; #line 2141 ; #line 2143 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); } } #line 2153 break; #line 2155 case 0x00000002 << 16 | 0x0001 << 14 | 0x0001 << 2 | 0: #line 2155 ; { #line 2158 PCDROM_SEEK_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; #line 2162 ; #line 2169 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_SEEK_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; (Irp->IoStatus).Information = 0; break; } #line 2182 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->NEC_SEEK_AUDIO).OperationCode = 0xD8; (cdb->NEC_SEEK_AUDIO).Minute = (inputBuffer->M / 10 << 4) + inputBuffer->M % 10; #line 2186 (cdb->NEC_SEEK_AUDIO).Second = (inputBuffer->S / 10 << 4) + inputBuffer->S % 10; #line 2187 (cdb->NEC_SEEK_AUDIO).Frame = (inputBuffer->F / 10 << 4) + inputBuffer->F % 10; #line 2188 (cdb->NEC_SEEK_AUDIO).Control = 0x40; #line 2194 ; #line 2196 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); } #line 2204 break; #line 2206 case 0x00000002 << 16 | 0x0001 << 14 | 0x0003 << 2 | 0: #line 2206 ; #line 2210 ; #line 2212 deviceExtension->PlayActive = 0; #line 2218 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->NEC_PAUSE_AUDIO).OperationCode = 0xDA; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 2228 break; #line 2230 case 0x00000002 << 16 | 0x0001 << 14 | 0x0004 << 2 | 0: #line 2230 ; #line 2234 ; #line 2240 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->NEC_PLAY_AUDIO).OperationCode = 0xD9; (cdb->NEC_PLAY_AUDIO).PlayMode = 0x03; (cdb->NEC_PLAY_AUDIO).Control = 0xC0; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 2251 break; #line 2253 case 0x00000002 << 16 | 0x0001 << 14 | 0x000B << 2 | 0: #line 2253 ; { #line 2256 PSUB_Q_CURRENT_POSITION userPtr = (Irp->AssociatedIrp).SystemBuffer; PUCHAR SubQPtr = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, 10, ' AdC'); #line 2263 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < sizeof(SUB_Q_CURRENT_POSITION )) { status = (NTSTATUS )0xC0000023L; #line 2268 (Irp->IoStatus).Information = 0; if(SubQPtr) #line 2269 ExFreePool(SubQPtr); break; } #line 2276 ; #line 2278 if(SubQPtr == (void * )0) { #line 2282 ; #line 2284 status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 2290 memset(SubQPtr, 0, 10); #line 2292 if(((PCDROM_SUB_Q_DATA_FORMAT )userPtr)->Format != 0x01) { #line 2298 ; #line 2300 ExFreePool(SubQPtr); status = (NTSTATUS )0xC0000001L; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 2306 NECSeek: #line 2312 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->NEC_READ_Q_CHANNEL).OperationCode = 0xDD; #line 2316 (cdb->NEC_READ_Q_CHANNEL).TransferSize = 10; #line 2321 ; status = SendSrbSynchronous(deviceExtension, & srb, SubQPtr, 10); #line 2330 ; #line 2332 if((NTSTATUS )status >= 0 || status == (NTSTATUS )0xC000003CL) { #line 2334 (userPtr->Header).Reserved = 0; if(SubQPtr[0] == 0x00) #line 2335 (userPtr->Header).AudioStatus = 0x11; else { #line 2337 if(SubQPtr[0] == 0x01) { (userPtr->Header).AudioStatus = 0x12; #line 2340 deviceExtension->PlayActive = 0; } else { #line 2341 if(SubQPtr[0] == 0x02) { #line 2342 (userPtr->Header).AudioStatus = 0x12; #line 2343 deviceExtension->PlayActive = 0; } else { #line 2344 if(SubQPtr[0] == 0x03) { (userPtr->Header).AudioStatus = 0x13; deviceExtension->PlayActive = 0; } else { #line 2350 deviceExtension->PlayActive = 0; } } } } #line 2354 ((userPtr->Header).DataLength)[0] = 0; ((userPtr->Header).DataLength)[0] = 12; #line 2357 userPtr->FormatCode = 0x01; userPtr->Control = SubQPtr[1] & 0x0F; userPtr->ADR = 0; userPtr->TrackNumber = ((SubQPtr[2] & 0xF0) >> 4) * 10 + (SubQPtr[2] & 0x0F); #line 2361 userPtr->IndexNumber = ((SubQPtr[3] & 0xF0) >> 4) * 10 + (SubQPtr[3] & 0x0F); #line 2362 (userPtr->AbsoluteAddress)[0] = 0; (userPtr->AbsoluteAddress)[1] = ((SubQPtr[7] & 0xF0) >> 4) * 10 + (SubQPtr[7] & 0x0F); #line 2364 (userPtr->AbsoluteAddress)[2] = ((SubQPtr[8] & 0xF0) >> 4) * 10 + (SubQPtr[8] & 0x0F); #line 2365 (userPtr->AbsoluteAddress)[3] = ((SubQPtr[9] & 0xF0) >> 4) * 10 + (SubQPtr[9] & 0x0F); #line 2366 (userPtr->TrackRelativeAddress)[0] = 0; (userPtr->TrackRelativeAddress)[1] = ((SubQPtr[4] & 0xF0) >> 4) * 10 + (SubQPtr[4] & 0x0F); #line 2368 (userPtr->TrackRelativeAddress)[2] = ((SubQPtr[5] & 0xF0) >> 4) * 10 + (SubQPtr[5] & 0x0F); #line 2369 (userPtr->TrackRelativeAddress)[3] = ((SubQPtr[6] & 0xF0) >> 4) * 10 + (SubQPtr[6] & 0x0F); #line 2370 (Irp->IoStatus).Information = sizeof(SUB_Q_CURRENT_POSITION ); #line 2380 ; #line 2390 ; #line 2397 if(userPtr->TrackNumber > 100) { #line 2403 delay.QuadPart = - (10 * 1000 * 100 * 5); #line 2409 KeDelayExecutionThread(KernelMode, 0, & delay); #line 2413 if(retryCount++ < 4) { #line 2414 goto NECSeek; } else { #line 2416 (Irp->IoStatus).Information = 0; status = (NTSTATUS )0xC0000186L; } } else { #line 2421 status = (NTSTATUS )0x00000000L; } } else { memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION )); #line 2427 (Irp->IoStatus).Information = 0; #line 2431 ; } #line 2435 ExFreePool(SubQPtr); } #line 2438 break; #line 2440 case 0x00000002 << 16 | 0x0001 << 14 | 0x0202 << 2 | 0: #line 2440 ; #line 2444 ; #line 2446 deviceExtension->PlayActive = 0; #line 2452 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->NEC_EJECT).OperationCode = 0xDC; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 2461 (Irp->IoStatus).Information = 0; #line 2464 ; break; #line 2467 case 0x00000002 << 16 | 0x0001 << 14 | 0x000D << 2 | 0: #line 2467 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x0005 << 2 | 0: #line 2468 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x000A << 2 | 0: #line 2469 ; #line 2471 ; (Irp->IoStatus).Information = 0; status = (NTSTATUS )0xC0000010L; break; #line 2476 case 0x00000002 << 16 | 0x0001 << 14 | 0x0200 << 2 | 0: #line 2476 ; #line 2482 CdAudioIsPlayActive(DeviceObject); #line 2488 default : #line 2488 ; #line 2493 ; return CdAudioSendToNextDriver(DeviceObject, Irp); break; } #line 2499 SetStatusAndReturn: { #line 2505 if(status == (NTSTATUS )0x80000016L) { #line 2513 if(currentIrpStack->Flags & 0x02) { status = (NTSTATUS )0xC0000185L; goto NECRestart; } #line 2520 IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); #line 2524 (Irp->IoStatus).Information = 0; } } (Irp->IoStatus).Status = status; myStatus = status; IofCompleteRequest(Irp, 0); return status; } #line 2535 NTSTATUS CdAudioPioneerDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 2560 PIO_STACK_LOCATION currentIrpStack = ((Irp->Tail).Overlay).CurrentStackLocation; #line 2561 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; PCDROM_TOC cdaudioDataOut = (Irp->AssociatedIrp).SystemBuffer; SCSI_PASS_THROUGH srb ; PPNR_CDB cdb = (PPNR_CDB )srb.Cdb; PCDB scsiCdb = (PCDB )srb.Cdb; NTSTATUS status ; ULONG i , retry ; PUCHAR Toc ; #line 2570 PioneerRestart: #line 2576 memset(cdb, 0, 12); #line 2582 switch(((currentIrpStack->Parameters).DeviceIoControl).IoControlCode) { case 0x00000002 << 16 | 0x0001 << 14 | 0x0000 << 2 | 0: #line 2584 ; { #line 2587 ; #line 2594 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0])))) { #line 2597 status = (NTSTATUS )0xC0000023L; #line 2599 (Irp->IoStatus).Information = 0; break; } #line 2607 if(CdAudioIsPlayActive(DeviceObject)) { #line 2608 status = (NTSTATUS )0x80000011L; (Irp->IoStatus).Information = 0; break; } #line 2617 Toc = (PUCHAR )ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(CDROM_TOC ), ' AdC'); #line 2621 if(Toc == (void * )0) { status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 2629 memset(Toc, 0, sizeof(CDROM_TOC )); #line 2637 if(deviceExtension->Active == 9) { #line 2638 (cdb->PNR_START_STOP).Immediate = 1; } else { #line 2640 (cdb->PNR_START_STOP).Immediate = 0; } #line 2643 (cdb->PNR_START_STOP).OperationCode = 0x1B; (cdb->PNR_START_STOP).Start = 1; srb.CdbLength = 6; srb.TimeOutValue = 10; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 2653 if(! ((NTSTATUS )status >= 0)) { #line 2656 ; #line 2658 ExFreePool(Toc); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 2667 memset(cdb, 0, 12); srb.CdbLength = 10; (cdb->PNR_READ_TOC).OperationCode = 0xC1; ((cdb->PNR_READ_TOC).AssignedLength)[1] = 0x04; (cdb->PNR_READ_TOC).Type = 0x00; srb.TimeOutValue = 10; status = SendSrbSynchronous(deviceExtension, & srb, Toc, 0x04); #line 2679 if(! ((NTSTATUS )status >= 0)) { #line 2683 ; ExFreePool(Toc); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 2690 cdaudioDataOut->FirstTrack = ((Toc[0] & 0xF0) >> 4) * 10 + (Toc[0] & 0x0F); #line 2691 cdaudioDataOut->LastTrack = ((Toc[1] & 0xF0) >> 4) * 10 + (Toc[1] & 0x0F); { #line 2706 ULONG tracksToReturn ; ULONG tracksOnCd ; ULONG tracksInBuffer ; ULONG dataLength ; tracksOnCd = cdaudioDataOut->LastTrack - cdaudioDataOut->FirstTrack + 1; #line 2716 dataLength = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[tracksOnCd]))) - 2; #line 2717 (cdaudioDataOut->Length)[0] = (UCHAR )(dataLength >> 8); #line 2718 (cdaudioDataOut->Length)[1] = (UCHAR )(dataLength & 0xFF); #line 2721 tracksInBuffer = ((currentIrpStack->Parameters).DeviceIoControl) .OutputBufferLength - (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0]))); #line 2723 tracksInBuffer /= sizeof(TRACK_DATA ); #line 2726 tracksToReturn = tracksInBuffer < tracksOnCd ? tracksInBuffer : tracksOnCd; #line 2730 for(i = 0; i < tracksToReturn; i++) { #line 2736 memset(cdb, 0, 12); (cdb->PNR_READ_TOC).OperationCode = 0xC1; (cdb->PNR_READ_TOC).TrackNumber = (UCHAR )(((i + cdaudioDataOut->FirstTrack) / 10 << 4) + (i + cdaudioDataOut->FirstTrack) % 10); #line 2741 ((cdb->PNR_READ_TOC).AssignedLength)[1] = 0x04; #line 2742 (cdb->PNR_READ_TOC).Type = 0x02; srb.TimeOutValue = 10; status = SendSrbSynchronous(deviceExtension, & srb, Toc, 0x04); #line 2750 if(! ((NTSTATUS )status >= 0)) { #line 2755 ; ExFreePool(Toc); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 2762 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; #line 2763 ((cdaudioDataOut->TrackData)[i]).Control = Toc[0]; #line 2764 ((cdaudioDataOut->TrackData)[i]).TrackNumber = (UCHAR )(i + cdaudioDataOut->FirstTrack); #line 2766 ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; #line 2767 (((cdaudioDataOut->TrackData)[i]).Address )[0] = 0; #line 2768 (((cdaudioDataOut->TrackData)[i]).Address )[1] = ((Toc[1] & 0xF0) >> 4) * 10 + (Toc[1] & 0x0F); #line 2769 (((cdaudioDataOut->TrackData)[i]).Address )[2] = ((Toc[2] & 0xF0) >> 4) * 10 + (Toc[2] & 0x0F); #line 2770 (((cdaudioDataOut->TrackData)[i]).Address )[3] = ((Toc[3] & 0xF0) >> 4) * 10 + (Toc[3] & 0x0F); #line 2778 ; } #line 2786 if(tracksInBuffer > tracksOnCd) { #line 2787 memset(cdb, 0, 12); (cdb->PNR_READ_TOC).OperationCode = 0xC1; #line 2789 ((cdb->PNR_READ_TOC).AssignedLength)[1] = 0x04; #line 2790 (cdb->PNR_READ_TOC).Type = 0x01; srb.TimeOutValue = 10; status = SendSrbSynchronous(deviceExtension, & srb, Toc, 0x04); #line 2798 if(! ((NTSTATUS )status >= 0)) { #line 2802 ; ExFreePool(Toc); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 2809 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; #line 2810 ((cdaudioDataOut->TrackData)[i]).Control = 0x10; #line 2811 ((cdaudioDataOut->TrackData)[i]).TrackNumber = 0xaa; #line 2812 ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; #line 2813 (((cdaudioDataOut->TrackData)[i]).Address )[0] = 0; #line 2814 (((cdaudioDataOut->TrackData)[i]).Address )[1] = ((Toc[0] & 0xF0) >> 4) * 10 + (Toc[0] & 0x0F); #line 2815 (((cdaudioDataOut->TrackData)[i]).Address )[2] = ((Toc[1] & 0xF0) >> 4) * 10 + (Toc[1] & 0x0F); #line 2816 (((cdaudioDataOut->TrackData)[i]).Address )[3] = ((Toc[2] & 0xF0) >> 4) * 10 + (Toc[2] & 0x0F); #line 2824 ; #line 2826 i++; } #line 2834 (Irp->IoStatus).Information = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[i]))); } ExFreePool(Toc); } #line 2841 break; #line 2843 case 0x00000002 << 16 | 0x0001 << 14 | 0x0002 << 2 | 0: #line 2843 ; { #line 2846 ; #line 2849 deviceExtension->PlayActive = 0; #line 2855 return CdAudioSendToNextDriver(DeviceObject, Irp); } break; #line 2860 case 0x00000002 << 16 | 0x0001 << 14 | 0x0006 << 2 | 0: #line 2860 ; { PCDROM_PLAY_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; #line 2867 ; (Irp->IoStatus).Information = 0; #line 2870 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_PLAY_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; break; } #line 2882 retry = 5; do { srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->PNR_SEEK_AUDIO).OperationCode = 0xC8; #line 2889 (cdb->PNR_SEEK_AUDIO).Minute = (inputBuffer->StartingM / 10 << 4) + inputBuffer->StartingM % 10; #line 2891 (cdb->PNR_SEEK_AUDIO).Second = (inputBuffer->StartingS / 10 << 4) + inputBuffer->StartingS % 10; #line 2893 (cdb->PNR_SEEK_AUDIO).Frame = (inputBuffer->StartingF / 10 << 4) + inputBuffer->StartingF % 10; #line 2895 (cdb->PNR_SEEK_AUDIO).Type = 0x01; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); } while(! ((NTSTATUS )status >= 0) && retry-- > 0); #line 2904 if((NTSTATUS )status >= 0) { #line 2910 memset(cdb, 0, 12); retry = 5; do { #line 2913 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->PNR_PLAY_AUDIO).OperationCode = 0xC9; #line 2916 (cdb->PNR_PLAY_AUDIO).StopAddr = 1; (cdb->PNR_PLAY_AUDIO).Minute = (inputBuffer->EndingM / 10 << 4) + inputBuffer->EndingM % 10; #line 2919 (cdb->PNR_PLAY_AUDIO).Second = (inputBuffer->EndingS / 10 << 4) + inputBuffer->EndingS % 10; #line 2921 (cdb->PNR_PLAY_AUDIO).Frame = (inputBuffer->EndingF / 10 << 4) + inputBuffer->EndingF % 10; #line 2923 (cdb->PNR_PLAY_AUDIO).Type = 0x01; #line 2925 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); } while(! ((NTSTATUS )status >= 0) && retry-- > 0); #line 2932 if((NTSTATUS )status >= 0) { #line 2938 deviceExtension->PlayActive = 1; } } } #line 2979 break; #line 2981 case 0x00000002 << 16 | 0x0001 << 14 | 0x0001 << 2 | 0: #line 2981 ; { PCDROM_SEEK_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; #line 2987 ; (Irp->IoStatus).Information = 0; #line 2990 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_SEEK_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; break; } #line 2997 retry = 5; do { #line 3004 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->PNR_SEEK_AUDIO).OperationCode = 0xC8; (cdb->PNR_SEEK_AUDIO).Minute = (inputBuffer->M / 10 << 4) + inputBuffer->M % 10; #line 3008 (cdb->PNR_SEEK_AUDIO).Second = (inputBuffer->S / 10 << 4) + inputBuffer->S % 10; #line 3009 (cdb->PNR_SEEK_AUDIO).Frame = (inputBuffer->F / 10 << 4) + inputBuffer->F % 10; #line 3010 (cdb->PNR_SEEK_AUDIO).Type = 0x01; #line 3019 ; #line 3024 ; #line 3032 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); } while(! ((NTSTATUS )status >= 0) && retry-- > 0); } #line 3055 break; #line 3057 case 0x00000002 << 16 | 0x0001 << 14 | 0x0003 << 2 | 0: #line 3057 ; { #line 3061 ; #line 3063 (Irp->IoStatus).Information = 0; deviceExtension->PlayActive = 0; #line 3070 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->PNR_PAUSE_AUDIO).OperationCode = 0xCA; (cdb->PNR_PAUSE_AUDIO).Pause = 1; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); } #line 3080 break; #line 3082 case 0x00000002 << 16 | 0x0001 << 14 | 0x0004 << 2 | 0: #line 3082 ; { #line 3086 ; #line 3088 (Irp->IoStatus).Information = 0; #line 3094 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->PNR_PAUSE_AUDIO).OperationCode = 0xCA; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); } #line 3103 break; #line 3105 case 0x00000002 << 16 | 0x0001 << 14 | 0x000B << 2 | 0: #line 3105 ; { #line 3106 PSUB_Q_CURRENT_POSITION userPtr = (Irp->AssociatedIrp).SystemBuffer; PUCHAR SubQPtr = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, 9, ' AdC'); #line 3115 ; #line 3117 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < sizeof(SUB_Q_CURRENT_POSITION )) { status = (NTSTATUS )0xC0000023L; #line 3122 (Irp->IoStatus).Information = 0; if(SubQPtr) #line 3123 ExFreePool(SubQPtr); break; } #line 3127 if(SubQPtr == (void * )0) { #line 3131 ; #line 3133 memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION )); #line 3134 status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 3140 if(((PCDROM_SUB_Q_DATA_FORMAT )userPtr)->Format != 0x01) { #line 3146 ; #line 3148 ExFreePool(SubQPtr); memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION )); #line 3150 (Irp->IoStatus).Information = 0; status = (NTSTATUS )0xC0000010L; goto SetStatusAndReturn; } #line 3159 retry = 5; do { #line 3161 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->PNR_AUDIO_STATUS).OperationCode = 0xCC; #line 3165 (cdb->PNR_AUDIO_STATUS).AssignedLength = 6; #line 3167 status = SendSrbSynchronous(deviceExtension, & srb, SubQPtr, 6); } while(! ((NTSTATUS )status >= 0) && retry-- > 0 && status != (NTSTATUS )0xC00000A3L); #line 3177 if((NTSTATUS )status >= 0) { (userPtr->Header).Reserved = 0; if(SubQPtr[0] == 0x00) #line 3180 (userPtr->Header).AudioStatus = 0x11; else { #line 3182 if(SubQPtr[0] == 0x01) { #line 3183 deviceExtension->PlayActive = 0; (userPtr->Header).AudioStatus = 0x12; } else { #line 3185 if(SubQPtr[0] == 0x02) { #line 3186 deviceExtension->PlayActive = 0; #line 3187 (userPtr->Header).AudioStatus = 0x12; } else { #line 3188 if(SubQPtr[0] == 0x03) { (userPtr->Header).AudioStatus = 0x13; deviceExtension->PlayActive = 0; } else { #line 3194 deviceExtension->PlayActive = 0; } } } } } else { #line 3203 ; #line 3205 ExFreePool(SubQPtr); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 3215 memset(cdb, 0, 12); retry = 5; do { #line 3218 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->PNR_READ_Q_CHANNEL).OperationCode = 0xC2; #line 3222 (cdb->PNR_READ_Q_CHANNEL).AssignedLength = 9; #line 3224 status = SendSrbSynchronous(deviceExtension, & srb, SubQPtr, 9); } while(! ((NTSTATUS )status >= 0) && retry-- > 0); #line 3232 if((NTSTATUS )status >= 0) { ((userPtr->Header).DataLength)[0] = 0; ((userPtr->Header).DataLength)[0] = 12; #line 3237 userPtr->FormatCode = 0x01; userPtr->Control = SubQPtr[0] & 0x0F; userPtr->ADR = 0; userPtr->TrackNumber = ((SubQPtr[1] & 0xF0) >> 4) * 10 + (SubQPtr[1] & 0x0F); #line 3241 userPtr->IndexNumber = ((SubQPtr[2] & 0xF0) >> 4) * 10 + (SubQPtr[2] & 0x0F); #line 3242 (userPtr->AbsoluteAddress)[0] = 0; (userPtr->AbsoluteAddress)[1] = ((SubQPtr[6] & 0xF0) >> 4) * 10 + (SubQPtr[6] & 0x0F); #line 3244 (userPtr->AbsoluteAddress)[2] = ((SubQPtr[7] & 0xF0) >> 4) * 10 + (SubQPtr[7] & 0x0F); #line 3245 (userPtr->AbsoluteAddress)[3] = ((SubQPtr[8] & 0xF0) >> 4) * 10 + (SubQPtr[8] & 0x0F); #line 3246 (userPtr->TrackRelativeAddress)[0] = 0; (userPtr->TrackRelativeAddress)[1] = ((SubQPtr[3] & 0xF0) >> 4) * 10 + (SubQPtr[3] & 0x0F); #line 3248 (userPtr->TrackRelativeAddress)[2] = ((SubQPtr[4] & 0xF0) >> 4) * 10 + (SubQPtr[4] & 0x0F); #line 3249 (userPtr->TrackRelativeAddress)[3] = ((SubQPtr[5] & 0xF0) >> 4) * 10 + (SubQPtr[5] & 0x0F); #line 3250 (Irp->IoStatus).Information = sizeof(SUB_Q_CURRENT_POSITION ); } else { #line 3254 (Irp->IoStatus).Information = 0; #line 3258 ; } #line 3262 ExFreePool(SubQPtr); } break; #line 3266 case 0x00000002 << 16 | 0x0001 << 14 | 0x0202 << 2 | 0: #line 3266 ; { #line 3269 ; (Irp->IoStatus).Information = 0; #line 3272 deviceExtension->PlayActive = 0; #line 3278 if(deviceExtension->Active == 9) { #line 3279 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->PNR_EJECT).OperationCode = 0xC0; (cdb->PNR_EJECT).Immediate = 1; } else { #line 3284 srb.CdbLength = 6; #line 3286 (scsiCdb->START_STOP).OperationCode = 0x1B; (scsiCdb->START_STOP).LoadEject = 1; (scsiCdb->START_STOP).Start = 0; } #line 3292 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 3300 ; } break; #line 3304 case 0x00000002 << 16 | 0x0001 << 14 | 0x000D << 2 | 0: #line 3304 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x0005 << 2 | 0: #line 3305 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x000A << 2 | 0: #line 3306 ; #line 3308 ; (Irp->IoStatus).Information = 0; status = (NTSTATUS )0xC0000010L; break; #line 3313 case 0x00000002 << 16 | 0x0001 << 14 | 0x0200 << 2 | 0: #line 3313 ; #line 3319 CdAudioIsPlayActive(DeviceObject); #line 3321 default : #line 3321 ; #line 3323 ; return CdAudioSendToNextDriver(DeviceObject, Irp); break; } #line 3331 SetStatusAndReturn: { #line 3336 if(status == (NTSTATUS )0x80000016L) { #line 3343 if(currentIrpStack->Flags & 0x02) { status = (NTSTATUS )0xC0000185L; goto PioneerRestart; } #line 3351 IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); #line 3355 (Irp->IoStatus).Information = 0; } } (Irp->IoStatus).Status = status; myStatus = status; IofCompleteRequest(Irp, 0); return status; } #line 3366 NTSTATUS CdAudioDenonDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 3391 PIO_STACK_LOCATION currentIrpStack = ((Irp->Tail).Overlay).CurrentStackLocation; #line 3392 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; PCDROM_TOC cdaudioDataOut = (Irp->AssociatedIrp).SystemBuffer; SCSI_PASS_THROUGH srb ; PCDB cdb = (PCDB )srb.Cdb; NTSTATUS status ; ULONG i , bytesTransfered ; PUCHAR Toc ; #line 3400 DenonRestart: #line 3406 memset(cdb, 0, 12); #line 3412 switch(((currentIrpStack->Parameters).DeviceIoControl).IoControlCode) { case 0x00000002 << 16 | 0x0001 << 14 | 0x000E << 2 | 0: #line 3414 ; #line 3420 status = (NTSTATUS )0xC0000010L; (Irp->IoStatus).Information = 0; break; #line 3424 case 0x00000002 << 16 | 0x0001 << 14 | 0x0000 << 2 | 0: #line 3424 ; #line 3427 ; #line 3434 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0])))) { #line 3437 status = (NTSTATUS )0xC0000023L; #line 3439 (Irp->IoStatus).Information = 0; break; } #line 3447 if(CdAudioIsPlayActive(DeviceObject)) { #line 3448 status = (NTSTATUS )0x80000011L; (Irp->IoStatus).Information = 0; break; } #line 3458 Toc = (PUCHAR )ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(CDROM_TOC ), ' AdC'); #line 3462 if(Toc == (void * )0) { status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 3474 memset(Toc, 0, sizeof(CDROM_TOC )); #line 3480 (cdb->CDB6GENERIC).OperationCode = 0xE9; srb.TimeOutValue = 10; srb.CdbLength = 6; status = SendSrbSynchronous(deviceExtension, & srb, Toc, sizeof(CDROM_TOC )); #line 3489 if(! ((NTSTATUS )status >= 0) && status != (NTSTATUS )0xC000003CL) { #line 3493 ; #line 3495 if(status != (NTSTATUS )0xC000003CL) { #line 3498 ; ExFreePool(Toc); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } } #line 3510 status = (NTSTATUS )0x00000000L; #line 3534 bytesTransfered = ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength > srb.DataTransferLength ? srb.DataTransferLength : ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength ; #line 3540 cdaudioDataOut->FirstTrack = ((Toc[1] & 0xF0) >> 4) * 10 + (Toc[1] & 0x0F); #line 3541 cdaudioDataOut->LastTrack = ((Toc[5] & 0xF0) >> 4) * 10 + (Toc[5] & 0x0F); { #line 3556 ULONG tracksToReturn ; ULONG tracksOnCd ; ULONG tracksInBuffer ; ULONG dataLength ; tracksOnCd = cdaudioDataOut->LastTrack - cdaudioDataOut->FirstTrack + 1; #line 3566 dataLength = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[tracksOnCd]))) - 2; #line 3567 (cdaudioDataOut->Length)[0] = (UCHAR )(dataLength >> 8); (cdaudioDataOut->Length)[1] = (UCHAR )(dataLength & 0xFF); tracksInBuffer = ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength - (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0]))); #line 3572 tracksInBuffer /= sizeof(TRACK_DATA ); #line 3575 tracksToReturn = tracksInBuffer < tracksOnCd ? tracksInBuffer : tracksOnCd; #line 3579 for(i = 0; i < tracksToReturn; i++) { #line 3585 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; ((cdaudioDataOut->TrackData)[i]).Control = Toc[i * 4 + 12]; #line 3587 ((cdaudioDataOut->TrackData)[i]).TrackNumber = (UCHAR )(i + cdaudioDataOut->FirstTrack); ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; (((cdaudioDataOut->TrackData)[i]).Address)[0] = 0; #line 3592 (((cdaudioDataOut->TrackData)[i]).Address)[1] = ((Toc[i * 4 + 13] & 0xF0) >> 4) * 10 + (Toc[i * 4 + 13] & 0x0F); #line 3594 (((cdaudioDataOut->TrackData)[i]).Address)[2] = ((Toc[i * 4 + 14] & 0xF0) >> 4) * 10 + (Toc[i * 4 + 14] & 0x0F); #line 3596 (((cdaudioDataOut->TrackData)[i]).Address)[3] = ((Toc[i * 4 + 15] & 0xF0) >> 4) * 10 + (Toc[i * 4 + 15] & 0x0F); #line 3605 ; } #line 3613 if(tracksInBuffer > tracksOnCd) { #line 3614 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; ((cdaudioDataOut->TrackData)[i]).Control = 0; ((cdaudioDataOut->TrackData)[i]).TrackNumber = 0xaa; #line 3617 ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; (((cdaudioDataOut->TrackData)[i]).Address)[0] = 0; #line 3619 (((cdaudioDataOut->TrackData)[i]).Address)[1] = ((Toc[9] & 0xF0) >> 4) * 10 + (Toc[9] & 0x0F); #line 3620 (((cdaudioDataOut->TrackData)[i]).Address)[2] = ((Toc[10] & 0xF0) >> 4) * 10 + (Toc[10] & 0x0F); #line 3621 (((cdaudioDataOut->TrackData)[i]).Address)[3] = ((Toc[11] & 0xF0) >> 4) * 10 + (Toc[11] & 0x0F); #line 3628 ; i++; } (Irp->IoStatus).Information = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[i]))); } #line 3639 deviceExtension->Paused = 0; deviceExtension->PausedM = 0; deviceExtension->PausedS = 0; deviceExtension->PausedF = 0; deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; #line 3651 ExFreePool(Toc); break; #line 3654 case 0x00000002 << 16 | 0x0001 << 14 | 0x0006 << 2 | 0: #line 3654 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x0002 << 2 | 0: #line 3655 ; { #line 3658 PCDROM_PLAY_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; #line 3661 (Irp->IoStatus).Information = 0; #line 3663 deviceExtension->PlayActive = 0; #line 3665 srb.CdbLength = 6; srb.TimeOutValue = 10; (cdb->CDB6GENERIC).OperationCode = 0xE7; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 3674 if((NTSTATUS )status >= 0) { deviceExtension->Paused = 0; deviceExtension->PausedM = 0; deviceExtension->PausedS = 0; deviceExtension->PausedF = 0; deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; } else { #line 3688 ; } #line 3693 if(((currentIrpStack->Parameters).DeviceIoControl).IoControlCode == (0x00000002 << 16 | 0x0001 << 14 | 0x0002 << 2 | 0)) { #line 3699 ; #line 3701 goto SetStatusAndReturn; } #line 3707 ; #line 3709 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_PLAY_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; break; } #line 3720 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->CDB10).OperationCode = 0x22; (cdb->CDB10).LogicalBlockByte0 = (inputBuffer->StartingM / 10 << 4) + inputBuffer->StartingM % 10; #line 3724 (cdb->CDB10).LogicalBlockByte1 = (inputBuffer->StartingS / 10 << 4) + inputBuffer->StartingS % 10; #line 3725 (cdb->CDB10).LogicalBlockByte2 = (inputBuffer->StartingF / 10 << 4) + inputBuffer->StartingF % 10; #line 3726 (cdb->CDB10).LogicalBlockByte3 = (inputBuffer->EndingM / 10 << 4) + inputBuffer->EndingM % 10; #line 3727 (cdb->CDB10).Reserved2 = (inputBuffer->EndingS / 10 << 4) + inputBuffer->EndingS % 10; #line 3728 (cdb->CDB10).TransferBlocksMsb = (inputBuffer->EndingF / 10 << 4) + inputBuffer->EndingF % 10; #line 3729 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 3735 if((NTSTATUS )status >= 0) { #line 3741 deviceExtension->PlayActive = 1; deviceExtension->Paused = 0; #line 3748 deviceExtension->LastEndM = (inputBuffer->EndingM / 10 << 4) + inputBuffer->EndingM % 10; #line 3749 deviceExtension->LastEndS = (inputBuffer->EndingS / 10 << 4) + inputBuffer->EndingS % 10; #line 3750 deviceExtension->LastEndF = (inputBuffer->EndingF / 10 << 4) + inputBuffer->EndingF % 10; #line 3755 ; } else { #line 3761 ; #line 3770 if(status == (NTSTATUS )0xC0000010L) { status = (NTSTATUS )0xC0000015L; } } } #line 3777 break; #line 3779 case 0x00000002 << 16 | 0x0001 << 14 | 0x0001 << 2 | 0: #line 3779 ; { #line 3782 PCDROM_SEEK_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; (Irp->IoStatus).Information = 0; #line 3786 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_SEEK_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; break; } #line 3796 ; #line 3802 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->CDB10).OperationCode = 0x22; (cdb->CDB10).LogicalBlockByte0 = (inputBuffer->M / 10 << 4) + inputBuffer->M % 10; #line 3806 (cdb->CDB10).LogicalBlockByte1 = (inputBuffer->S / 10 << 4) + inputBuffer->S % 10; #line 3807 (cdb->CDB10).LogicalBlockByte2 = (inputBuffer->F / 10 << 4) + inputBuffer->F % 10; #line 3808 (cdb->CDB10).LogicalBlockByte3 = (inputBuffer->M / 10 << 4) + inputBuffer->M % 10; #line 3809 (cdb->CDB10).Reserved2 = (inputBuffer->S / 10 << 4) + inputBuffer->S % 10; #line 3810 (cdb->CDB10).TransferBlocksMsb = (inputBuffer->F / 10 << 4) + inputBuffer->F % 10; #line 3811 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 3817 if((NTSTATUS )status >= 0) { deviceExtension->Paused = 1; deviceExtension->PausedM = (inputBuffer->M / 10 << 4) + inputBuffer->M % 10; #line 3821 deviceExtension->PausedS = (inputBuffer->S / 10 << 4) + inputBuffer->S % 10; #line 3822 deviceExtension->PausedF = (inputBuffer->F / 10 << 4) + inputBuffer->F % 10; #line 3823 deviceExtension->LastEndM = (inputBuffer->M / 10 << 4) + inputBuffer->M % 10; #line 3824 deviceExtension->LastEndS = (inputBuffer->S / 10 << 4) + inputBuffer->S % 10; #line 3825 deviceExtension->LastEndF = (inputBuffer->F / 10 << 4) + inputBuffer->F % 10; #line 3833 ; } else { #line 3839 ; #line 3848 if(status == (NTSTATUS )0xC0000010L) { status = (NTSTATUS )0xC0000015L; } } } #line 3855 break; #line 3857 case 0x00000002 << 16 | 0x0001 << 14 | 0x0003 << 2 | 0: #line 3857 ; { PUCHAR SubQPtr = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, 10, ' AdC'); #line 3864 (Irp->IoStatus).Information = 0; #line 3868 ; #line 3870 deviceExtension->PlayActive = 0; #line 3872 if(SubQPtr == (void * )0) { status = (NTSTATUS )0xC000009AL; goto SetStatusAndReturn; } #line 3883 if(deviceExtension->Paused == 1) { #line 3887 ; #line 3889 ExFreePool(SubQPtr); status = (NTSTATUS )0x00000000L; goto SetStatusAndReturn; } #line 3901 srb.CdbLength = 6; srb.TimeOutValue = 10; (cdb->CDB6GENERIC).OperationCode = 0xEB; ((cdb->CDB6GENERIC).CommandUniqueBytes)[2] = 10; status = SendSrbSynchronous(deviceExtension, & srb, SubQPtr, 10); #line 3910 if(! ((NTSTATUS )status >= 0)) { #line 3914 ; ExFreePool(SubQPtr); goto SetStatusAndReturn; } #line 3919 deviceExtension->PausedM = SubQPtr[7]; deviceExtension->PausedS = SubQPtr[8]; deviceExtension->PausedF = SubQPtr[9]; #line 3923 memset(cdb, 0, 12); srb.CdbLength = 6; srb.TimeOutValue = 10; (cdb->CDB6GENERIC).OperationCode = 0xE7; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 3932 if(! ((NTSTATUS )status >= 0)) { #line 3936 ; ExFreePool(SubQPtr); goto SetStatusAndReturn; } #line 3941 deviceExtension->Paused = 1; deviceExtension->PausedM = SubQPtr[7]; deviceExtension->PausedS = SubQPtr[8]; deviceExtension->PausedF = SubQPtr[9]; #line 3950 ; #line 3952 ExFreePool(SubQPtr); } break; #line 3956 case 0x00000002 << 16 | 0x0001 << 14 | 0x0004 << 2 | 0: #line 3956 ; #line 3964 ; #line 3966 (Irp->IoStatus).Information = 0; #line 3975 if(deviceExtension->Paused == 0) { status = (NTSTATUS )0xC0000001L; goto SetStatusAndReturn; } #line 3988 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->CDB10).OperationCode = 0x22; (cdb->CDB10).LogicalBlockByte0 = deviceExtension->PausedM; (cdb->CDB10).LogicalBlockByte1 = deviceExtension->PausedS; (cdb->CDB10).LogicalBlockByte2 = deviceExtension->PausedF; (cdb->CDB10).LogicalBlockByte3 = deviceExtension->LastEndM; (cdb->CDB10).Reserved2 = deviceExtension->LastEndS; (cdb->CDB10).TransferBlocksMsb = deviceExtension->LastEndF; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 4003 if((NTSTATUS )status >= 0) { deviceExtension->Paused = 0; } else { #line 4017 ; } #line 4020 break; #line 4022 case 0x00000002 << 16 | 0x0001 << 14 | 0x000B << 2 | 0: #line 4022 ; { PSUB_Q_CURRENT_POSITION userPtr = (Irp->AssociatedIrp).SystemBuffer; PUCHAR SubQPtr = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(SUB_Q_CHANNEL_DATA ), ' AdC'); #line 4033 ; #line 4035 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < sizeof(SUB_Q_CURRENT_POSITION )) { status = (NTSTATUS )0xC0000023L; #line 4040 (Irp->IoStatus).Information = 0; if(SubQPtr) #line 4041 ExFreePool(SubQPtr); break; } #line 4046 if(SubQPtr == (void * )0) { #line 4050 ; #line 4052 memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION )); #line 4053 status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 4059 if(((PCDROM_SUB_Q_DATA_FORMAT )userPtr)->Format != 0x01) { #line 4065 ; #line 4067 ExFreePool(SubQPtr); memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION )); #line 4069 status = (NTSTATUS )0xC0000001L; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 4078 srb.CdbLength = 6; srb.TimeOutValue = 10; (cdb->CDB6GENERIC).OperationCode = 0xEB; ((cdb->CDB6GENERIC).CommandUniqueBytes)[2] = 10; status = SendSrbSynchronous(deviceExtension, & srb, SubQPtr, 10); #line 4087 if((NTSTATUS )status >= 0) { (userPtr->Header).Reserved = 0; #line 4091 if(deviceExtension->Paused == 1) { deviceExtension->PlayActive = 0; (userPtr->Header).AudioStatus = 0x12; } else { if(SubQPtr[0] == 0x01) #line 4098 (userPtr->Header).AudioStatus = 0x11; else { #line 4100 if(SubQPtr[0] == 0x00) { #line 4101 (userPtr->Header).AudioStatus = 0x13; deviceExtension->PlayActive = 0; } else { #line 4106 deviceExtension->PlayActive = 0; } } } ((userPtr->Header).DataLength)[0] = 0; ((userPtr->Header).DataLength)[0] = 12; #line 4114 userPtr->FormatCode = 0x01; userPtr->Control = SubQPtr[1]; userPtr->ADR = 0; userPtr->TrackNumber = ((SubQPtr[2] & 0xF0) >> 4) * 10 + (SubQPtr[2] & 0x0F); #line 4118 userPtr->IndexNumber = ((SubQPtr[3] & 0xF0) >> 4) * 10 + (SubQPtr[3] & 0x0F); #line 4119 (userPtr->AbsoluteAddress)[0] = 0; (userPtr->AbsoluteAddress)[1] = ((SubQPtr[7] & 0xF0) >> 4) * 10 + (SubQPtr[7] & 0x0F); #line 4121 (userPtr->AbsoluteAddress)[2] = ((SubQPtr[8] & 0xF0) >> 4) * 10 + (SubQPtr[8] & 0x0F); #line 4122 (userPtr->AbsoluteAddress)[3] = ((SubQPtr[9] & 0xF0) >> 4) * 10 + (SubQPtr[9] & 0x0F); #line 4123 (userPtr->TrackRelativeAddress)[0] = 0; (userPtr->TrackRelativeAddress)[1] = ((SubQPtr[4] & 0xF0) >> 4) * 10 + (SubQPtr[4] & 0x0F); #line 4125 (userPtr->TrackRelativeAddress)[2] = ((SubQPtr[5] & 0xF0) >> 4) * 10 + (SubQPtr[5] & 0x0F); #line 4126 (userPtr->TrackRelativeAddress)[3] = ((SubQPtr[6] & 0xF0) >> 4) * 10 + (SubQPtr[6] & 0x0F); #line 4127 (Irp->IoStatus).Information = sizeof(SUB_Q_CURRENT_POSITION ); } else { #line 4133 ; (Irp->IoStatus).Information = 0; } #line 4138 ExFreePool(SubQPtr); } break; #line 4142 case 0x00000002 << 16 | 0x0001 << 14 | 0x0202 << 2 | 0: #line 4142 ; #line 4147 (Irp->IoStatus).Information = 0; #line 4151 ; #line 4153 deviceExtension->PlayActive = 0; #line 4155 srb.CdbLength = 6; srb.TimeOutValue = 10; (cdb->CDB6GENERIC).OperationCode = 0xE6; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 4163 break; #line 4165 case 0x00000002 << 16 | 0x0001 << 14 | 0x000D << 2 | 0: #line 4165 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x0005 << 2 | 0: #line 4166 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x000A << 2 | 0: #line 4167 ; ; (Irp->IoStatus).Information = 0; status = (NTSTATUS )0xC0000010L; break; #line 4173 case 0x00000002 << 16 | 0x0001 << 14 | 0x0200 << 2 | 0: #line 4173 ; #line 4179 CdAudioIsPlayActive(DeviceObject); #line 4181 default : #line 4181 ; #line 4183 ; return CdAudioSendToNextDriver(DeviceObject, Irp); break; } #line 4189 SetStatusAndReturn: { #line 4194 if(status == (NTSTATUS )0x80000016L) { #line 4201 if(currentIrpStack->Flags & 0x02) { status = (NTSTATUS )0xC0000185L; goto DenonRestart; } #line 4209 IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); #line 4213 (Irp->IoStatus).Information = 0; } } (Irp->IoStatus).Status = status; myStatus = status; IofCompleteRequest(Irp, 0); return status; } #line 4223 NTSTATUS CdAudioHitachiSendPauseCommand(PDEVICE_OBJECT DeviceObject ) { #line 4249 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; SCSI_PASS_THROUGH srb ; PHITACHICDB cdb = (PHITACHICDB )srb.Cdb; NTSTATUS status ; PUCHAR PausePos ; #line 4259 PausePos = (PUCHAR )ExAllocatePoolWithTag(NonPagedPoolCacheAligned, 3, ' AdC'); if(PausePos == (void * )0) { return (NTSTATUS )0xC000009AL; } #line 4267 memset(PausePos, 0, 3); #line 4273 memset(cdb, 0, 12); #line 4279 srb.CdbLength = 12; srb.TimeOutValue = 10; (cdb->PAUSE_AUDIO).OperationCode = 0xE1; status = SendSrbSynchronous(deviceExtension, & srb, PausePos, 3); #line 4288 ExFreePool(PausePos); #line 4290 return status; } NTSTATUS CdAudioHitachiDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 4318 PIO_STACK_LOCATION currentIrpStack = ((Irp->Tail).Overlay).CurrentStackLocation; #line 4319 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; PCDROM_TOC cdaudioDataOut = (Irp->AssociatedIrp).SystemBuffer; SCSI_PASS_THROUGH srb ; PHITACHICDB cdb = (PHITACHICDB )srb.Cdb; NTSTATUS status ; ULONG i , bytesTransfered ; PUCHAR Toc ; #line 4327 HitachiRestart: #line 4333 memset(cdb, 0, 12); #line 4339 switch(((currentIrpStack->Parameters).DeviceIoControl).IoControlCode) { case 0x00000002 << 16 | 0x0001 << 14 | 0x0000 << 2 | 0: #line 4341 ; #line 4344 ; #line 4351 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0])))) { #line 4354 status = (NTSTATUS )0xC0000023L; #line 4356 (Irp->IoStatus).Information = 0; break; } #line 4364 if(CdAudioIsPlayActive(DeviceObject)) { #line 4365 status = (NTSTATUS )0x80000011L; (Irp->IoStatus).Information = 0; break; } #line 4374 Toc = (PUCHAR )ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(CDROM_TOC ), ' AdC'); #line 4378 if(Toc == (void * )0) { status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 4390 memset(Toc, 0, sizeof(CDROM_TOC )); srb.CdbLength = 12; #line 4397 if(deviceExtension->Active == 5) { #line 4398 (cdb->READ_DISC_INFO).OperationCode = 0xE3; } else { #line 4400 (cdb->READ_DISC_INFO).OperationCode = 0xE8; } ((cdb->READ_DISC_INFO).AllocationLength)[0] = sizeof(CDROM_TOC ) >> 8; #line 4403 ((cdb->READ_DISC_INFO).AllocationLength)[1] = sizeof(CDROM_TOC ) & 0xFF; #line 4404 srb.TimeOutValue = 10; status = SendSrbSynchronous(deviceExtension, & srb, Toc, sizeof(CDROM_TOC )); #line 4411 if(! ((NTSTATUS )status >= 0) && status != (NTSTATUS )0xC000003CL) { #line 4415 ; #line 4418 if(status != (NTSTATUS )0xC000003CL) { #line 4421 ; ExFreePool(Toc); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } } else #line 4427 status = (NTSTATUS )0x00000000L; #line 4435 if(deviceExtension->Active == 6) { #line 4441 bytesTransfered = ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength > sizeof(CDROM_TOC ) ? sizeof(CDROM_TOC ) : ((currentIrpStack->Parameters).DeviceIoControl ).OutputBufferLength; #line 4447 cdaudioDataOut->FirstTrack = Toc[2]; cdaudioDataOut->LastTrack = Toc[3]; { #line 4463 ULONG tracksToReturn ; ULONG tracksOnCd ; ULONG tracksInBuffer ; ULONG dataLength ; tracksOnCd = cdaudioDataOut->LastTrack - cdaudioDataOut->FirstTrack + 1; #line 4470 dataLength = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[tracksOnCd]))) - 2; #line 4471 (cdaudioDataOut->Length)[0] = (UCHAR )(dataLength >> 8); #line 4472 (cdaudioDataOut->Length)[1] = (UCHAR )(dataLength & 0xFF); tracksInBuffer = ((currentIrpStack->Parameters).DeviceIoControl) .OutputBufferLength - (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0]))); #line 4476 tracksInBuffer /= sizeof(TRACK_DATA ); #line 4479 tracksToReturn = tracksInBuffer < tracksOnCd ? tracksInBuffer : tracksOnCd; #line 4482 for(i = 0; i < tracksToReturn; i++) { #line 4488 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; #line 4489 ((cdaudioDataOut->TrackData)[i]).Control = (Toc[i * 4 + 8] & 0x0F) << 4 | Toc[i * 4 + 8] >> 4; #line 4491 ((cdaudioDataOut->TrackData)[i]).TrackNumber = (UCHAR )(i + cdaudioDataOut->FirstTrack); ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; #line 4495 (((cdaudioDataOut->TrackData)[i]).Address )[0] = 0; #line 4496 (((cdaudioDataOut->TrackData)[i]).Address )[1] = Toc[i * 4 + 9]; #line 4497 (((cdaudioDataOut->TrackData)[i]).Address )[2] = Toc[i * 4 + 10]; #line 4498 (((cdaudioDataOut->TrackData)[i]).Address )[3] = Toc[i * 4 + 11]; #line 4506 ; } #line 4514 if(tracksInBuffer > tracksOnCd) { #line 4515 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; #line 4516 ((cdaudioDataOut->TrackData)[i]).Control = 0x10; #line 4517 ((cdaudioDataOut->TrackData)[i]).TrackNumber = 0xaa; #line 4518 ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; #line 4519 (((cdaudioDataOut->TrackData)[i]).Address )[0] = 0; #line 4520 (((cdaudioDataOut->TrackData)[i]).Address )[1] = Toc[5]; #line 4521 (((cdaudioDataOut->TrackData)[i]).Address )[2] = Toc[6]; #line 4522 (((cdaudioDataOut->TrackData)[i]).Address )[3] = Toc[7]; #line 4529 ; i++; } #line 4533 (Irp->IoStatus).Information = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[i]))); } #line 4541 deviceExtension->Paused = 0; deviceExtension->PausedM = 0; deviceExtension->PausedS = 0; deviceExtension->PausedF = 0; deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; } else { #line 4554 bytesTransfered = ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength > sizeof(CDROM_TOC ) ? sizeof(CDROM_TOC ) : ((currentIrpStack->Parameters).DeviceIoControl ).OutputBufferLength; #line 4560 cdaudioDataOut->FirstTrack = Toc[1]; cdaudioDataOut->LastTrack = Toc[2]; { #line 4576 ULONG tracksToReturn ; ULONG tracksOnCd ; ULONG tracksInBuffer ; ULONG dataLength ; #line 4581 tracksOnCd = cdaudioDataOut->LastTrack - cdaudioDataOut->FirstTrack + 1; dataLength = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[tracksOnCd]))) - 2; #line 4584 (cdaudioDataOut->Length)[0] = (UCHAR )(dataLength >> 8); #line 4585 (cdaudioDataOut->Length)[1] = (UCHAR )(dataLength & 0xFF); tracksInBuffer = ((currentIrpStack->Parameters).DeviceIoControl) .OutputBufferLength - (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0]))); #line 4589 tracksInBuffer /= sizeof(TRACK_DATA ); #line 4592 tracksToReturn = tracksInBuffer < tracksOnCd ? tracksInBuffer : tracksOnCd; #line 4596 for(i = 0; i < tracksToReturn; i++) { #line 4602 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; #line 4603 if(Toc[i * 3 + 6] & 0x80) #line 4603 ((cdaudioDataOut->TrackData)[i]) .Control = 0x04; else #line 4605 ((cdaudioDataOut->TrackData)[i]) .Control = 0; ((cdaudioDataOut->TrackData)[i]).Adr = 0; #line 4608 ((cdaudioDataOut->TrackData)[i]).TrackNumber = (UCHAR )(i + cdaudioDataOut->FirstTrack); ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; #line 4612 (((cdaudioDataOut->TrackData)[i]).Address )[0] = 0; #line 4613 (((cdaudioDataOut->TrackData)[i]).Address )[1] = Toc[i * 3 + 6] & 0x7f; #line 4614 (((cdaudioDataOut->TrackData)[i]).Address )[2] = Toc[i * 3 + 7]; #line 4615 (((cdaudioDataOut->TrackData)[i]).Address )[3] = Toc[i * 3 + 8]; #line 4623 ; } #line 4631 if(tracksInBuffer > tracksOnCd) { #line 4632 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; #line 4633 ((cdaudioDataOut->TrackData)[i]).Control = 0x10; #line 4634 ((cdaudioDataOut->TrackData)[i]).TrackNumber = 0xaa; #line 4635 ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; #line 4636 (((cdaudioDataOut->TrackData)[i]).Address )[0] = 0; #line 4637 (((cdaudioDataOut->TrackData)[i]).Address )[1] = Toc[3]; #line 4638 (((cdaudioDataOut->TrackData)[i]).Address )[2] = Toc[4]; #line 4639 (((cdaudioDataOut->TrackData)[i]).Address )[3] = Toc[5]; #line 4646 ; i++; } #line 4650 (Irp->IoStatus).Information = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[i]))); } } #line 4658 ExFreePool(Toc); break; #line 4661 case 0x00000002 << 16 | 0x0001 << 14 | 0x0002 << 2 | 0: #line 4661 ; #line 4663 deviceExtension->PlayActive = 0; (Irp->IoStatus).Information = 0; #line 4670 CdAudioHitachiSendPauseCommand(DeviceObject); #line 4676 deviceExtension->Paused = 0; deviceExtension->PausedM = 0; deviceExtension->PausedS = 0; deviceExtension->PausedF = 0; deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; #line 4684 return CdAudioSendToNextDriver(DeviceObject, Irp); break; #line 4687 case 0x00000002 << 16 | 0x0001 << 14 | 0x0006 << 2 | 0: #line 4687 ; { PCDROM_PLAY_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; #line 4692 (Irp->IoStatus).Information = 0; #line 4694 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_PLAY_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; break; } #line 4703 ; #line 4709 CdAudioHitachiSendPauseCommand(DeviceObject); #line 4715 srb.CdbLength = 12; srb.TimeOutValue = 10; (cdb->PLAY_AUDIO).OperationCode = 0xE0; (cdb->PLAY_AUDIO).Immediate = 1; (cdb->PLAY_AUDIO).StartingM = inputBuffer->StartingM; (cdb->PLAY_AUDIO).StartingS = inputBuffer->StartingS; (cdb->PLAY_AUDIO).StartingF = inputBuffer->StartingF; (cdb->PLAY_AUDIO).EndingM = inputBuffer->EndingM; (cdb->PLAY_AUDIO).EndingS = inputBuffer->EndingS; (cdb->PLAY_AUDIO).EndingF = inputBuffer->EndingF; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 4731 if((NTSTATUS )status >= 0) { #line 4737 deviceExtension->PlayActive = 1; #line 4739 deviceExtension->Paused = 0; #line 4746 deviceExtension->PausedM = inputBuffer->StartingM; #line 4747 deviceExtension->PausedS = inputBuffer->StartingS; #line 4748 deviceExtension->PausedF = inputBuffer->StartingF; #line 4749 deviceExtension->LastEndM = inputBuffer->EndingM; #line 4750 deviceExtension->LastEndS = inputBuffer->EndingS; #line 4751 deviceExtension->LastEndF = inputBuffer->EndingF; } else { #line 4757 ; } } #line 4761 break; #line 4763 case 0x00000002 << 16 | 0x0001 << 14 | 0x0001 << 2 | 0: #line 4763 ; { #line 4766 PCDROM_SEEK_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; (Irp->IoStatus).Information = 0; #line 4770 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_SEEK_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; break; } #line 4780 ; #line 4786 CdAudioHitachiSendPauseCommand(DeviceObject); #line 4796 srb.CdbLength = 12; srb.TimeOutValue = 10; (cdb->PLAY_AUDIO).OperationCode = 0xE0; (cdb->PLAY_AUDIO).Immediate = 1; (cdb->PLAY_AUDIO).StartingM = inputBuffer->M; (cdb->PLAY_AUDIO).StartingS = inputBuffer->S; (cdb->PLAY_AUDIO).StartingF = inputBuffer->F; (cdb->PLAY_AUDIO).EndingM = inputBuffer->M; (cdb->PLAY_AUDIO).EndingS = inputBuffer->S; (cdb->PLAY_AUDIO).EndingF = inputBuffer->F; #line 4807 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 4812 if((NTSTATUS )status >= 0) { deviceExtension->PausedM = inputBuffer->M; deviceExtension->PausedS = inputBuffer->S; deviceExtension->PausedF = inputBuffer->F; deviceExtension->LastEndM = inputBuffer->M; deviceExtension->LastEndS = inputBuffer->S; deviceExtension->LastEndF = inputBuffer->F; } else { #line 4825 ; } } #line 4829 break; #line 4831 case 0x00000002 << 16 | 0x0001 << 14 | 0x0003 << 2 | 0: #line 4831 ; { #line 4834 PUCHAR PausePos = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, 3, ' AdC'); #line 4836 (Irp->IoStatus).Information = 0; #line 4838 if(PausePos == (void * )0) { status = (NTSTATUS )0xC000009AL; goto SetStatusAndReturn; } #line 4845 deviceExtension->PlayActive = 0; #line 4847 memset(PausePos, 0, 3); #line 4851 ; #line 4857 srb.CdbLength = 12; srb.TimeOutValue = 10; (cdb->PAUSE_AUDIO).OperationCode = 0xE1; status = SendSrbSynchronous(deviceExtension, & srb, PausePos, 3); #line 4866 deviceExtension->Paused = 1; deviceExtension->PausedM = PausePos[0]; deviceExtension->PausedS = PausePos[1]; deviceExtension->PausedF = PausePos[2]; #line 4871 ExFreePool(PausePos); } break; #line 4875 case 0x00000002 << 16 | 0x0001 << 14 | 0x0004 << 2 | 0: #line 4875 ; #line 4879 ; #line 4881 (Irp->IoStatus).Information = 0; #line 4887 CdAudioHitachiSendPauseCommand(DeviceObject); #line 4897 srb.CdbLength = 12; srb.TimeOutValue = 10; (cdb->PLAY_AUDIO).OperationCode = 0xE0; (cdb->PLAY_AUDIO).Immediate = 1; (cdb->PLAY_AUDIO).StartingM = deviceExtension->PausedM; (cdb->PLAY_AUDIO).StartingS = deviceExtension->PausedS; (cdb->PLAY_AUDIO).StartingF = deviceExtension->PausedF; (cdb->PLAY_AUDIO).EndingM = deviceExtension->LastEndM; (cdb->PLAY_AUDIO).EndingS = deviceExtension->LastEndS; (cdb->PLAY_AUDIO).EndingF = deviceExtension->LastEndF; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 4913 if((NTSTATUS )status >= 0) { deviceExtension->Paused = 0; } #line 4919 break; #line 4921 case 0x00000002 << 16 | 0x0001 << 14 | 0x000B << 2 | 0: #line 4921 ; { #line 4924 PSUB_Q_CURRENT_POSITION userPtr = (Irp->AssociatedIrp).SystemBuffer; PUCHAR SubQPtr = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(SUB_Q_CHANNEL_DATA ), ' AdC'); #line 4931 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < sizeof(SUB_Q_CURRENT_POSITION )) { status = (NTSTATUS )0xC0000023L; #line 4936 (Irp->IoStatus).Information = 0; if(SubQPtr) #line 4937 ExFreePool(SubQPtr); break; } #line 4943 ; #line 4945 if(SubQPtr == (void * )0) { #line 4949 ; #line 4951 status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 4957 if(((PCDROM_SUB_Q_DATA_FORMAT )userPtr)->Format != 0x01) { #line 4963 ; #line 4965 ExFreePool(SubQPtr); status = (NTSTATUS )0xC0000001L; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 4975 srb.CdbLength = 12; srb.TimeOutValue = 10; (cdb->AUDIO_STATUS).OperationCode = 0xE5; #line 4979 Retry: status = SendSrbSynchronous(deviceExtension, & srb, SubQPtr, sizeof(SUB_Q_CHANNEL_DATA )); #line 4985 if((NTSTATUS )status >= 0 || status == (NTSTATUS )0xC000003CL) { #line 4996 if((SubQPtr[1] & 0x0F) != 1) #line 4996 goto Retry; #line 4999 (userPtr->Header).Reserved = 0; if(deviceExtension->Paused == 1) { deviceExtension->PlayActive = 0; (userPtr->Header).AudioStatus = 0x12; } else { #line 5005 if(SubQPtr[0] == 0x01) #line 5005 (userPtr->Header).AudioStatus = 0x11; else { #line 5007 if(SubQPtr[0] == 0x00) { #line 5008 (userPtr->Header).AudioStatus = 0x13; #line 5009 deviceExtension->PlayActive = 0; } else { #line 5012 deviceExtension->PlayActive = 0; } } } #line 5015 ((userPtr->Header).DataLength)[0] = 0; ((userPtr->Header).DataLength)[0] = 12; #line 5018 userPtr->FormatCode = 0x01; userPtr->Control = (SubQPtr[1] & 0xF0) >> 4; userPtr->ADR = SubQPtr[1] & 0x0F; userPtr->TrackNumber = SubQPtr[2]; userPtr->IndexNumber = SubQPtr[3]; (userPtr->AbsoluteAddress)[0] = 0; (userPtr->AbsoluteAddress)[1] = SubQPtr[8]; (userPtr->AbsoluteAddress)[2] = SubQPtr[9]; (userPtr->AbsoluteAddress)[3] = SubQPtr[10]; (userPtr->TrackRelativeAddress)[0] = 0; (userPtr->TrackRelativeAddress)[1] = SubQPtr[4]; (userPtr->TrackRelativeAddress)[2] = SubQPtr[5]; (userPtr->TrackRelativeAddress)[3] = SubQPtr[6]; (Irp->IoStatus).Information = sizeof(SUB_Q_CURRENT_POSITION ); #line 5032 status = (NTSTATUS )0x00000000L; } else { (Irp->IoStatus).Information = 0; #line 5040 ; } #line 5044 ExFreePool(SubQPtr); } #line 5047 break; #line 5049 case 0x00000002 << 16 | 0x0001 << 14 | 0x0202 << 2 | 0: #line 5049 ; { #line 5052 PUCHAR EjectStatus = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, 1, ' AdC'); #line 5054 (Irp->IoStatus).Information = 0; #line 5056 if(EjectStatus == (void * )0) { status = (NTSTATUS )0xC000009AL; goto SetStatusAndReturn; } #line 5063 deviceExtension->PlayActive = 0; #line 5067 ; #line 5073 srb.CdbLength = 12; srb.TimeOutValue = 10; (cdb->EJECT).OperationCode = 0xE4; (cdb->EJECT).Eject = 1; status = SendSrbSynchronous(deviceExtension, & srb, EjectStatus, 1); #line 5082 if((NTSTATUS )status >= 0) { deviceExtension->Paused = 0; deviceExtension->PausedM = 0; deviceExtension->PausedS = 0; deviceExtension->PausedF = 0; deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; } #line 5094 ExFreePool(EjectStatus); } break; #line 5098 case 0x00000002 << 16 | 0x0001 << 14 | 0x000D << 2 | 0: #line 5098 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x0005 << 2 | 0: #line 5099 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x000A << 2 | 0: #line 5100 ; #line 5102 ; (Irp->IoStatus).Information = 0; status = (NTSTATUS )0xC0000010L; break; #line 5107 case 0x00000002 << 16 | 0x0001 << 14 | 0x0200 << 2 | 0: #line 5107 ; #line 5113 CdAudioIsPlayActive(DeviceObject); #line 5115 default : #line 5115 ; #line 5117 ; return CdAudioSendToNextDriver(DeviceObject, Irp); break; } #line 5123 SetStatusAndReturn: { #line 5129 if(status == (NTSTATUS )0x80000016L) { #line 5136 if(currentIrpStack->Flags & 0x02) { status = (NTSTATUS )0xC0000185L; goto HitachiRestart; } #line 5144 IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); #line 5148 (Irp->IoStatus).Information = 0; } } (Irp->IoStatus).Status = status; myStatus = status; IofCompleteRequest(Irp, 0); return status; } #line 5158 NTSTATUS CdAudio535DeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 5183 PIO_STACK_LOCATION currentIrpStack = ((Irp->Tail).Overlay).CurrentStackLocation; #line 5184 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; PCDROM_TOC cdaudioDataOut = (Irp->AssociatedIrp).SystemBuffer; SCSI_PASS_THROUGH srb ; PREAD_CAPACITY_DATA lastSession ; PCDB cdb = (PCDB )srb.Cdb; NTSTATUS status ; ULONG i , bytesTransfered ; PUCHAR Toc ; ULONG destblock ; #line 5199 memset(cdb, 0, 12); #line 5205 switch(((currentIrpStack->Parameters).DeviceIoControl).IoControlCode) { case 0x00000002 << 16 | 0x0001 << 14 | 0x000E << 2 | 0: #line 5207 ; #line 5213 if(CdAudioIsPlayActive(DeviceObject)) { #line 5214 status = (NTSTATUS )0x80000011L; (Irp->IoStatus).Information = 0; break; } #line 5219 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[1])))) { #line 5221 status = (NTSTATUS )0xC0000023L; #line 5223 (Irp->IoStatus).Information = 0; break; } #line 5231 lastSession = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(READ_CAPACITY_DATA ), ' AdC'); #line 5235 if(lastSession == (void * )0) { status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 5247 memset(lastSession, 0, sizeof(READ_CAPACITY_DATA )); srb.CdbLength = 10; #line 5254 (cdb->CDB10).OperationCode = 0x26; srb.TimeOutValue = 10; status = SendSrbSynchronous(deviceExtension, & srb, lastSession, sizeof(READ_CAPACITY_DATA )); #line 5262 if(! ((NTSTATUS )status >= 0)) { #line 5266 ; #line 5269 ExFreePool(lastSession); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } else { status = (NTSTATUS )0x00000000L; } #line 5282 bytesTransfered = (LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[1])); #line 5283 (Irp->IoStatus).Information = bytesTransfered; #line 5285 memset(cdaudioDataOut, 0, bytesTransfered); #line 5287 (cdaudioDataOut->Length)[0] = (UCHAR )(bytesTransfered - 2 >> 8); #line 5288 (cdaudioDataOut->Length)[1] = (UCHAR )(bytesTransfered - 2 & 0xFF); #line 5294 if(lastSession->LogicalBlockAddress == 0) { #line 5300 ExFreePool(lastSession); break; } #line 5308 cdaudioDataOut->FirstTrack = 1; cdaudioDataOut->LastTrack = 2; #line 5316 ; #line 5323 * (ULONG * )(& (((cdaudioDataOut->TrackData)[0]).Address)[0]) = lastSession->LogicalBlockAddress; #line 5330 ExFreePool(lastSession); break; #line 5333 case 0x00000002 << 16 | 0x0001 << 14 | 0x0000 << 2 | 0: #line 5333 ; #line 5336 ; #line 5343 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0])))) { #line 5346 status = (NTSTATUS )0xC0000023L; #line 5348 (Irp->IoStatus).Information = 0; break; } #line 5356 if(CdAudioIsPlayActive(DeviceObject)) { #line 5357 status = (NTSTATUS )0x80000011L; (Irp->IoStatus).Information = 0; break; } #line 5366 Toc = (PUCHAR )ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(CDROM_TOC ), ' AdC'); #line 5370 if(Toc == (void * )0) { status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 5382 memset(Toc, 0, sizeof(CDROM_TOC )); #line 5388 (cdb->CDB10).OperationCode = 0x43; (cdb->CDB10).Reserved1 = 1; (cdb->CDB10).TransferBlocksMsb = sizeof(CDROM_TOC ) >> 8; (cdb->CDB10).TransferBlocksLsb = sizeof(CDROM_TOC ) & 0xFF; srb.TimeOutValue = 10; srb.CdbLength = 10; status = SendSrbSynchronous(deviceExtension, & srb, Toc, sizeof(CDROM_TOC )); #line 5400 if(! ((NTSTATUS )status >= 0) && status != (NTSTATUS )0xC000003CL) { #line 5404 ; #line 5406 if(status != (NTSTATUS )0xC000003CL) { #line 5409 ; ExFreePool(Toc); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } } else { status = (NTSTATUS )0x00000000L; } #line 5424 bytesTransfered = ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength > sizeof(CDROM_TOC ) ? sizeof(CDROM_TOC ) : ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength ; #line 5430 (cdaudioDataOut->Length)[0] = Toc[0]; (cdaudioDataOut->Length)[1] = Toc[1]; cdaudioDataOut->FirstTrack = ((Toc[2] & 0xF0) >> 4) * 10 + (Toc[2] & 0x0F); #line 5433 cdaudioDataOut->LastTrack = ((Toc[3] & 0xF0) >> 4) * 10 + (Toc[3] & 0x0F); { #line 5449 ULONG tracksToReturn ; ULONG tracksOnCd ; ULONG tracksInBuffer ; tracksOnCd = cdaudioDataOut->LastTrack - cdaudioDataOut->FirstTrack + 1; #line 5453 tracksInBuffer = ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength - (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0]))); #line 5455 tracksInBuffer /= sizeof(TRACK_DATA ); #line 5458 tracksToReturn = tracksInBuffer < tracksOnCd ? tracksInBuffer : tracksOnCd; #line 5462 for(i = 0; i < tracksToReturn; i++) { #line 5468 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; ((cdaudioDataOut->TrackData)[i]).Control = Toc[i * 8 + 4 + 1]; #line 5470 ((cdaudioDataOut->TrackData)[i]).TrackNumber = ((Toc[i * 8 + 4 + 2] & 0xF0) >> 4) * 10 + (Toc[i * 8 + 4 + 2] & 0x0F); #line 5472 ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; (((cdaudioDataOut->TrackData)[i]).Address)[0] = 0; #line 5474 (((cdaudioDataOut->TrackData)[i]).Address)[1] = Toc[i * 8 + 4 + 5]; #line 5475 (((cdaudioDataOut->TrackData)[i]).Address)[2] = Toc[i * 8 + 4 + 6]; #line 5476 (((cdaudioDataOut->TrackData)[i]).Address)[3] = Toc[i * 8 + 4 + 7]; #line 5483 ; } #line 5491 if(tracksInBuffer > tracksOnCd) { #line 5492 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; ((cdaudioDataOut->TrackData)[i]).Control = Toc[i * 8 + 4 + 1]; #line 5494 ((cdaudioDataOut->TrackData)[i]).TrackNumber = Toc[i * 8 + 4 + 2]; #line 5495 ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; (((cdaudioDataOut->TrackData)[i]).Address)[0] = 0; #line 5497 (((cdaudioDataOut->TrackData)[i]).Address)[1] = Toc[i * 8 + 4 + 5]; #line 5498 (((cdaudioDataOut->TrackData)[i]).Address)[2] = Toc[i * 8 + 4 + 6]; #line 5499 (((cdaudioDataOut->TrackData)[i]).Address)[3] = Toc[i * 8 + 4 + 7]; #line 5506 ; i++; } #line 5510 (Irp->IoStatus).Information = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[i]))); } #line 5518 ExFreePool(Toc); break; #line 5521 case 0x00000002 << 16 | 0x0001 << 14 | 0x000B << 2 | 0: #line 5521 ; { PSUB_Q_CURRENT_POSITION userPtr = (Irp->AssociatedIrp).SystemBuffer; PUCHAR SubQPtr = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(SUB_Q_CURRENT_POSITION ), ' AdC'); #line 5530 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < sizeof(SUB_Q_CURRENT_POSITION )) { status = (NTSTATUS )0xC0000023L; #line 5535 (Irp->IoStatus).Information = 0; if(SubQPtr) #line 5536 ExFreePool(SubQPtr); break; } #line 5543 ; #line 5545 if(SubQPtr == (void * )0) { #line 5549 ; #line 5551 memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION )); #line 5552 status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 5558 if(((PCDROM_SUB_Q_DATA_FORMAT )userPtr)->Format != 0x01) { #line 5564 ; #line 5566 ExFreePool(SubQPtr); memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION )); #line 5568 status = (NTSTATUS )0xC0000001L; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 5577 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->SUBCHANNEL).OperationCode = 0x42; (cdb->SUBCHANNEL).Msf = 1; (cdb->SUBCHANNEL).SubQ = 1; (cdb->SUBCHANNEL).Format = 1; ((cdb->SUBCHANNEL).AllocationLength)[1] = sizeof(SUB_Q_CURRENT_POSITION ); #line 5584 status = SendSrbSynchronous(deviceExtension, & srb, SubQPtr, sizeof(SUB_Q_CURRENT_POSITION )); #line 5594 if((NTSTATUS )status >= 0) { #line 5595 if(SubQPtr[1] == 0x11) #line 5595 deviceExtension->PlayActive = 1; else #line 5596 deviceExtension->PlayActive = 0; #line 5598 (userPtr->Header).Reserved = 0; (userPtr->Header).AudioStatus = SubQPtr[1]; ((userPtr->Header).DataLength)[0] = 0; ((userPtr->Header).DataLength)[1] = 12; userPtr->FormatCode = 0x01; userPtr->Control = SubQPtr[5]; userPtr->ADR = 0; userPtr->TrackNumber = ((SubQPtr[6] & 0xF0) >> 4) * 10 + (SubQPtr[6] & 0x0F); #line 5606 userPtr->IndexNumber = ((SubQPtr[7] & 0xF0) >> 4) * 10 + (SubQPtr[7] & 0x0F); #line 5607 (userPtr->AbsoluteAddress)[0] = 0; (userPtr->AbsoluteAddress)[1] = SubQPtr[9]; (userPtr->AbsoluteAddress)[2] = SubQPtr[10]; (userPtr->AbsoluteAddress)[3] = SubQPtr[11]; (userPtr->TrackRelativeAddress)[0] = 0; (userPtr->TrackRelativeAddress)[1] = SubQPtr[13]; #line 5613 (userPtr->TrackRelativeAddress)[2] = SubQPtr[14]; #line 5614 (userPtr->TrackRelativeAddress)[3] = SubQPtr[15]; #line 5615 (Irp->IoStatus).Information = sizeof(SUB_Q_CURRENT_POSITION ); } else { #line 5617 (Irp->IoStatus).Information = 0; #line 5621 ; } #line 5624 ExFreePool(SubQPtr); } break; #line 5628 case 0x00000002 << 16 | 0x0001 << 14 | 0x0006 << 2 | 0: #line 5628 ; { PCDROM_PLAY_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; (Irp->IoStatus).Information = 0; #line 5638 ; #line 5640 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_PLAY_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; break; } #line 5647 if(inputBuffer->StartingM == inputBuffer->EndingM && inputBuffer->StartingS == inputBuffer->EndingS && inputBuffer->StartingF == inputBuffer->EndingF) { #line 5651 (cdb->PAUSE_RESUME).OperationCode = 0x4B; (cdb->PAUSE_RESUME).Action = 0; } else { #line 5655 (cdb->PLAY_AUDIO_MSF).OperationCode = 0x47; #line 5657 (cdb->PLAY_AUDIO_MSF).StartingM = inputBuffer->StartingM; #line 5658 (cdb->PLAY_AUDIO_MSF).StartingS = inputBuffer->StartingS; #line 5659 (cdb->PLAY_AUDIO_MSF).StartingF = inputBuffer->StartingF; (cdb->PLAY_AUDIO_MSF).EndingM = inputBuffer->EndingM; #line 5662 (cdb->PLAY_AUDIO_MSF).EndingS = inputBuffer->EndingS; #line 5663 (cdb->PLAY_AUDIO_MSF).EndingF = inputBuffer->EndingF; } #line 5667 srb.CdbLength = 10; #line 5673 srb.TimeOutValue = 10; #line 5675 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 5680 if((NTSTATUS )status >= 0 && (cdb->PLAY_AUDIO_MSF).OperationCode == 0x47) { #line 5682 deviceExtension->PlayActive = 1; } } #line 5686 break; #line 5688 case 0x00000002 << 16 | 0x0001 << 14 | 0x0001 << 2 | 0: #line 5688 ; { #line 5691 PCDROM_SEEK_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; #line 5695 ; (Irp->IoStatus).Information = 0; #line 5698 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_SEEK_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; break; } #line 5711 destblock = ((ULONG )inputBuffer->M * 60 + (ULONG )inputBuffer->S) * 75 + (ULONG )inputBuffer->F - 150; #line 5716 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->SEEK).OperationCode = 0x2B; ((cdb->SEEK).LogicalBlockAddress)[0] = (UCHAR )(destblock >> 24) & 0xFF; #line 5720 ((cdb->SEEK).LogicalBlockAddress)[1] = (UCHAR )(destblock >> 16) & 0xFF; #line 5721 ((cdb->SEEK).LogicalBlockAddress)[2] = (UCHAR )(destblock >> 8) & 0xFF; #line 5722 ((cdb->SEEK).LogicalBlockAddress)[3] = (UCHAR )(destblock & 0xFF); #line 5723 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 5729 if(! ((NTSTATUS )status >= 0)) { #line 5733 ; } } #line 5737 break; #line 5739 case 0x00000002 << 16 | 0x0001 << 14 | 0x0202 << 2 | 0: #line 5739 ; #line 5747 ; (Irp->IoStatus).Information = 0; #line 5750 deviceExtension->PlayActive = 0; #line 5752 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->CDB10).OperationCode = 0xC0; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 5760 break; #line 5762 case 0x00000002 << 16 | 0x0001 << 14 | 0x000D << 2 | 0: #line 5762 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x0005 << 2 | 0: #line 5763 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x000A << 2 | 0: #line 5764 ; ; (Irp->IoStatus).Information = 0; status = (NTSTATUS )0xC0000010L; break; #line 5770 case 0x00000002 << 16 | 0x0001 << 14 | 0x0200 << 2 | 0: #line 5770 ; #line 5776 CdAudioIsPlayActive(DeviceObject); #line 5778 default : #line 5778 ; #line 5780 ; return CdAudioSendToNextDriver(DeviceObject, Irp); break; } #line 5786 SetStatusAndReturn: { #line 5791 if(status == (NTSTATUS )0x80000016L) { IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); #line 5797 (Irp->IoStatus).Information = 0; } } (Irp->IoStatus).Status = status; myStatus = status; IofCompleteRequest(Irp, 0); return status; } #line 5808 NTSTATUS CdAudio435DeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 5833 PIO_STACK_LOCATION currentIrpStack = ((Irp->Tail).Overlay).CurrentStackLocation; #line 5834 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; PCDROM_TOC cdaudioDataOut = (Irp->AssociatedIrp).SystemBuffer; SCSI_PASS_THROUGH srb ; PCDB cdb = (PCDB )srb.Cdb; NTSTATUS status ; ULONG i , bytesTransfered ; PUCHAR Toc ; #line 5846 memset(cdb, 0, 12); #line 5852 switch(((currentIrpStack->Parameters).DeviceIoControl).IoControlCode) { case 0x00000002 << 16 | 0x0001 << 14 | 0x0000 << 2 | 0: #line 5854 ; #line 5857 ; #line 5864 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0])))) { #line 5867 status = (NTSTATUS )0xC0000023L; (Irp->IoStatus).Information = 0; break; } #line 5877 if(CdAudioIsPlayActive(DeviceObject)) { #line 5878 status = (NTSTATUS )0x80000011L; (Irp->IoStatus).Information = 0; break; } #line 5887 Toc = (PUCHAR )ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(CDROM_TOC ), ' AdC'); #line 5891 if(Toc == (void * )0) { status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 5903 memset(Toc, 0, sizeof(CDROM_TOC )); #line 5909 (cdb->READ_TOC).OperationCode = 0x43; (cdb->READ_TOC).Msf = 1; ((cdb->READ_TOC).AllocationLength)[0] = sizeof(CDROM_TOC ) >> 8; ((cdb->READ_TOC).AllocationLength)[1] = sizeof(CDROM_TOC ) & 0xFF; #line 5913 srb.TimeOutValue = 10; srb.CdbLength = 10; status = SendSrbSynchronous(deviceExtension, & srb, Toc, sizeof(CDROM_TOC )); #line 5921 if(! ((NTSTATUS )status >= 0) && status != (NTSTATUS )0xC000003CL) { #line 5925 ; #line 5927 if(status != (NTSTATUS )0xC000003CL) { #line 5930 ; ExFreePool(Toc); (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } } else { status = (NTSTATUS )0x00000000L; } #line 5945 bytesTransfered = ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength > sizeof(CDROM_TOC ) ? sizeof(CDROM_TOC ) : ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength ; #line 5951 (cdaudioDataOut->Length)[0] = Toc[0]; (cdaudioDataOut->Length)[1] = Toc[1]; cdaudioDataOut->FirstTrack = ((Toc[2] & 0xF0) >> 4) * 10 + (Toc[2] & 0x0F); #line 5954 cdaudioDataOut->LastTrack = ((Toc[3] & 0xF0) >> 4) * 10 + (Toc[3] & 0x0F); { #line 5969 ULONG tracksToReturn ; ULONG tracksOnCd ; ULONG tracksInBuffer ; tracksOnCd = cdaudioDataOut->LastTrack - cdaudioDataOut->FirstTrack + 1; #line 5973 tracksInBuffer = ((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength - (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[0]))); #line 5975 tracksInBuffer /= sizeof(TRACK_DATA ); #line 5978 tracksToReturn = tracksInBuffer < tracksOnCd ? tracksInBuffer : tracksOnCd; #line 5982 for(i = 0; i < tracksToReturn; i++) { #line 5987 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; ((cdaudioDataOut->TrackData)[i]).Control = Toc[i * 8 + 4 + 1]; #line 5989 ((cdaudioDataOut->TrackData)[i]).TrackNumber = ((Toc[i * 8 + 4 + 2] & 0xF0) >> 4) * 10 + (Toc[i * 8 + 4 + 2] & 0x0F); #line 5991 ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; (((cdaudioDataOut->TrackData)[i]).Address)[0] = 0; #line 5993 (((cdaudioDataOut->TrackData)[i]).Address)[1] = Toc[i * 8 + 4 + 5]; #line 5994 (((cdaudioDataOut->TrackData)[i]).Address)[2] = Toc[i * 8 + 4 + 6]; #line 5995 (((cdaudioDataOut->TrackData)[i]).Address)[3] = Toc[i * 8 + 4 + 7]; #line 6003 ; } #line 6011 if(tracksInBuffer > tracksOnCd) { #line 6012 ((cdaudioDataOut->TrackData)[i]).Reserved = 0; ((cdaudioDataOut->TrackData)[i]).Control = Toc[i * 8 + 4 + 1]; #line 6014 ((cdaudioDataOut->TrackData)[i]).TrackNumber = Toc[i * 8 + 4 + 2]; #line 6015 ((cdaudioDataOut->TrackData)[i]).Reserved1 = 0; (((cdaudioDataOut->TrackData)[i]).Address)[0] = 0; #line 6017 (((cdaudioDataOut->TrackData)[i]).Address)[1] = Toc[i * 8 + 4 + 5]; #line 6018 (((cdaudioDataOut->TrackData)[i]).Address)[2] = Toc[i * 8 + 4 + 6]; #line 6019 (((cdaudioDataOut->TrackData)[i]).Address)[3] = Toc[i * 8 + 4 + 7]; #line 6026 ; i++; } #line 6030 (Irp->IoStatus).Information = (ULONG )((LONG )((LONG_PTR )(& (((CDROM_TOC * )0)->TrackData)[i]))); } #line 6038 deviceExtension->Paused = 0; deviceExtension->PausedM = 0; deviceExtension->PausedS = 0; deviceExtension->PausedF = 0; deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; #line 6050 ExFreePool(Toc); break; #line 6053 case 0x00000002 << 16 | 0x0001 << 14 | 0x0006 << 2 | 0: #line 6053 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x0002 << 2 | 0: #line 6054 ; { #line 6057 PCDROM_PLAY_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; #line 6060 (Irp->IoStatus).Information = 0; #line 6062 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->CDB10).OperationCode = 0xC6; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 6071 if((NTSTATUS )status >= 0) { deviceExtension->PlayActive = 0; #line 6075 deviceExtension->Paused = 0; deviceExtension->PausedM = 0; deviceExtension->PausedS = 0; deviceExtension->PausedF = 0; deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; } else { #line 6087 ; } #line 6092 if(((currentIrpStack->Parameters).DeviceIoControl).IoControlCode == (0x00000002 << 16 | 0x0001 << 14 | 0x0002 << 2 | 0)) { #line 6098 ; #line 6100 goto SetStatusAndReturn; } #line 6106 ; #line 6108 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_PLAY_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; break; } #line 6119 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->PLAY_AUDIO_MSF).OperationCode = 0x47; #line 6123 (cdb->PLAY_AUDIO_MSF).StartingM = inputBuffer->StartingM; #line 6124 (cdb->PLAY_AUDIO_MSF).StartingS = inputBuffer->StartingS; #line 6125 (cdb->PLAY_AUDIO_MSF).StartingF = inputBuffer->StartingF; #line 6126 (cdb->PLAY_AUDIO_MSF).EndingM = inputBuffer->EndingM; (cdb->PLAY_AUDIO_MSF).EndingS = inputBuffer->EndingS; (cdb->PLAY_AUDIO_MSF).EndingF = inputBuffer->EndingF; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 6135 if((NTSTATUS )status >= 0) { deviceExtension->PlayActive = 1; #line 6139 deviceExtension->Paused = 0; #line 6145 deviceExtension->LastEndM = inputBuffer->EndingM; #line 6146 deviceExtension->LastEndS = inputBuffer->EndingS; #line 6147 deviceExtension->LastEndF = inputBuffer->EndingF; #line 6152 ; } else { #line 6158 ; } } #line 6162 break; #line 6164 case 0x00000002 << 16 | 0x0001 << 14 | 0x0001 << 2 | 0: #line 6164 ; { #line 6167 PCDROM_SEEK_AUDIO_MSF inputBuffer = (Irp->AssociatedIrp).SystemBuffer; (Irp->IoStatus).Information = 0; #line 6173 ; #line 6175 if(((currentIrpStack->Parameters).DeviceIoControl).InputBufferLength < sizeof(CDROM_SEEK_AUDIO_MSF )) { status = (NTSTATUS )0xC0000004L; break; } #line 6186 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->CDB10).OperationCode = 0x47; (cdb->PLAY_AUDIO_MSF).StartingM = inputBuffer->M; (cdb->PLAY_AUDIO_MSF).StartingS = inputBuffer->S; (cdb->PLAY_AUDIO_MSF).StartingF = inputBuffer->F; (cdb->PLAY_AUDIO_MSF).EndingM = inputBuffer->M; (cdb->PLAY_AUDIO_MSF).EndingS = inputBuffer->S; (cdb->PLAY_AUDIO_MSF).EndingF = inputBuffer->F; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 6201 if((NTSTATUS )status >= 0) { deviceExtension->Paused = 1; deviceExtension->PausedM = inputBuffer->M; deviceExtension->PausedS = inputBuffer->S; deviceExtension->PausedF = inputBuffer->F; deviceExtension->LastEndM = inputBuffer->M; deviceExtension->LastEndS = inputBuffer->S; deviceExtension->LastEndF = inputBuffer->F; #line 6217 ; } else { #line 6223 ; #line 6232 if(status == (NTSTATUS )0xC0000010L) { status = (NTSTATUS )0xC0000015L; } } } #line 6239 break; #line 6241 case 0x00000002 << 16 | 0x0001 << 14 | 0x0003 << 2 | 0: #line 6241 ; { PUCHAR SubQPtr = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(SUB_Q_CHANNEL_DATA ), ' AdC'); #line 6248 (Irp->IoStatus).Information = 0; #line 6252 ; #line 6254 if(SubQPtr == (void * )0) { status = (NTSTATUS )0xC000009AL; goto SetStatusAndReturn; } #line 6265 if(deviceExtension->Paused == 1) { #line 6269 ; #line 6271 ExFreePool(SubQPtr); status = (NTSTATUS )0x00000000L; goto SetStatusAndReturn; } #line 6283 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->SUBCHANNEL).OperationCode = 0x42; (cdb->SUBCHANNEL).Msf = 1; (cdb->SUBCHANNEL).SubQ = 1; ((cdb->SUBCHANNEL).AllocationLength)[1] = sizeof(SUB_Q_CHANNEL_DATA ); #line 6289 status = SendSrbSynchronous(deviceExtension, & srb, SubQPtr, sizeof(SUB_Q_CHANNEL_DATA )); #line 6294 if(! ((NTSTATUS )status >= 0)) { #line 6298 ; ExFreePool(SubQPtr); goto SetStatusAndReturn; } #line 6303 deviceExtension->PausedM = SubQPtr[9]; deviceExtension->PausedS = SubQPtr[10]; deviceExtension->PausedF = SubQPtr[11]; #line 6310 memset(cdb, 0, 12); srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->CDB10).OperationCode = 0xC6; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 6319 if(! ((NTSTATUS )status >= 0)) { #line 6323 ; ExFreePool(SubQPtr); goto SetStatusAndReturn; } #line 6328 deviceExtension->PlayActive = 0; #line 6330 deviceExtension->Paused = 1; deviceExtension->PausedM = SubQPtr[9]; deviceExtension->PausedS = SubQPtr[10]; deviceExtension->PausedF = SubQPtr[11]; #line 6339 ; #line 6341 ExFreePool(SubQPtr); } break; #line 6345 case 0x00000002 << 16 | 0x0001 << 14 | 0x0004 << 2 | 0: #line 6345 ; #line 6353 ; #line 6355 (Irp->IoStatus).Information = 0; #line 6364 if(deviceExtension->Paused == 0) { #line 6365 status = (NTSTATUS )0xC0000001L; goto SetStatusAndReturn; } #line 6374 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->PLAY_AUDIO_MSF).OperationCode = 0x47; (cdb->PLAY_AUDIO_MSF).StartingM = deviceExtension->PausedM; (cdb->PLAY_AUDIO_MSF).StartingS = deviceExtension->PausedS; (cdb->PLAY_AUDIO_MSF).StartingF = deviceExtension->PausedF; (cdb->PLAY_AUDIO_MSF).EndingM = deviceExtension->LastEndM; (cdb->PLAY_AUDIO_MSF).EndingS = deviceExtension->LastEndS; (cdb->PLAY_AUDIO_MSF).EndingF = deviceExtension->LastEndF; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 6389 if((NTSTATUS )status >= 0) { deviceExtension->PlayActive = 1; #line 6393 deviceExtension->Paused = 0; } else { #line 6405 ; } #line 6408 break; #line 6410 case 0x00000002 << 16 | 0x0001 << 14 | 0x000B << 2 | 0: #line 6410 ; { PSUB_Q_CURRENT_POSITION userPtr = (Irp->AssociatedIrp).SystemBuffer; PUCHAR SubQPtr = ExAllocatePoolWithTag(NonPagedPoolCacheAligned, sizeof(SUB_Q_CHANNEL_DATA ), ' AdC'); #line 6419 if(((currentIrpStack->Parameters).DeviceIoControl).OutputBufferLength < sizeof(SUB_Q_CURRENT_POSITION )) { status = (NTSTATUS )0xC0000023L; (Irp->IoStatus).Information = 0; if(SubQPtr) #line 6424 ExFreePool(SubQPtr); break; } #line 6431 ; #line 6433 if(SubQPtr == (void * )0) { #line 6437 ; #line 6439 memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION )); #line 6440 status = (NTSTATUS )0xC000009AL; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 6446 if(((PCDROM_SUB_Q_DATA_FORMAT )userPtr)->Format != 0x01) { #line 6452 ; #line 6454 ExFreePool(SubQPtr); memset(userPtr, 0, sizeof(SUB_Q_CURRENT_POSITION )); #line 6456 status = (NTSTATUS )0xC0000001L; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } #line 6465 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->SUBCHANNEL).OperationCode = 0x42; (cdb->SUBCHANNEL).Msf = 1; (cdb->SUBCHANNEL).SubQ = 1; ((cdb->SUBCHANNEL).AllocationLength)[1] = sizeof(SUB_Q_CHANNEL_DATA ); #line 6471 status = SendSrbSynchronous(deviceExtension, & srb, SubQPtr, sizeof(SUB_Q_CHANNEL_DATA )); #line 6476 if((NTSTATUS )status >= 0) { (userPtr->Header).Reserved = 0; #line 6480 if(deviceExtension->Paused == 1) { deviceExtension->PlayActive = 0; (userPtr->Header).AudioStatus = 0x12; } else { if(SubQPtr[1] == 0x11) { deviceExtension->PlayActive = 1; (userPtr->Header).AudioStatus = 0x11; } else { #line 6494 deviceExtension->PlayActive = 0; (userPtr->Header).AudioStatus = 0x13; } } #line 6500 ((userPtr->Header).DataLength)[0] = 0; ((userPtr->Header).DataLength)[1] = 12; #line 6503 userPtr->FormatCode = 0x01; userPtr->Control = SubQPtr[5]; userPtr->ADR = 0; userPtr->TrackNumber = ((SubQPtr[6] & 0xF0) >> 4) * 10 + (SubQPtr[6] & 0x0F); #line 6507 userPtr->IndexNumber = ((SubQPtr[7] & 0xF0) >> 4) * 10 + (SubQPtr[7] & 0x0F); #line 6508 (userPtr->AbsoluteAddress)[0] = 0; (userPtr->AbsoluteAddress)[1] = SubQPtr[9]; (userPtr->AbsoluteAddress)[2] = SubQPtr[10]; (userPtr->AbsoluteAddress)[3] = SubQPtr[11]; (userPtr->TrackRelativeAddress)[0] = 0; (userPtr->TrackRelativeAddress)[1] = SubQPtr[13]; #line 6514 (userPtr->TrackRelativeAddress)[2] = SubQPtr[14]; #line 6515 (userPtr->TrackRelativeAddress)[3] = SubQPtr[15]; #line 6516 (Irp->IoStatus).Information = sizeof(SUB_Q_CURRENT_POSITION ); } else { #line 6520 (Irp->IoStatus).Information = 0; #line 6524 ; } #line 6529 ExFreePool(SubQPtr); } break; #line 6533 case 0x00000002 << 16 | 0x0001 << 14 | 0x0202 << 2 | 0: #line 6533 ; #line 6541 ; #line 6543 (Irp->IoStatus).Information = 0; #line 6545 srb.CdbLength = 10; srb.TimeOutValue = 10; (cdb->CDB10).OperationCode = 0xC0; status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 6554 deviceExtension->Paused = 0; deviceExtension->PausedM = 0; deviceExtension->PausedS = 0; deviceExtension->PausedF = 0; deviceExtension->LastEndM = 0; deviceExtension->LastEndS = 0; deviceExtension->LastEndF = 0; #line 6562 break; #line 6564 case 0x00000002 << 16 | 0x0001 << 14 | 0x000D << 2 | 0: #line 6564 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x0005 << 2 | 0: #line 6565 ; case 0x00000002 << 16 | 0x0001 << 14 | 0x000A << 2 | 0: #line 6566 ; ; (Irp->IoStatus).Information = 0; status = (NTSTATUS )0xC0000010L; break; #line 6572 case 0x00000002 << 16 | 0x0001 << 14 | 0x0200 << 2 | 0: #line 6572 ; #line 6575 ; #line 6583 if(CdAudioIsPlayActive(DeviceObject) == 1) { #line 6584 deviceExtension->PlayActive = 1; status = (NTSTATUS )0x00000000L; (Irp->IoStatus).Information = 0; goto SetStatusAndReturn; } else { #line 6589 deviceExtension->PlayActive = 0; return CdAudioSendToNextDriver(DeviceObject, Irp); } break; #line 6594 default : #line 6594 ; #line 6596 ; return CdAudioSendToNextDriver(DeviceObject, Irp); break; } #line 6602 SetStatusAndReturn: { #line 6607 if(status == (NTSTATUS )0x80000016L) { IoSetHardErrorOrVerifyDevice(Irp, deviceExtension->TargetDeviceObject); #line 6613 (Irp->IoStatus).Information = 0; } } (Irp->IoStatus).Status = status; myStatus = status; IofCompleteRequest(Irp, 0); return status; } #line 6624 NTSTATUS CdAudioAtapiDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 6632 NTSTATUS status ; PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; PIO_STACK_LOCATION currentIrpStack = ((Irp->Tail).Overlay).CurrentStackLocation; #line 6635 SCSI_PASS_THROUGH srb ; PHITACHICDB cdb = (PHITACHICDB )srb.Cdb; #line 6639 ; #line 6645 if(((currentIrpStack->Parameters).DeviceIoControl).IoControlCode == (0x00000002 << 16 | 0x0001 << 14 | 0x0002 << 2 | 0)) { #line 6649 (Irp->IoStatus).Information = 0; #line 6651 deviceExtension->PlayActive = 0; #line 6657 memset(& srb, 0, sizeof(SCSI_PASS_THROUGH )); #line 6663 (cdb->STOP_PLAY).OperationCode = 0x4E; #line 6665 srb.CdbLength = 12; #line 6671 srb.TimeOutValue = 10; #line 6673 status = SendSrbSynchronous(deviceExtension, & srb, (void * )0, 0); #line 6678 if(! ((NTSTATUS )status >= 0)) { #line 6682 ; #line 6684 (Irp->IoStatus).Status = status; myStatus = status; IofCompleteRequest(Irp, 0); return status; } } else { #line 6693 return CdAudioSendToNextDriver(DeviceObject, Irp); } #line 6697 (Irp->IoStatus).Status = status; myStatus = status; IofCompleteRequest(Irp, 0); return status; } #line 6704 void HpCdrProcessLastSession(PCDROM_TOC Toc ) { #line 6727 ULONG index ; PUCHAR cp ; #line 6730 index = Toc->FirstTrack; #line 6732 if(index) { #line 6733 index--; #line 6740 Toc->FirstTrack = ((Toc->TrackData)[0]).Reserved; Toc->LastTrack = ((Toc->TrackData)[index]).Reserved; (Toc->TrackData)[0] = (Toc->TrackData)[index]; } else { #line 6744 Toc->FirstTrack = (Toc->LastTrack = 0); } #line 6747 ; //BLAST for(cp = (PUCHAR )Toc, index = 0; index < 12; index++, cp++) { #line 6749 ; } ; } #line 6755 NTSTATUS HPCdrCompletion(PDEVICE_OBJECT DeviceObject , PIRP Irp , PVOID Context ) { #line 6781 Context; DeviceObject; #line 6784 if(Irp->PendingReturned) { #line 6785 if(pended == 0) #line 6785 pended = 1; else #line 6785 errorFn(); (((Irp->Tail).Overlay).CurrentStackLocation)->Control |= 0x01; } #line 6792 if((NTSTATUS )myStatus >= 0) { #line 6793 HpCdrProcessLastSession((PCDROM_TOC )(Irp->AssociatedIrp).SystemBuffer); } return myStatus; } #line 6800 NTSTATUS CdAudioHPCdrDeviceControl(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 6826 PIO_STACK_LOCATION currentIrpStack = ((Irp->Tail).Overlay).CurrentStackLocation; #line 6827 PIO_STACK_LOCATION nextIrpStack = ((Irp->Tail).Overlay).CurrentStackLocation - 1; #line 6828 PCD_DEVICE_EXTENSION deviceExtension = DeviceObject->DeviceExtension; #line 6834 if(((currentIrpStack->Parameters).DeviceIoControl).IoControlCode == (0x00000002 << 16 | 0x0001 << 14 | 0x000E << 2 | 0)) { { #line 6842 PIO_STACK_LOCATION irpSp ; #line 6842 PIO_STACK_LOCATION nextIrpSp ; #line 6842 irpSp = ((Irp->Tail).Overlay).CurrentStackLocation; #line 6842 nextIrpSp = ((Irp->Tail).Overlay).CurrentStackLocation - 1; #line 6842 memcpy(nextIrpSp, irpSp, (LONG )((LONG_PTR )(& ((IO_STACK_LOCATION * )0)->CompletionRoutine))); #line 6842 nextIrpSp->Control = 0; } #line 6842 ; #line 6847 if(s != NP) #line 6847 errorFn(); else { #line 6849 if(compRegistered != 0) #line 6849 errorFn(); else { #line 6851 compRegistered = 1; routine = 0; compFptr = HPCdrCompletion; } } { #line 6861 PIO_STACK_LOCATION irpSp ; #line 6861 ; #line 6861 irpSp = ((Irp->Tail).Overlay).CurrentStackLocation - 1; #line 6861 irpSp->CompletionRoutine = HPCdrCompletion; #line 6861 irpSp->Context = deviceExtension; #line 6861 irpSp->Control = 0; #line 6861 if(1) { #line 6861 irpSp->Control = 0x40; } #line 6861 if(1) { #line 6861 irpSp->Control |= 0x80; } #line 6861 if(1) { #line 6861 irpSp->Control |= 0x20; } } #line 6861 ; #line 6867 return IofCallDriver(deviceExtension->TargetDeviceObject, Irp); } else { return CdAudioSendToNextDriver(DeviceObject, Irp); } #line 6879 return (NTSTATUS )0xC0000001L; } NTSTATUS CdAudioForwardIrpSynchronous(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 6908 PCD_DEVICE_EXTENSION deviceExtension ; KEVENT event ; NTSTATUS status ; #line 6912 KeInitializeEvent(& event, NotificationEvent, 0); deviceExtension = (PCD_DEVICE_EXTENSION )DeviceObject->DeviceExtension; { #line 6919 PIO_STACK_LOCATION irpSp ; #line 6919 PIO_STACK_LOCATION nextIrpSp ; #line 6919 irpSp = ((Irp->Tail).Overlay).CurrentStackLocation; #line 6919 nextIrpSp = ((Irp->Tail).Overlay).CurrentStackLocation - 1; #line 6919 memcpy(nextIrpSp, irpSp, (LONG )((LONG_PTR )(& ((IO_STACK_LOCATION * )0)->CompletionRoutine))); #line 6919 nextIrpSp->Control = 0; } #line 6919 ; #line 6923 if(s != NP) #line 6923 errorFn(); else { #line 6925 if(compRegistered != 0) #line 6925 errorFn(); else { #line 6927 compRegistered = 1; routine = 1; compFptr = CdAudioSignalCompletion; } } { #line 6934 PIO_STACK_LOCATION irpSp ; #line 6934 ; #line 6934 irpSp = ((Irp->Tail).Overlay).CurrentStackLocation - 1; #line 6934 irpSp->CompletionRoutine = CdAudioSignalCompletion; #line 6934 irpSp->Context = & event; #line 6934 irpSp->Control = 0; #line 6934 if(1) { #line 6934 irpSp->Control = 0x40; } #line 6934 if(1) { #line 6934 irpSp->Control |= 0x80; } #line 6934 if(1) { #line 6934 irpSp->Control |= 0x20; } } #line 6934 ; #line 6940 status = IofCallDriver(deviceExtension->TargetDeviceObject, Irp); #line 6946 if(status = (NTSTATUS )0x00000103L) { #line 6947 KeWaitForSingleObject(& event, Executive, KernelMode, 0, (void * )0); #line 6948 status = (Irp->IoStatus).Status; status = myStatus; } #line 6952 return status; } #line 6957 void CdAudioUnload(PDRIVER_OBJECT DriverObject ) { #line 6982 ; ; return; } NTSTATUS CdAudioPower(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 6993 PCD_DEVICE_EXTENSION deviceExtension ; #line 6995 PoStartNextPowerIrp(Irp); if(s == NP) #line 6996 s = SKIP1; else #line 6996 errorFn(); Irp->CurrentLocation++; #line 6997 ((Irp->Tail).Overlay).CurrentStackLocation++; #line 6997 ; #line 6999 deviceExtension = (PCD_DEVICE_EXTENSION )DeviceObject->DeviceExtension; return PoCallDriver(deviceExtension->TargetDeviceObject, Irp); } #line 16 "C:/Program Files/Microsoft Visual Studio/VC98/include/excpt.h" #pragma once #line 32 #pragma pack(push, 8) #line 72 typedef enum _EXCEPTION_DISPOSITION ; #line 89 struct _EXCEPTION_RECORD ; #line 90 struct _CONTEXT ; #line 155 #pragma pack(pop) #line 25 "C:/NTDDK/inc/ntdef.h" #pragma once #line 15 "C:/Program Files/Microsoft Visual Studio/VC98/include/ctype.h" #pragma once #line 60 typedef unsigned short ; #line 66 typedef wchar_t ; #line 67 typedef wchar_t ; #line 127 "C:/NTDDK/inc/ntdef.h" typedef unsigned long ; #line 25 "C:/NTDDK/inc/basetsd.h" #pragma once #line 36 typedef int ; #line 37 typedef int ; #line 43 typedef unsigned int ; #line 44 typedef unsigned int ; #line 45 typedef unsigned int ; #line 84 typedef int ; #line 85 typedef unsigned int ; typedef long ; #line 88 typedef unsigned long ; #line 248 typedef unsigned short ; #line 249 typedef short ; #line 250 typedef unsigned long ; #line 288 typedef ULONG_PTR ; #line 289 typedef LONG_PTR ; #line 295 typedef ULONG_PTR ; #line 301 typedef __int64 ; #line 302 typedef __int64 ; #line 309 typedef unsigned __int64 ; #line 310 typedef unsigned __int64 ; #line 311 typedef unsigned __int64 ; #line 217 "C:/NTDDK/inc/ntdef.h" typedef void ; #line 218 typedef void ; #line 266 typedef char ; #line 267 typedef short ; #line 268 typedef long ; #line 276 typedef wchar_t ; #line 282 typedef WCHAR ; #line 283 typedef WCHAR ; #line 284 typedef const WCHAR ; #line 285 typedef WCHAR ; #line 286 typedef WCHAR ; typedef const WCHAR ; #line 293 typedef CHAR ; #line 294 typedef CHAR ; typedef const CHAR ; #line 297 typedef CHAR ; #line 298 typedef CHAR ; #line 299 typedef const CHAR ; #line 321 typedef char ; #line 322 typedef unsigned char ; #line 326 typedef LPSTR ; #line 327 typedef LPSTR ; #line 328 typedef LPCSTR ; #line 337 typedef double ; typedef struct _QUAD ; #line 349 typedef SHORT ; #line 350 typedef LONG ; #line 351 typedef QUAD ; #line 360 typedef unsigned char ; #line 361 typedef unsigned short ; #line 362 typedef unsigned long ; #line 363 typedef QUAD ; #line 369 typedef UCHAR ; #line 370 typedef USHORT ; #line 371 typedef ULONG ; #line 372 typedef UQUAD ; #line 378 typedef signed char ; #line 379 typedef SCHAR ; #line 394 typedef void ; #line 400 typedef HANDLE ; #line 406 typedef UCHAR ; #line 407 typedef USHORT ; #line 408 typedef ULONG ; #line 414 typedef LONG ; #line 478 typedef char ; #line 479 typedef short ; #line 480 typedef ULONG ; typedef CCHAR ; #line 483 typedef CSHORT ; #line 484 typedef CLONG ; #line 492 typedef ULONG ; #line 493 typedef PULONG ; #line 494 typedef USHORT ; #line 500 typedef ULONG ; #line 501 typedef ULONG ; #line 508 typedef LONG ; typedef NTSTATUS ; #line 602 typedef struct _FLOAT128 ; #line 607 typedef FLOAT128 ; #line 621 typedef __int64 ; #line 622 typedef unsigned __int64 ; #line 639 typedef LONGLONG ; #line 640 typedef ULONGLONG ; #line 644 typedef LONGLONG ; #line 649 typedef union _LARGE_INTEGER ; #line 662 typedef LARGE_INTEGER ; #line 668 typedef union _ULARGE_INTEGER ; #line 681 typedef ULARGE_INTEGER ; #line 690 typedef struct _LUID ; #line 696 typedef ULONGLONG ; #line 697 typedef DWORDLONG ; #line 707 typedef LARGE_INTEGER ; #line 831 #pragma warning(push) #pragma warning(disable:4035) __inline ULONGLONG __stdcall Int64ShllMod32___1(ULONGLONG Value , ULONG ShiftCount ) { #line 842 __asm { mov ecx, ShiftCount mov eax, dword ptr [Value] mov edx, dword ptr [Value+4] shld edx, eax, cl shl eax, cl }; } #line 845 __inline LONGLONG __stdcall Int64ShraMod32___1(LONGLONG Value , ULONG ShiftCount ) { #line 852 __asm { mov ecx, ShiftCount mov eax, dword ptr [Value] mov edx, dword ptr [Value+4] shrd eax, edx, cl sar edx, cl }; } #line 855 __inline ULONGLONG __stdcall Int64ShrlMod32___1(ULONGLONG Value , ULONG ShiftCount ) { #line 862 __asm { mov ecx, ShiftCount mov eax, dword ptr [Value] mov edx, dword ptr [Value+4] shrd eax, edx, cl shr edx, cl }; } #pragma warning(pop) #line 956 typedef enum _EVENT_TYPE ; #line 965 typedef enum _TIMER_TYPE ; #line 974 typedef enum _WAIT_TYPE ; #line 983 typedef CHAR ; #line 984 typedef const char ; #line 991 typedef struct _STRING ; #line 999 typedef STRING ; typedef STRING ; #line 1002 typedef PSTRING ; typedef STRING ; #line 1005 typedef PSTRING ; #line 1011 typedef struct _CSTRING ; #line 1016 typedef CSTRING ; #line 1019 typedef STRING ; #line 1020 typedef PSTRING ; #line 1027 typedef struct _UNICODE_STRING ; #line 1036 typedef UNICODE_STRING ; #line 1037 typedef const UNICODE_STRING ; #line 1046 typedef UCHAR ; #line 1047 typedef BOOLEAN ; #line 1057 typedef struct _LIST_ENTRY ; #line 1067 typedef struct _SINGLE_LIST_ENTRY ; #line 1078 typedef struct LIST_ENTRY32 ; #line 1082 typedef LIST_ENTRY32 ; typedef struct LIST_ENTRY64 ; #line 1088 typedef LIST_ENTRY64 ; #line 1127 typedef struct _STRING32 ; #line 1132 typedef STRING32 ; typedef STRING32 ; #line 1135 typedef UNICODE_STRING32 ; typedef STRING32 ; #line 1138 typedef ANSI_STRING32 ; #line 1141 typedef struct _STRING64 ; #line 1146 typedef STRING64 ; typedef STRING64 ; #line 1149 typedef UNICODE_STRING64 ; typedef STRING64 ; #line 1152 typedef ANSI_STRING64 ; #line 1173 typedef struct _OBJECT_ATTRIBUTES ; #line 1181 typedef OBJECT_ATTRIBUTES ; #line 17 "C:/NTDDK/inc/guiddef.h" typedef struct _GUID ; #line 70 typedef GUID ; #line 75 typedef const GUID ; #line 81 typedef GUID ; #line 82 typedef IID ; #line 85 typedef GUID ; #line 86 typedef CLSID ; #line 89 typedef GUID ; #line 90 typedef FMTID ; #line 16 "C:/NTDDK/inc/string.h" #pragma once #line 54 typedef unsigned int ; #line 1233 "C:/NTDDK/inc/ntdef.h" typedef struct _OBJECTID ; #line 1288 struct _CONTEXT ; #line 1289 struct _EXCEPTION_RECORD ; typedef EXCEPTION_DISPOSITION ; #line 1306 typedef UCHAR ; typedef KIRQL ; #line 1316 typedef enum _NT_PRODUCT_TYPE ; #line 1329 typedef enum _SUITE_TYPE ; #line 75 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _KTHREAD ; #line 76 typedef struct _ETHREAD ; #line 77 typedef struct _EPROCESS ; #line 78 typedef struct _PEB ; #line 79 typedef struct _KINTERRUPT ; #line 80 typedef struct _IO_TIMER ; #line 81 typedef struct _OBJECT_TYPE ; #line 82 typedef struct _CALLBACK_OBJECT ; #line 83 typedef struct _DEVICE_HANDLER_OBJECT ; #line 84 typedef struct _BUS_HANDLER ; #line 143 typedef union _SLIST_HEADER ; #line 204 typedef CCHAR ; typedef enum _MODE ; #line 222 struct _KAPC ; typedef void ; #line 232 typedef void ; #line 242 typedef void ; #line 248 typedef BOOLEAN ; #line 254 typedef BOOLEAN ; #line 265 typedef struct _KAPC ; #line 292 struct _KDPC ; typedef void ; #line 351 typedef enum _KDPC_IMPORTANCE ; #line 361 typedef struct _KDPC ; #line 377 typedef PVOID ; typedef void ; #line 392 typedef struct _KIPI_COUNTS ; #line 443 typedef struct _MDL ; #line 532 typedef PVOID ; #line 538 typedef PVOID ; #line 544 typedef PVOID ; typedef ULONG ; #line 547 typedef ACCESS_MASK ; #line 597 typedef struct _GENERIC_MAPPING ; #line 603 typedef GENERIC_MAPPING ; #line 24 "C:/NTDDK/inc/pshpack4.h" #pragma warning(disable:4103) #pragma pack(push, 4) #line 618 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _LUID_AND_ATTRIBUTES ; #line 622 typedef LUID_AND_ATTRIBUTES ; #line 623 typedef LUID_AND_ATTRIBUTES_ARRAY ; #line 27 "C:/NTDDK/inc/poppack.h" #pragma warning(disable:4103) #pragma pack(pop) #line 642 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _ACL ; #line 649 typedef ACL ; #line 681 typedef struct _PRIVILEGE_SET ; #line 735 typedef enum _SECURITY_IMPERSONATION_LEVEL ; #line 753 typedef BOOLEAN ; #line 762 typedef struct _SECURITY_QUALITY_OF_SERVICE ; #line 774 typedef struct _SE_IMPERSONATION_STATE ; #line 782 typedef ULONG ; #line 809 typedef ULONG ; #line 810 typedef KAFFINITY ; #line 816 typedef LONG ; #line 824 typedef ULONG_PTR ; #line 825 typedef KSPIN_LOCK ; #line 833 typedef void ; #line 842 typedef enum _KPROFILE_SOURCE ; #line 1079 typedef NTSTATUS ; #line 1088 typedef struct _RTL_QUERY_REGISTRY_TABLE ; #line 1952 #pragma warning(push) #pragma warning(disable:4035) #line 2019 #pragma warning(pop) #line 2214 typedef struct _TIME_FIELDS ; #line 2224 typedef TIME_FIELDS ; #line 2499 typedef struct _RTL_BITMAP ; #line 2503 typedef RTL_BITMAP ; #line 2627 typedef struct _RTL_BITMAP_RUN ; #line 2633 typedef RTL_BITMAP_RUN ; #line 2886 typedef struct _RTL_RANGE ; #line 2924 typedef struct _RTL_RANGE_LIST ; #line 2950 typedef struct _RANGE_LIST_ITERATOR ; #line 3019 typedef BOOLEAN ; #line 3155 typedef struct _OSVERSIONINFOA ; #line 3164 typedef struct _OSVERSIONINFOW ; #line 3177 typedef OSVERSIONINFOA ; #line 3178 typedef POSVERSIONINFOA ; #line 3179 typedef LPOSVERSIONINFOA ; #line 3182 typedef struct _OSVERSIONINFOEXA ; #line 3195 typedef struct _OSVERSIONINFOEXW ; #line 3213 typedef OSVERSIONINFOEXA ; #line 3214 typedef POSVERSIONINFOEXA ; #line 3215 typedef LPOSVERSIONINFOEXA ; #line 3648 typedef struct _IO_STATUS_BLOCK ; #line 3669 typedef void ; #line 3685 typedef enum _FILE_INFORMATION_CLASS ; #line 3731 typedef struct _FILE_BASIC_INFORMATION ; #line 3739 typedef struct _FILE_STANDARD_INFORMATION ; #line 3747 typedef struct _FILE_POSITION_INFORMATION ; #line 3751 typedef struct _FILE_ALIGNMENT_INFORMATION ; #line 3755 typedef struct _FILE_NAME_INFORMATION ; #line 3760 typedef struct _FILE_NETWORK_OPEN_INFORMATION ; #line 3770 typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION ; #line 3775 typedef struct _FILE_DISPOSITION_INFORMATION ; #line 3779 typedef struct _FILE_END_OF_FILE_INFORMATION ; #line 3784 typedef struct _FILE_FULL_EA_INFORMATION ; #line 3798 typedef enum _FSINFOCLASS ; #line 3810 typedef struct _FILE_FS_DEVICE_INFORMATION ; #line 3820 typedef union _FILE_SEGMENT_ELEMENT ; #line 3829 typedef enum _INTERFACE_TYPE ; #line 3854 typedef enum _DMA_WIDTH ; #line 3865 typedef enum _DMA_SPEED ; #line 3879 typedef void ; #line 3880 typedef void ; #line 3888 typedef enum _BUS_DATA_TYPE ; #line 3910 typedef struct _IO_ERROR_LOG_PACKET ; #line 3931 typedef struct _IO_ERROR_LOG_MESSAGE ; #line 4074 typedef struct _KEY_BASIC_INFORMATION ; #line 4081 typedef struct _KEY_NODE_INFORMATION ; #line 4091 typedef struct _KEY_FULL_INFORMATION ; #line 4106 typedef struct _KEY_NAME_INFORMATION ; #line 4112 typedef enum _KEY_INFORMATION_CLASS ; #line 4122 typedef struct _KEY_WRITE_TIME_INFORMATION ; #line 4126 typedef enum _KEY_SET_INFORMATION_CLASS ; #line 4134 typedef struct _KEY_VALUE_BASIC_INFORMATION ; #line 4141 typedef struct _KEY_VALUE_FULL_INFORMATION ; #line 4151 typedef struct _KEY_VALUE_PARTIAL_INFORMATION ; #line 4158 typedef struct _KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 ; #line 4164 typedef struct _KEY_VALUE_ENTRY ; #line 4171 typedef enum _KEY_VALUE_INFORMATION_CLASS ; #line 4210 typedef struct _OBJECT_NAME_INFORMATION ; #line 4221 typedef enum _SECTION_INHERIT ; #line 4294 typedef struct _CLIENT_ID ; #line 4298 typedef CLIENT_ID ; #line 4315 typedef struct _NT_TIB ; #line 4327 typedef NT_TIB ; #line 4332 typedef enum _PROCESSINFOCLASS ; #line 4366 typedef enum _THREADINFOCLASS ; #line 4395 typedef struct _PROCESS_WS_WATCH_INFORMATION ; #line 4405 typedef struct _PROCESS_BASIC_INFORMATION ; #line 4413 typedef PROCESS_BASIC_INFORMATION ; #line 4422 typedef struct _PROCESS_DEVICEMAP_INFORMATION ; #line 4440 typedef struct _PROCESS_SESSION_INFORMATION ; #line 4454 typedef struct _QUOTA_LIMITS ; #line 4462 typedef QUOTA_LIMITS ; #line 4472 typedef struct _IO_COUNTERS ; #line 4480 typedef IO_COUNTERS ; #line 4488 typedef struct _VM_COUNTERS ; #line 4501 typedef VM_COUNTERS ; #line 4508 typedef struct _POOLED_USAGE_AND_LIMITS ; #line 4519 typedef POOLED_USAGE_AND_LIMITS ; #line 4528 typedef struct _PROCESS_ACCESS_TOKEN ; #line 4555 typedef struct _KERNEL_USER_TIMES ; #line 4561 typedef KERNEL_USER_TIMES ; #line 4587 typedef enum _SYSTEM_POWER_STATE ; #line 4598 typedef enum { PowerActionNone = 0, PowerActionReserved, PowerActionSleep, PowerActionHibernate, PowerActionShutdown, PowerActionShutdownReset, PowerActionShutdownOff, PowerActionWarmEject } ; typedef enum _DEVICE_POWER_STATE ; #line 4618 typedef union _POWER_STATE ; #line 4623 typedef enum _POWER_STATE_TYPE ; #line 4654 typedef ULONG ; typedef enum { LT_DONT_CARE, LT_LOWEST_LATENCY } ; #line 4663 typedef enum { SystemPowerPolicyAc, SystemPowerPolicyDc, VerifySystemPolicyAc, VerifySystemPolicyDc, SystemPowerCapabilities, SystemBatteryState, SystemPowerStateHandler, ProcessorStateHandler, SystemPowerPolicyCurrent, AdministratorPowerPolicy, SystemReserveHiberFile, ProcessorInformation, SystemPowerInformation } ; #line 4690 typedef ULONG ; typedef LONG ; #line 4693 typedef ULONG ; #line 4719 typedef union _MCI_STATS ; #line 4978 typedef struct _KPCR ; #line 5006 typedef KPCR ; #line 5012 typedef struct _KFLOATING_SAVE ; #line 5153 typedef enum _INTERLOCKED_RESULT ; #line 5252 #pragma warning(disable:4035) #line 6994 typedef struct _KSYSTEM_TIME ; #line 7014 #pragma warning(push) #pragma warning(disable:4164) #line 7019 #pragma function(_enable) #line 7020 #pragma function(_disable) #line 7024 #pragma warning(pop) #line 7085 typedef struct _FLOATING_SAVE_AREA ; #line 7097 typedef FLOATING_SAVE_AREA ; #line 7109 typedef struct _CONTEXT ; #line 7197 typedef CONTEXT ; #line 7826 typedef void ; #line 7850 typedef enum _ALTERNATIVE_ARCHITECTURE_TYPE ; #line 7899 typedef struct _KUSER_SHARED_DATA ; #line 8123 typedef enum _CM_SERVICE_NODE_TYPE ; #line 8132 typedef enum _CM_SERVICE_LOAD_TYPE ; #line 8140 typedef enum _CM_ERROR_CONTROL_TYPE ; #line 8172 typedef int ; #line 8198 typedef enum _CM_SHARE_DISPOSITION ; #line 8211 typedef PVOID ; #line 24 "C:/NTDDK/inc/pshpack4.h" #pragma warning(disable:4103) #pragma pack(push, 4) #line 8309 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR ; #line 27 "C:/NTDDK/inc/poppack.h" #pragma warning(disable:4103) #pragma pack(pop) #line 8419 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _CM_PARTIAL_RESOURCE_LIST ; #line 8443 typedef struct _CM_FULL_RESOURCE_DESCRIPTOR ; #line 8454 typedef struct _CM_RESOURCE_LIST ; #line 8471 typedef struct _DEVICE_FLAGS ; #line 8485 typedef struct _CM_COMPONENT_INFORMATION ; #line 8503 typedef struct _CM_ROM_BLOCK ; #line 24 "C:/NTDDK/inc/pshpack1.h" #pragma warning(disable:4103) #pragma pack(push, 1) #line 8518 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _CM_INT13_DRIVE_PARAMETER ; #line 8532 typedef struct _CM_MCA_POS_DATA ; #line 8544 typedef struct _EISA_MEMORY_TYPE ; #line 8554 typedef struct _EISA_MEMORY_CONFIGURATION ; #line 8567 typedef struct _EISA_IRQ_DESCRIPTOR ; #line 8575 typedef struct _EISA_IRQ_CONFIGURATION ; #line 8585 typedef struct _DMA_CONFIGURATION_BYTE0 ; #line 8592 typedef struct _DMA_CONFIGURATION_BYTE1 ; #line 8599 typedef struct _EISA_DMA_CONFIGURATION ; #line 8609 typedef struct _EISA_PORT_DESCRIPTOR ; #line 8616 typedef struct _EISA_PORT_CONFIGURATION ; #line 8628 typedef struct _CM_EISA_SLOT_INFORMATION ; #line 8644 typedef struct _CM_EISA_FUNCTION_INFORMATION ; #line 8678 typedef struct _CM_PNP_BIOS_DEVICE_NODE ; #line 8692 typedef struct _CM_PNP_BIOS_INSTALLATION_CHECK ; #line 27 "C:/NTDDK/inc/poppack.h" #pragma warning(disable:4103) #pragma pack(pop) #line 8761 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _CM_SCSI_DEVICE_DATA ; #line 8775 typedef struct _CM_VIDEO_DEVICE_DATA ; #line 8785 typedef struct _CM_SONIC_DEVICE_DATA ; #line 8796 typedef struct _CM_SERIAL_DEVICE_DATA ; #line 8810 typedef struct _CM_MONITOR_DEVICE_DATA ; #line 8844 typedef struct _CM_FLOPPY_DEVICE_DATA ; #line 8881 typedef struct _CM_KEYBOARD_DEVICE_DATA ; #line 8893 typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA ; #line 8905 typedef struct _CM_PCCARD_DEVICE_DATA ; #line 8944 typedef struct _IO_RESOURCE_DESCRIPTOR ; #line 9027 typedef struct _IO_RESOURCE_LIST ; #line 9036 typedef struct _IO_RESOURCE_REQUIREMENTS_LIST ; #line 9065 typedef struct _EXCEPTION_RECORD ; #line 9074 typedef EXCEPTION_RECORD ; typedef struct _EXCEPTION_RECORD32 ; #line 9085 typedef struct _EXCEPTION_RECORD64 ; #line 9099 typedef struct _EXCEPTION_POINTERS ; #line 9111 typedef enum _CONFIGURATION_TYPE ; #line 9161 typedef enum _KINTERRUPT_MODE ; #line 9170 typedef enum _KWAIT_REASON ; #line 9207 typedef struct _DISPATCHER_HEADER ; #line 9217 typedef struct _KWAIT_BLOCK ; #line 9230 typedef void ; #line 9244 typedef struct _KDEVICE_QUEUE ; #line 9252 typedef struct _KDEVICE_QUEUE_ENTRY ; #line 9263 typedef struct _KEVENT ; #line 9271 typedef BOOLEAN ; #line 9281 typedef struct _KMUTANT ; #line 9294 typedef struct _KSEMAPHORE ; #line 9304 typedef struct _KTIMER ; #line 9899 typedef enum _KBUGCHECK_BUFFER_DUMP_STATE ; #line 9907 typedef void ; #line 9914 typedef struct _KBUGCHECK_CALLBACK_RECORD ; #line 10002 typedef void ; #line 10020 typedef LOGICAL ; #line 10037 typedef void ; #line 10053 typedef enum _MEMORY_CACHING_TYPE_ORIG ; #line 10057 typedef enum _MEMORY_CACHING_TYPE ; #line 10087 typedef struct _DBGKD_DEBUG_DATA_HEADER64 ; #line 10115 typedef enum _POOL_TYPE ; #line 10195 typedef enum _EX_POOL_PRIORITY ; #line 10247 typedef struct _FAST_MUTEX ; #line 10574 typedef PVOID ; #line 10582 typedef void ; #line 10588 typedef struct _GENERAL_LOOKASIDE ; #line 10619 typedef struct _NPAGED_LOOKASIDE_LIST ; #line 10729 typedef struct _PAGED_LOOKASIDE_LIST ; #line 10882 typedef enum _WORK_QUEUE_TYPE ; #line 10889 typedef void ; #line 10895 typedef struct _WORK_QUEUE_ITEM ; #line 10926 typedef struct _ZONE_SEGMENT_HEADER ; #line 10931 typedef struct _ZONE_HEADER ; #line 11156 typedef ULONG_PTR ; #line 11157 typedef ERESOURCE_THREAD ; typedef struct _OWNER_ENTRY ; #line 11168 typedef struct _ERESOURCE ; #line 11197 typedef struct _RESOURCE_HASH_ENTRY ; #line 11204 typedef struct _RESOURCE_PERFORMANCE_DATA ; #line 11429 typedef struct _CALLBACK_OBJECT ; typedef void ; #line 11474 typedef GUID ; #line 11862 typedef enum _MM_SYSTEM_SIZE ; #line 11884 typedef enum _LOCK_OPERATION ; #line 11970 typedef enum _MM_PAGE_PRIORITY ; #line 11999 typedef struct _PHYSICAL_MEMORY_RANGE ; #line 12385 typedef NTSTATUS ; #line 12389 typedef NTSTATUS ; #line 12399 struct _DRIVER_OBJECT ; #line 12411 typedef enum _SECURITY_OPERATION_CODE ; #line 12426 typedef struct _SECURITY_SUBJECT_CONTEXT ; #line 12448 typedef struct _INITIAL_PRIVILEGE_SET ; #line 12462 typedef struct _ACCESS_STATE ; #line 12571 typedef void ; #line 12585 typedef void ; #line 12602 typedef struct _IMAGE_INFO ; #line 12620 typedef void ; #line 12859 typedef NTSTATUS ; #line 12878 typedef enum _IO_QUERY_DEVICE_DATA_FORMAT ; #line 12890 typedef enum _CREATE_FILE_TYPE ; #line 12905 struct _DEVICE_DESCRIPTION ; #line 12906 struct _DEVICE_OBJECT ; #line 12907 struct _DMA_ADAPTER ; #line 12908 struct _DRIVER_OBJECT ; #line 12909 struct _DRIVE_LAYOUT_INFORMATION ; #line 12910 struct _DISK_PARTITION ; #line 12911 struct _FILE_OBJECT ; #line 12912 struct _IRP ; #line 12913 struct _SCSI_REQUEST_BLOCK ; #line 12919 typedef void ; #line 12932 typedef void ; #line 12943 typedef NTSTATUS ; #line 12955 typedef void ; #line 12968 typedef void ; #line 12979 typedef NTSTATUS ; #line 12990 typedef void ; #line 13001 typedef void ; #line 13011 typedef NTSTATUS ; #line 13025 typedef BOOLEAN ; #line 13038 typedef BOOLEAN ; #line 13051 typedef BOOLEAN ; #line 13068 typedef BOOLEAN ; #line 13078 typedef BOOLEAN ; #line 13092 typedef BOOLEAN ; #line 13106 typedef BOOLEAN ; #line 13118 typedef BOOLEAN ; #line 13127 typedef BOOLEAN ; #line 13141 typedef BOOLEAN ; #line 13161 typedef void ; #line 13167 typedef void ; #line 13179 typedef void ; #line 13193 typedef BOOLEAN ; #line 13207 typedef BOOLEAN ; #line 13219 typedef BOOLEAN ; #line 13227 typedef BOOLEAN ; #line 13239 typedef BOOLEAN ; #line 13253 typedef NTSTATUS ; #line 13262 typedef NTSTATUS ; #line 13275 typedef NTSTATUS ; #line 13282 typedef NTSTATUS ; #line 13289 typedef BOOLEAN ; #line 13304 typedef BOOLEAN ; #line 13319 typedef BOOLEAN ; #line 13327 typedef BOOLEAN ; #line 13336 typedef BOOLEAN ; #line 13350 typedef struct _FAST_IO_DISPATCH ; #line 13386 typedef enum _IO_ALLOCATION_ACTION ; #line 13396 typedef IO_ALLOCATION_ACTION ; #line 13410 typedef struct _IO_SECURITY_CONTEXT ; #line 13434 typedef struct _VPB ; #line 13482 typedef struct _ADAPTER_OBJECT ; #line 13491 typedef struct _WAIT_CONTEXT_BLOCK ; #line 13503 typedef struct _CONTROLLER_OBJECT ; #line 13537 typedef struct _DEVICE_OBJECT ; #line 13575 typedef struct _DEVICE_OBJECT ; #line 13578 struct _DEVICE_OBJECT_POWER_EXTENSION ; typedef struct _DEVOBJ_EXTENSION ; #line 13608 typedef struct _DRIVER_EXTENSION ; #line 13645 typedef struct _DRIVER_OBJECT ; #line 13706 typedef struct _DRIVER_OBJECT ; #line 13715 typedef struct _SECTION_OBJECT_POINTERS ; #line 13720 typedef SECTION_OBJECT_POINTERS ; #line 13726 typedef struct _IO_COMPLETION_CONTEXT ; #line 13759 typedef struct _FILE_OBJECT ; #line 13788 typedef struct _FILE_OBJECT ; #line 13828 typedef struct _IRP ; #line 14078 typedef NTSTATUS ; #line 14163 typedef enum _DEVICE_RELATION_TYPE ; #line 14171 typedef struct _DEVICE_RELATIONS ; #line 14176 typedef enum _DEVICE_USAGE_NOTIFICATION_TYPE ; #line 14185 typedef struct _INTERFACE ; #line 14196 typedef struct _DEVICE_CAPABILITIES ; #line 14229 typedef struct _POWER_SEQUENCE ; #line 14235 typedef enum { BusQueryDeviceID = 0, BusQueryHardwareIDs = 1, BusQueryCompatibleIDs = 2, BusQueryInstanceID = 3, BusQueryDeviceSerialNumber = 4 } ; typedef ULONG ; #line 14252 typedef enum { DeviceTextDescription = 0, DeviceTextLocationInformation = 1 } ; #line 24 "C:/NTDDK/inc/pshpack4.h" #pragma warning(disable:4103) #pragma pack(push, 4) #line 14271 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _IO_STACK_LOCATION ; #line 27 "C:/NTDDK/inc/poppack.h" #pragma warning(disable:4103) #pragma pack(pop) #line 14615 "C:/NTDDK/inc/ddk/ntddk.h" typedef struct _SHARE_ACCESS ; #line 14635 typedef struct _CONFIGURATION_INFORMATION ; #line 14848 typedef struct _BOOTDISK_INFORMATION ; #line 15754 typedef struct _IO_REMOVE_LOCK_TRACKING_BLOCK ; typedef struct _IO_REMOVE_LOCK_COMMON_BLOCK ; #line 15764 typedef struct _IO_REMOVE_LOCK_DBG_BLOCK ; #line 15777 typedef struct _IO_REMOVE_LOCK ; #line 16009 typedef struct _IO_WORKITEM ; typedef void ; #line 16100 typedef enum { DevicePropertyDeviceDescription, DevicePropertyHardwareID, DevicePropertyCompatibleIDs, DevicePropertyBootConfiguration, DevicePropertyBootConfigurationTranslated, DevicePropertyClassName, DevicePropertyClassGuid, DevicePropertyDriverKeyName, DevicePropertyManufacturer, DevicePropertyFriendlyName, DevicePropertyLocationInformation, DevicePropertyPhysicalDeviceObjectName, DevicePropertyBusTypeGuid, DevicePropertyLegacyBusType, DevicePropertyBusNumber, DevicePropertyEnumeratorName, DevicePropertyAddress, DevicePropertyUINumber } ; typedef BOOLEAN ; #line 16129 typedef struct _DMA_ADAPTER ; #line 16135 typedef ULONG ; #line 16148 typedef struct _PNP_BUS_INFORMATION ; #line 16162 typedef struct _LEGACY_BUS_INFORMATION ; #line 16168 typedef struct _BUS_INTERFACE_STANDARD ; #line 16190 typedef BOOLEAN ; #line 16194 typedef NTSTATUS ; #line 16203 typedef NTSTATUS ; #line 16206 typedef NTSTATUS ; #line 16210 typedef NTSTATUS ; #line 16214 typedef NTSTATUS ; #line 16218 typedef void ; #line 16222 typedef NTSTATUS ; #line 16227 typedef void ; #line 16231 typedef struct _ACPI_INTERFACE_STANDARD ; #line 16255 typedef enum _ACPI_REG_TYPE ; #line 16268 typedef USHORT ; #line 16272 typedef void ; #line 16278 typedef struct ACPI_REGS_INTERFACE_STANDARD ; #line 16300 typedef struct { PVOID LinkNode ; ULONG StaticVector ; UCHAR Flags ; } ; #line 16314 typedef NTSTATUS ; #line 16329 typedef NTSTATUS ; #line 16336 typedef void ; #line 16343 typedef struct _INT_ROUTE_INTERFACE_STANDARD ; #line 16366 typedef struct _IO_ASSIGNED_RESOURCES ; #line 16490 typedef enum _IO_NOTIFICATION_EVENT_CATEGORY ; #line 16504 typedef NTSTATUS ; #line 16537 typedef void ; #line 16573 typedef enum _ARBITER_ACTION ; #line 16586 typedef struct _ARBITER_CONFLICT_INFO ; #line 16608 typedef struct _ARBITER_PARAMETERS ; #line 16719 typedef enum _ARBITER_REQUEST_SOURCE ; #line 16731 typedef enum _ARBITER_RESULT ; #line 16761 typedef struct _ARBITER_LIST_ENTRY ; #line 16832 typedef NTSTATUS ; #line 16853 typedef struct _ARBITER_INTERFACE ; #line 16880 typedef enum _RESOURCE_TRANSLATION_DIRECTION ; #line 16889 typedef NTSTATUS ; #line 16901 typedef NTSTATUS ; #line 16915 typedef struct _TRANSLATOR_INTERFACE ; #line 16931 typedef NTSTATUS ; #line 16945 typedef struct _LEGACY_DEVICE_DETECTION_INTERFACE ; #line 16959 typedef struct _PLUGPLAY_NOTIFICATION_HEADER ; #line 16972 typedef struct _HWPROFILE_CHANGE_NOTIFICATION ; #line 16986 typedef struct _DEVICE_INTERFACE_CHANGE_NOTIFICATION ; #line 17006 typedef struct _TARGET_DEVICE_REMOVAL_NOTIFICATION ; #line 17026 typedef struct _TARGET_DEVICE_CUSTOM_NOTIFICATION ; #line 17054 typedef struct _DEVICE_DESCRIPTION ; #line 17086 typedef BOOLEAN ; #line 17333 typedef void ; #line 17339 typedef struct _DEVICE_CONTROL_CONTEXT ; #line 17349 typedef PBUS_HANDLER ; #line 17355 typedef void ; #line 17365 typedef enum _HAL_QUERY_INFORMATION_CLASS ; #line 17381 typedef enum _HAL_SET_INFORMATION_CLASS ; #line 17388 typedef NTSTATUS ; #line 17405 typedef NTSTATUS ; #line 17420 typedef void ; #line 17429 typedef void ; #line 17438 typedef NTSTATUS ; #line 17447 typedef NTSTATUS ; #line 17456 typedef NTSTATUS ; #line 17466 typedef NTSTATUS ; #line 17475 typedef NTSTATUS ; #line 17486 typedef struct _PM_DISPATCH_TABLE ; #line 17492 typedef NTSTATUS ; #line 17505 typedef struct _DMA_ADAPTER ; #line 17520 typedef NTSTATUS ; #line 17543 typedef BOOLEAN ; #line 17553 typedef NTSTATUS ; #line 17566 typedef void ; #line 17572 typedef void ; #line 17578 typedef BOOLEAN ; #line 17588 typedef struct { ULONG Version ; pHalQuerySystemInformation HalQuerySystemInformation ; pHalSetSystemInformation HalSetSystemInformation ; pHalQueryBusSlots HalQueryBusSlots ; ULONG Spare1 ; pHalExamineMBR HalExamineMBR ; pHalIoAssignDriveLetters HalIoAssignDriveLetters ; pHalIoReadPartitionTable HalIoReadPartitionTable ; pHalIoSetPartitionInformation HalIoSetPartitionInformation ; pHalIoWritePartitionTable HalIoWritePartitionTable ; pHalHandlerForBus HalReferenceHandlerForBus ; pHalReferenceBusHandler HalReferenceBusHandler ; pHalReferenceBusHandler HalDereferenceBusHandler ; pHalInitPnpDriver HalInitPnpDriver ; pHalInitPowerManagement HalInitPowerManagement ; pHalGetDmaAdapter HalGetDmaAdapter ; pHalGetInterruptTranslator HalGetInterruptTranslator ; } ; #line 17650 typedef struct _HAL_BUS_INFORMATION ; #line 17658 typedef struct _HAL_PROFILE_SOURCE_INFORMATION ; #line 17665 typedef struct _HAL_PROFILE_SOURCE_INTERVAL ; #line 17671 typedef enum _HAL_DISPLAY_BIOS_INFORMATION ; #line 17678 typedef struct _HAL_POWER_INFORMATION ; #line 17683 typedef struct _HAL_PROCESSOR_SPEED_INFO ; #line 17688 typedef struct _HAL_CALLBACKS ; #line 17694 typedef struct _HAL_PROCESSOR_FEATURE ; #line 17706 typedef union _MCI_ADDR ; #line 17716 typedef enum { HAL_MCE_RECORD, HAL_MCA_RECORD } ; #line 17726 typedef struct _MCA_EXCEPTION ; #line 17752 typedef void ; #line 17762 typedef struct _MCA_DRIVER_INFO ; #line 17772 typedef struct _SCATTER_GATHER_ELEMENT ; #line 17778 #pragma warning(disable:4200) #line 17779 typedef struct _SCATTER_GATHER_LIST ; #line 17784 #pragma warning(default:4200) #line 17788 typedef struct _DMA_OPERATIONS ; typedef struct _DMA_ADAPTER ; #line 17797 typedef void ; #line 17801 typedef PVOID ; #line 17808 typedef void ; #line 17816 typedef NTSTATUS ; #line 17824 typedef BOOLEAN ; #line 17833 typedef void ; #line 17837 typedef void ; #line 17843 typedef PHYSICAL_ADDRESS ; #line 17852 typedef ULONG ; #line 17856 typedef ULONG ; #line 17860 typedef void ; #line 17868 typedef NTSTATUS ; #line 17880 typedef void ; #line 17887 typedef struct _DMA_OPERATIONS ; #line 18235 typedef void ; #line 18321 typedef struct _OBJECT_HANDLE_INFORMATION ; #line 18402 typedef struct _PCI_SLOT_NUMBER ; #line 18418 typedef struct _PCI_COMMON_CONFIG ; #line 18591 typedef struct _PCI_CAPABILITIES_HEADER ; #line 18600 typedef struct _PCI_PMC ; #line 18618 typedef struct _PCI_PMCSR ; #line 18628 typedef struct _PCI_PMCSR_BSE ; #line 18635 typedef struct _PCI_PM_CAPABILITY ; #line 18679 typedef struct _PCI_AGP_CAPABILITY ; #line 18720 typedef struct _PCI_MSI_CAPABILITY ; #line 18946 typedef void ; #line 18954 typedef void ; #line 18963 typedef void ; #line 18975 typedef struct _PCIBUSDATA ; #line 18986 typedef ULONG ; #line 18995 typedef void ; #line 19000 typedef void ; #line 19006 typedef struct _PCI_BUS_INTERFACE_STANDARD ; #line 19028 typedef BOOLEAN ; #line 19043 typedef struct _PCI_DEVICE_PRESENT_INTERFACE ; #line 21 extern int s ; extern int UNLOADED , NP , DC , SKIP1 , SKIP2 , MPR1 , MPR3 , IPC ; #line 25 extern int pended ; extern PIO_COMPLETION_ROUTINE compFptr ; extern int compRegistered ; extern int lowerDriverReturn ; extern int setEventCalled ; extern int customIrp ; extern int routine ; #line 33 extern int myStatus ; #line 55 extern NTSTATUS DriverEntry(PDRIVER_OBJECT , PUNICODE_STRING ) ; #line 57 extern int compRegistered ; extern PIO_COMPLETION_ROUTINE compFptr ; IRP * pirp ; void stub_driver_init() { s = NP; pended = (compFptr = (compRegistered = (lowerDriverReturn = (setEventCalled = (customIrp = 0))))); } #line 70 int main() { #line 71 DRIVER_OBJECT d ; UNICODE_STRING u ; NTSTATUS status ; int we_should_unload ; #line 76 _BLAST_init(); #line 78 // status = DriverEntry(& d, & u); #line 80 if((NTSTATUS )status >= 0) { #line 81 int __BLAST_NONDET ; int idx ; int irp_choice ; DEVICE_OBJECT devobj ; #line 90 extern NTSTATUS CdAudioAddDevice(PDRIVER_OBJECT , PDEVICE_OBJECT ) ; #line 93 s = NP; pended = (compFptr = (compRegistered = (lowerDriverReturn = (setEventCalled = (customIrp = 0))))); #line 97 (pirp->IoStatus).Status = (NTSTATUS )0x00000000L; myStatus = (NTSTATUS )0x00000000L; #line 100 if(irp_choice == 0) { #line 101 (pirp->IoStatus).Status = (NTSTATUS )0xC00000BBL; myStatus = (NTSTATUS )0xC00000BBL; } #line 105 // status = CdAudioAddDevice(& d, & devobj); #line 107 stub_driver_init(); #line 109 if(! ((NTSTATUS )status >= 0)) #line 109 return - 1; #line 113 switch(__BLAST_NONDET) { #line 127 case 2: #line 127 ; { #line 128 extern NTSTATUS CdAudioDeviceControl(PDEVICE_OBJECT , PIRP ) ; #line 129 status = CdAudioDeviceControl(& devobj, pirp); } #line 130 break; #line 133 case 3: #line 133 ; { #line 134 extern NTSTATUS CdAudioPnp(PDEVICE_OBJECT , PIRP ) ; #line 135 status = CdAudioPnp(& devobj, pirp); } #line 136 break; #line 139 case 4: #line 139 ; { #line 140 extern NTSTATUS CdAudioPower(PDEVICE_OBJECT , PIRP ) ; #line 141 status = CdAudioPower(& devobj, pirp); } #line 142 break; #line 204 default : #line 204 ; return - 1; } #line 210 if(we_should_unload) { #line 211 extern void CdAudioUnload(PDRIVER_OBJECT ) ; CdAudioUnload(& d); } } #line 216 RETPT: { #line 217 if(pended == 1 && s == NP) { #line 218 s = NP; } else { #line 220 if(pended == 1 && s == MPR3) { #line 221 s = MPR3; } else { #line 223 if(s == UNLOADED || status == - 1) { #line 224 ; } else { #line 226 if(s != SKIP2 && s != IPC && s != DC) #line 226 errorFn(); else { #line 228 if(pended == 1) { #line 229 if(status != 259) #line 229 errorFn(); } else { #line 231 if(s == DC) { #line 232 if(status == 259) #line 232 errorFn(); } else { #line 234 if(status != lowerDriverReturn) #line 234 errorFn(); } } } } } } } #line 241 return status; } char _SLAM_alloc_dummy ; char * nondet_malloc(int i ) { #line 247 int __BLAST_NONDET ; #line 249 if(__BLAST_NONDET) { #line 250 return (char * )0; } else #line 251 return (char * )malloc(i); } #line 260 __declspec(dllimport) void ExAcquireFastMutex(PFAST_MUTEX FastMutex ) { #line 267 return; } __declspec(dllimport) void ExReleaseFastMutex(PFAST_MUTEX FastMutex ) { #line 277 return; } #line 294 __declspec(dllimport) PVOID __stdcall ExAllocatePoolWithTag(POOL_TYPE PoolType , SIZE_T NumberOfBytes , ULONG Tag ) { #line 303 PVOID x ; x = nondet_malloc(NumberOfBytes); return x; } #line 309 __declspec(dllimport) void __stdcall ExFreePool(PVOID P ) { #line 315 return; } __declspec(dllimport) PLIST_ENTRY ExfInterlockedInsertHeadList(PLIST_ENTRY ListHead , PLIST_ENTRY ListEntry , PKSPIN_LOCK Lock ) { #line 326 return (void * )0; } __declspec(dllimport) PLIST_ENTRY ExfInterlockedInsertTailList(PLIST_ENTRY ListHead , PLIST_ENTRY ListEntry , PKSPIN_LOCK Lock ) { #line 338 return (void * )0; } __declspec(dllimport) PLIST_ENTRY ExfInterlockedRemoveHeadList(PLIST_ENTRY ListHead , PKSPIN_LOCK Lock ) { #line 349 return (void * )0; } #line 365 __declspec(dllimport) PMDL IoAllocateMdl(PVOID VirtualAddress , ULONG Length , BOOLEAN SecondaryBuffer , BOOLEAN ChargeQuota , PIRP Irp ) { #line 375 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 377 case 0: #line 377 ; #line 377 return (void * )nondet_malloc(sizeof(MDL )); default : #line 378 ; #line 378 return (void * )0; } } __declspec(dllimport) PDEVICE_OBJECT IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice , PDEVICE_OBJECT TargetDevice ) { #line 389 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 391 case 0: #line 391 ; #line 391 return TargetDevice; default : #line 392 ; #line 392 return (void * )0; } } __declspec(dllimport) PIRP IoBuildAsynchronousFsdRequest(ULONG MajorFunction , PDEVICE_OBJECT DeviceObject , PVOID Buffer , ULONG Length , PLARGE_INTEGER StartingOffset , PIO_STATUS_BLOCK IoStatusBlock ) { #line 407 int __BLAST_NONDET ; customIrp = 1; #line 410 switch(__BLAST_NONDET) { #line 411 case 0: #line 411 ; #line 411 return (void * )malloc(sizeof(IRP )); default : #line 412 ; #line 412 return (void * )0; } } #line 427 __declspec(dllimport) PIRP IoBuildDeviceIoControlRequest(ULONG IoControlCode , PDEVICE_OBJECT DeviceObject , PVOID InputBuffer , ULONG InputBufferLength , PVOID OutputBuffer , ULONG OutputBufferLength , BOOLEAN InternalDeviceIoControl , PKEVENT Event , PIO_STATUS_BLOCK IoStatusBlock ) { #line 441 int __BLAST_NONDET ; customIrp = 1; #line 444 switch(__BLAST_NONDET) { #line 445 case 0: #line 445 ; #line 445 return (void * )malloc(sizeof(IRP )); default : #line 446 ; #line 446 return (void * )0; } } __declspec(dllimport) NTSTATUS IoCreateDevice(PDRIVER_OBJECT DriverObject , ULONG DeviceExtensionSize , PUNICODE_STRING DeviceName , ULONG DeviceType , ULONG DeviceCharacteristics , BOOLEAN Exclusive , PDEVICE_OBJECT * DeviceObject ) { #line 462 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 464 case 0: #line 464 ; #line 464 * DeviceObject = (void * )malloc(sizeof(DEVICE_OBJECT )); return (NTSTATUS )0x00000000L; #line 471 default : #line 471 ; #line 471 return (NTSTATUS )0xC0000001L; } } #line 476 __declspec(dllimport) NTSTATUS IoCreateSymbolicLink(PUNICODE_STRING SymbolicLinkName , PUNICODE_STRING DeviceName ) { #line 483 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 485 case 0: #line 485 ; #line 485 return (NTSTATUS )0x00000000L; default : #line 486 ; #line 486 return (NTSTATUS )0xC0000001L; } } __declspec(dllimport) void IoDeleteDevice(PDEVICE_OBJECT DeviceObject ) { } #line 499 __declspec(dllimport) NTSTATUS IoDeleteSymbolicLink(PUNICODE_STRING SymbolicLinkName ) { #line 505 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 507 case 0: #line 507 ; #line 507 return (NTSTATUS )0x00000000L; default : #line 508 ; #line 508 return (NTSTATUS )0xC0000001L; } } __declspec(dllimport) void IoDetachDevice(PDEVICE_OBJECT TargetDevice ) { } #line 521 __declspec(dllimport) void IoFreeIrp(PIRP Irp ) { } #line 530 __declspec(dllimport) void IoFreeMdl(PMDL Mdl ) { } #line 539 __declspec(dllimport) PCONFIGURATION_INFORMATION IoGetConfigurationInformation(void ) { #line 544 return (void * )nondet_malloc(sizeof(CONFIGURATION_INFORMATION )); } __declspec(dllimport) NTSTATUS IoQueryDeviceDescription(PINTERFACE_TYPE BusType , PULONG BusNumber , PCONFIGURATION_TYPE ControllerType , PULONG ControllerNumber , PCONFIGURATION_TYPE PeripheralType , PULONG PeripheralNumber , PIO_QUERY_DEVICE_ROUTINE CalloutRoutine , PVOID Context ) { #line 560 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 562 case 0: #line 562 ; #line 562 return (NTSTATUS )0x00000000L; default : #line 563 ; #line 563 return (NTSTATUS )0xC0000001L; } } __declspec(dllimport) NTSTATUS __stdcall IoRegisterDeviceInterface(PDEVICE_OBJECT PhysicalDeviceObject , const GUID * InterfaceClassGuid , PUNICODE_STRING ReferenceString , PUNICODE_STRING SymbolicLinkName ) { #line 577 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 579 case 0: #line 579 ; #line 579 return (NTSTATUS )0x00000000L; default : #line 580 ; #line 580 return (NTSTATUS )0xC0000010L; } } __declspec(dllimport) void IoReleaseCancelSpinLock(KIRQL Irql ) { } #line 593 __declspec(dllimport) NTSTATUS IoSetDeviceInterfaceState(PUNICODE_STRING SymbolicLinkName , BOOLEAN Enable ) { #line 600 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 602 case 0: #line 602 ; #line 602 return (NTSTATUS )0x00000000L; #line 607 default : #line 607 ; #line 607 return (NTSTATUS )0xC0000001L; } } #line 612 __declspec(dllimport) void IoSetHardErrorOrVerifyDevice(PIRP Irp , PDEVICE_OBJECT DeviceObject ) { } #line 625 void stubMoreProcessingRequired() { #line 628 if(s == NP) #line 628 s = MPR1; else #line 629 errorFn(); } __declspec(dllimport) NTSTATUS IofCallDriver(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 640 int __BLAST_NONDET ; NTSTATUS returnVal2 ; int compRetStatus ; PVOID lcontext ; #line 645 if(compRegistered) { #line 646 /* compRetStatus = (* compFptr)(DeviceObject, Irp, lcontext); */ if(routine==0) compRetStatus = HPCdrCompletion(DeviceObject, Irp, lcontext); else { if(routine==1) compRetStatus = CdAudioSignalCompletion(DeviceObject, Irp, lcontext); } if(compRetStatus == (NTSTATUS )0xC0000016L) #line 647 stubMoreProcessingRequired(); } #line 652 if(Irp->PendingReturned) { returnVal2 = (NTSTATUS)259; } else { switch(__BLAST_NONDET) { #line 653 case 0: #line 653 ; #line 653 returnVal2 = (NTSTATUS )0x00000000L; #line 653 break; #line 655 case 1: #line 655 ; #line 655 returnVal2 = (NTSTATUS )0xC0000001L; #line 655 break; #line 657 default : #line 657 ; #line 657 returnVal2 = (NTSTATUS )0x00000103L; #line 657 break; } } if(s == NP) { #line 660 s = IPC; #line 660 lowerDriverReturn = returnVal2; } else { #line 662 if(s == MPR1) { #line 663 if(returnVal2 == 259) { #line 664 s = MPR3; #line 664 lowerDriverReturn = returnVal2; } else { #line 666 s = NP; #line 666 lowerDriverReturn = returnVal2; } } else { #line 669 if(s == SKIP1) { #line 669 s = SKIP2; #line 669 lowerDriverReturn = returnVal2; } else #line 670 errorFn(); } } return returnVal2; } #line 695 __declspec(dllimport) void IofCompleteRequest(PIRP Irp , CCHAR PriorityBoost ) { #line 703 if(s == NP) #line 703 s = DC; else #line 704 errorFn(); } __declspec(dllimport) KIRQL KeAcquireSpinLockRaiseToDpc(PKSPIN_LOCK SpinLock ) { } #line 716 __declspec(dllimport) NTSTATUS KeDelayExecutionThread(KPROCESSOR_MODE WaitMode , BOOLEAN Alertable , PLARGE_INTEGER Interval ) { #line 724 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 726 case 0: #line 726 ; #line 726 return (NTSTATUS )0x00000000L; #line 731 default : #line 731 ; #line 731 return (NTSTATUS )0xC0000001L; } } #line 736 __declspec(dllimport) void KeInitializeEvent(PRKEVENT Event , EVENT_TYPE Type , BOOLEAN State ) { } #line 747 __declspec(dllimport) void KeInitializeSemaphore(PRKSEMAPHORE Semaphore , LONG Count , LONG Limit ) { } #line 758 __declspec(dllimport) void __stdcall KeInitializeSpinLock(PKSPIN_LOCK SpinLock ) { } #line 768 __declspec(dllimport) LONG KeReleaseSemaphore(PRKSEMAPHORE Semaphore , KPRIORITY Increment , LONG Adjustment , BOOLEAN Wait ) { #line 777 LONG r ; return r; } __declspec(dllimport) void KfReleaseSpinLock(PKSPIN_LOCK SpinLock , KIRQL NewIrql ) { } #line 792 __declspec(dllimport) LONG KeSetEvent(PRKEVENT Event , KPRIORITY Increment , BOOLEAN Wait ) { #line 800 LONG l ; #line 802 setEventCalled = 1; #line 804 return l; } __declspec(dllimport) NTSTATUS KeWaitForSingleObject(PVOID Object , KWAIT_REASON WaitReason , KPROCESSOR_MODE WaitMode , BOOLEAN Alertable , PLARGE_INTEGER Timeout ) { #line 817 int __BLAST_NONDET ; if(s == MPR3 && setEventCalled == 1) { #line 819 s = NP; #line 819 setEventCalled = 0; } else { #line 821 if(customIrp == 1) { #line 822 s = NP; #line 822 customIrp = 0; } else { #line 824 if(s == MPR3) #line 824 errorFn(); } } #line 828 switch(__BLAST_NONDET) { #line 829 case 0: #line 829 ; #line 829 return (NTSTATUS )0x00000000L; #line 835 default : #line 835 ; #line 835 return (NTSTATUS )0xC0000001L; } } #line 840 __declspec(dllimport) PVOID MmAllocateContiguousMemory(SIZE_T NumberOfBytes , PHYSICAL_ADDRESS HighestAcceptableAddress ) { #line 846 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 848 case 0: #line 848 ; #line 848 return malloc(NumberOfBytes); case 1: #line 849 ; #line 849 return (void * )0; } } __declspec(dllimport) void MmFreeContiguousMemory(PVOID BaseAddress ) { } #line 862 __declspec(dllimport) PVOID MmMapLockedPagesSpecifyCache(PMDL MemoryDescriptorList , KPROCESSOR_MODE AccessMode , MEMORY_CACHING_TYPE CacheType , PVOID BaseAddress , ULONG BugCheckOnFailure , MM_PAGE_PRIORITY Priority ) { #line 873 return (void * )0; } __declspec(dllimport) PVOID MmPageEntireDriver(PVOID AddressWithinSection ) { #line 882 return (void * )0; } __declspec(dllimport) void MmResetDriverPaging(PVOID AddressWithinSection ) { } #line 895 __declspec(dllimport) void MmUnlockPages(PMDL MemoryDescriptorList ) { } #line 904 __declspec(dllimport) NTSTATUS ObReferenceObjectByHandle(HANDLE Handle , ACCESS_MASK DesiredAccess , POBJECT_TYPE ObjectType , KPROCESSOR_MODE AccessMode , PVOID * Object , POBJECT_HANDLE_INFORMATION HandleInformation ) { #line 915 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 917 case 0: #line 917 ; #line 917 return (NTSTATUS )0x00000000L; #line 923 default : #line 923 ; #line 923 return (NTSTATUS )0xC0000001L; } } #line 929 __declspec(dllimport) void ObfDereferenceObject(PVOID Object ) { } #line 939 __declspec(dllimport) NTSTATUS PoCallDriver(PDEVICE_OBJECT DeviceObject , PIRP Irp ) { #line 946 int __BLAST_NONDET ; int compRetStatus ; NTSTATUS returnVal ; #line 950 PVOID lcontext ; #line 952 if(compRegistered) { #line 953 /* compRetStatus = (* compFptr)(DeviceObject, Irp, lcontext); */ if(routine==0) compRetStatus = HPCdrCompletion(DeviceObject, Irp, lcontext); else { if(routine==1) compRetStatus = CdAudioSignalCompletion(DeviceObject, Irp, lcontext); } if(compRetStatus == (NTSTATUS )0xC0000016L) #line 954 stubMoreProcessingRequired(); } #line 959 switch(__BLAST_NONDET) { #line 960 case 0: #line 960 ; returnVal = (NTSTATUS )0x00000000L; break; case 1: #line 963 ; returnVal = (NTSTATUS )0xC0000001L; break; default : #line 966 ; returnVal = (NTSTATUS )0x00000103L; #line 967 break; } if(s == NP) { #line 970 s = IPC; #line 970 lowerDriverReturn = returnVal; } else { #line 972 if(s == MPR1) { #line 973 if(returnVal == (NTSTATUS )0x00000103L) { #line 974 s = MPR3; #line 974 lowerDriverReturn = returnVal; } else { #line 976 s = NP; #line 976 lowerDriverReturn = returnVal; } } else { #line 979 if(s == SKIP1) { #line 979 s = SKIP2; #line 979 lowerDriverReturn = returnVal; } else #line 980 errorFn(); } } return returnVal; } __declspec(dllimport) void PoStartNextPowerIrp(PIRP Irp ) { } #line 995 __declspec(dllimport) NTSTATUS PsCreateSystemThread(PHANDLE ThreadHandle , ULONG DesiredAccess , POBJECT_ATTRIBUTES ObjectAttributes , HANDLE ProcessHandle , PCLIENT_ID ClientId , PKSTART_ROUTINE StartRoutine , PVOID StartContext ) { #line 1007 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 1009 case 0: #line 1009 ; #line 1009 return (NTSTATUS )0x00000000L; default : #line 1010 ; #line 1010 return (NTSTATUS )0xC0000001L; } } __declspec(dllimport) NTSTATUS PsTerminateSystemThread(NTSTATUS ExitStatus ) { #line 1020 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 1022 case 0: #line 1022 ; #line 1022 return (NTSTATUS )0x00000000L; default : #line 1023 ; #line 1023 return (NTSTATUS )0xC0000001L; } } #line 1028 __declspec(dllimport) NTSTATUS __stdcall RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString , PANSI_STRING SourceString , BOOLEAN AllocateDestinationString ) { #line 1037 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 1039 case 0: #line 1039 ; #line 1039 return (NTSTATUS )0x00000000L; default : #line 1040 ; #line 1040 return (NTSTATUS )0xC0000001L; } } __declspec(dllimport) SIZE_T __stdcall RtlCompareMemory(const void * Source1 , const void * Source2 , SIZE_T Length ) { #line 1053 SIZE_T r ; return r; } __declspec(dllimport) void __stdcall RtlCopyUnicodeString(PUNICODE_STRING DestinationString , PUNICODE_STRING SourceString ) { } #line 1068 __declspec(dllimport) NTSTATUS __stdcall RtlDeleteRegistryValue(ULONG RelativeTo , PCWSTR Path , PCWSTR ValueName ) { #line 1077 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 1079 case 0: #line 1079 ; #line 1079 return (NTSTATUS )0x00000000L; default : #line 1080 ; #line 1080 return (NTSTATUS )0xC0000001L; } } __declspec(dllimport) void __stdcall RtlFreeUnicodeString(PUNICODE_STRING UnicodeString ) { } #line 1094 __declspec(dllimport) void __stdcall RtlInitString(PSTRING DestinationString , PCSZ SourceString ) { } #line 1105 __declspec(dllimport) void __stdcall RtlInitUnicodeString(PUNICODE_STRING DestinationString , PCWSTR SourceString ) { } #line 1117 __declspec(dllimport) NTSTATUS __stdcall RtlQueryRegistryValues(ULONG RelativeTo , PCWSTR Path , PRTL_QUERY_REGISTRY_TABLE QueryTable , PVOID Context , PVOID Environment ) { #line 1128 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 1130 case 0: #line 1130 ; #line 1130 return (NTSTATUS )0x00000000L; #line 1135 default : #line 1135 ; #line 1135 return (NTSTATUS )0xC0000001L; } } __declspec(dllimport) NTSTATUS __stdcall ZwClose(HANDLE Handle ) { #line 1146 int __BLAST_NONDET ; switch(__BLAST_NONDET) { #line 1148 case 0: #line 1148 ; #line 1148 return (NTSTATUS )0x00000000L; #line 1154 default : #line 1154 ; #line 1154 return (NTSTATUS )0xC0000001L; } }