22#define BugCheckFileId (CDFS_BUG_CHECK_DEVIOSUP)
96#define MAX_PARALLEL_IOS 5
187CdReadAudioSystemFile (
197CdReadDirDataThroughCache (
203#pragma alloc_text(PAGE, CdCreateUserMdl)
204#pragma alloc_text(PAGE, CdMultipleAsync)
205#pragma alloc_text(PAGE, CdMultipleXAAsync)
206#pragma alloc_text(PAGE, CdNonCachedRead)
207#pragma alloc_text(PAGE, CdNonCachedXARead)
208#pragma alloc_text(PAGE, CdVolumeDasdWrite)
209#pragma alloc_text(PAGE, CdFinishBuffers)
210#pragma alloc_text(PAGE, CdPerformDevIoCtrl)
211#pragma alloc_text(PAGE, CdPerformDevIoCtrlEx)
212#pragma alloc_text(PAGE, CdPrepareBuffers)
213#pragma alloc_text(PAGE, CdPrepareXABuffers)
214#pragma alloc_text(PAGE, CdReadAudioSystemFile)
215#pragma alloc_text(PAGE, CdReadSectors)
216#pragma alloc_text(PAGE, CdSingleAsync)
217#pragma alloc_text(PAGE, CdWaitSync)
218#pragma alloc_text(PAGE, CdReadDirDataThroughCache)
219#pragma alloc_text(PAGE, CdFreeDirCache)
220#pragma alloc_text(PAGE, CdLbnToMmSsFf)
221#pragma alloc_text(PAGE, CdHijackIrpAndFlushDevice)
248 Msf[0] = (
UCHAR)(Blocks % 75);
250 Msf[1] = (
UCHAR)(Blocks % 60);
252 Msf[2] = (
UCHAR)Blocks;
345 ULONG CleanupRunCount = 0;
348 ULONG UserBufferOffset = 0;
363 if (IrpContext->Irp->MdlAddress ==
NULL) {
378 CdReadAudioSystemFile( IrpContext,
394 (
VcbMounted == IrpContext->Vcb->VcbCondition)) {
427 Unaligned = CdPrepareBuffers( IrpContext,
439 RunCount = CleanupRunCount;
446 if ((ThisByteCount < RemainingByteCount) &&
458 if ((RunCount == 1) && !Unaligned && FirstPass) {
460 CdSingleAsync( IrpContext,&IoRuns[0],
Fcb );
476 Status = IrpContext->Irp->IoStatus.Status;
496 CdMultipleAsync( IrpContext,
Fcb, RunCount, IoRuns );
511 Status = IrpContext->Irp->IoStatus.Status;
530 FlushIoBuffers =
TRUE;
540 RemainingByteCount -= ThisByteCount;
541 CurrentOffset += ThisByteCount;
542 UserBuffer =
Add2Ptr( UserBuffer, ThisByteCount,
PVOID );
543 UserBufferOffset += ThisByteCount;
559 }
while (RemainingByteCount != 0);
565 if (FlushIoBuffers) {
577 if (CleanupRunCount != 0) {
639 ULONG CleanupRunCount = 0;
642 ULONG UserBufferOffset = 0;
645 ULONG ThisByteCount = 0;
658 if (IrpContext->Irp->MdlAddress ==
NULL) {
669 if (CurrentOffset + RemainingByteCount >
Fcb->FileSize.QuadPart) {
671 RemainingByteCount = (
ULONG) (
Fcb->FileSize.QuadPart - CurrentOffset);
788 RiffHeader = &LocalRiffHeader;
817 RiffHeader = &LocalRiffHeader;
846 UserBuffer =
Add2Ptr( UserBuffer, ThisByteCount,
PVOID );
847 UserBufferOffset += ThisByteCount;
848 CurrentOffset += ThisByteCount;
849 RemainingByteCount -= ThisByteCount;
862 while (RemainingByteCount != 0) {
871 if (!TryingYellowbookMode2) {
876 CdPrepareXABuffers( IrpContext,
894 if (CleanupRunCount != 0) {
896 RunCount = CleanupRunCount;
909 Status = IrpContext->Irp->IoStatus.Status;
917 if (!TryingYellowbookMode2 &&
927 TryingYellowbookMode2 =
TRUE;
944 if (TryingYellowbookMode2) {
954 TryingYellowbookMode2 =
FALSE;
969 RemainingByteCount -= ThisByteCount;
970 CurrentOffset += ThisByteCount;
971 UserBuffer =
Add2Ptr( UserBuffer, ThisByteCount,
PVOID );
972 UserBufferOffset += ThisByteCount;
988 if (CleanupRunCount != 0) {
1051 CdSingleAsync( IrpContext, &IoRun,
Fcb );
1061 Status = IrpContext->Irp->IoStatus.Status;
1150 &IrpContext->Irp->IoStatus );
1188 Status = IrpContext->Irp->IoStatus.Status;
1292#pragma warning(suppress: 6320)
1299 IrpContext->Irp->MdlAddress =
NULL;
1414 if (OverrideVerify) {
1557 PVOID CurrentUserBuffer = UserBuffer;
1558 ULONG CurrentUserBufferOffset = UserBufferOffset;
1566 ULONG CurrentByteCount = RemainingByteCount;
1598 CdLookupAllocation( IrpContext,
1602 &CurrentByteCount );
1608 if (CurrentByteCount > RemainingByteCount) {
1610 CurrentByteCount = RemainingByteCount;
1695 IrpContext->Irp->IoStatus.Information = 0;
1705 FoundUnaligned =
TRUE;
1736 CurrentUserBufferOffset,
1745 RemainingByteCount -= CurrentByteCount;
1752 *ThisByteCount += CurrentByteCount;
1764 CurrentUserBuffer =
Add2Ptr( CurrentUserBuffer, CurrentByteCount,
PVOID );
1765 CurrentUserBufferOffset += CurrentByteCount;
1766 CurrentFileOffset += CurrentByteCount;
1769 return FoundUnaligned;
1844 ULONG RawSectorOffset;
1853 ULONG RemainingCookedByteCount;
1862 PVOID CurrentUserBuffer = UserBuffer;
1863 ULONG CurrentUserBufferOffset = UserBufferOffset;
1872 ULONG CurrentCookedByteCount = 0;
1873 ULONG CurrentRawByteCount;
1896#pragma prefast( suppress: __WARNING_RESULTOFSHIFTCASTTOLARGERSIZE, "This is fine beacuse raw sector size > sector shift" )
1910 CurrentCookedOffset = CurrentRawOffset <<
SECTOR_SHIFT;
1923 RemainingCookedByteCount = CurrentRawByteCount <<
SECTOR_SHIFT;
1939 PerformedCopy =
FALSE;
1954 CdLookupAllocation( IrpContext,
1956 CurrentCookedOffset,
1958 &CurrentCookedByteCount );
1986 if (CurrentRawByteCount > RemainingRawByteCount) {
1988 CurrentRawByteCount = RemainingRawByteCount;
1993 CurrentRawByteCount );
2009 PerformedCopy =
TRUE;
2028 if (!PerformedCopy) {
2034 if (CurrentCookedByteCount > RemainingCookedByteCount) {
2036 CurrentCookedByteCount = RemainingCookedByteCount;
2059 if ((RawSectorOffset == 0) &&
2068 if (CurrentCookedByteCount <= Fcb->
Vcb->MaximumTransferRawSectors *
SECTOR_SIZE) {
2094 while (
RawSectorAlign( CurrentRawByteCount) > RemainingRawByteCount) {
2104 if (CurrentRawByteCount > RemainingRawByteCount) {
2106 CurrentRawByteCount = RemainingRawByteCount;
2123 CurrentUserBufferOffset,
2170 IrpContext->Irp->IoStatus.Information = 0;
2182 RemainingRawByteCount -= CurrentRawByteCount;
2183 *ThisByteCount += CurrentRawByteCount;
2201 CurrentUserBuffer =
Add2Ptr( CurrentUserBuffer, CurrentRawByteCount,
PVOID );
2202 CurrentUserBufferOffset += CurrentRawByteCount;
2204 RawSectorOffset = 0;
2206 CurrentCookedOffset += CurrentCookedByteCount;
2207 RemainingCookedByteCount -= CurrentCookedByteCount;
2266 ULONG RemainingEntries = RunCount;
2267 PIO_RUN ThisIoRun = &IoRuns[RunCount - 1];
2276 while (RemainingEntries != 0) {
2290 if (!FinalCleanup) {
2298 FlushIoBuffers =
TRUE;
2307 if (ThisIoRun->
TransferMdl != IrpContext->Irp->MdlAddress) {
2329 Vcb = IrpContext->Vcb;
2341 SaveXABuffer =
FALSE;
2377 RemainingEntries -= 1;
2384 return FlushIoBuffers;
2454 if (
NULL != IrpContext->Vcb->SectorCacheBuffer) {
2457 CdFreePool( &IrpContext->Vcb->SectorCacheBuffer);
2464CdReadDirDataThroughCache (
2496 PUCHAR UserBuffer =
Run->TransferBuffer;
2500 ULONG BufferSectorOffset;
2530 if (
NULL ==
Vcb->SectorCacheBuffer) {
2545 if ((
Vcb->SecCacheChunks[
Index].BaseLbn != -1) &&
2560 BufferSectorOffset =
Lbn -
Buffer->BaseLbn;
2593 Vcb->SecCacheMisses += 1;
2602 Buffer = &
Vcb->SecCacheChunks[
Vcb->SecCacheLRUChunkIndex];
2611 if (
Vcb->CdromToc) {
2613 TrackData = &
Vcb->CdromToc->TrackData[(
Vcb->CdromToc->LastTrack -
Vcb->CdromToc->FirstTrack + 1)];
2617 Blocks = EndBlock - StartBlock;
2630 if ((0 == Blocks) || (
Lbn < 16)) {
2660 Vcb->SectorCacheIrp);
2662 if (
NULL ==
Vcb->SectorCacheIrp->MdlAddress) {
2664 IrpContext->Irp->IoStatus.Information = 0;
2680#pragma warning(suppress: 6320)
2685 Vcb->SectorCacheIrp->MdlAddress =
NULL;
2688 if (
NULL ==
Vcb->SectorCacheIrp->MdlAddress) {
2705 &
Vcb->SectorCacheEvent,
2710 Vcb->SectorCacheIrp->UserIosb = &
Iosb;
2723 Status =
Vcb->SectorCacheIrp->IoStatus.Status;
2726 Vcb->SectorCacheIrp->UserIosb =
NULL;
2734 Vcb->SectorCacheIrp->MdlAddress =
NULL;
2746 Buffer->BaseLbn = StartBlock;
2825 ULONG UnwindRunCount;
2847 (
VcbMounted == IrpContext->Vcb->VcbCondition)) {
2849 UseSectorCache =
TRUE;
2853 UseSectorCache =
FALSE;
2860 MasterIrp = IrpContext->Irp;
2867 for (UnwindRunCount = 0;
2868 UnwindRunCount < RunCount;
2869 UnwindRunCount += 1) {
2871 if (UseSectorCache) {
2873 if (!CdReadDirDataThroughCache( IrpContext, &IoRuns[ UnwindRunCount])) {
2879 UseSectorCache =
FALSE;
2891 IoRuns[UnwindRunCount].SavedIrp =
2896 IrpContext->Irp->IoStatus.Information = 0;
2905 IoRuns[UnwindRunCount].DiskByteCount,
2912 IrpContext->Irp->IoStatus.Information = 0;
2918 IoRuns[UnwindRunCount].TransferVirtualAddress,
2919 IoRuns[UnwindRunCount].DiskByteCount );
2942 IrpContext->IoContext,
2967 if (UseSectorCache) {
2985 IrpContext->IoContext->IrpCount = RunCount;
2986 IrpContext->IoContext->MasterIrp = MasterIrp;
3008 IrpContext->IoContext->ResourceThreadId = ((
ULONG_PTR)IrpContext->IoContext) | 3;
3011 (
PVOID)IrpContext->IoContext->ResourceThreadId );
3018 for (UnwindRunCount = 0;
3019 UnwindRunCount < RunCount;
3022 Irp = IoRuns[UnwindRunCount].SavedIrp;
3023 IoRuns[UnwindRunCount].SavedIrp =
NULL;
3101 ULONG UnwindRunCount;
3113 MasterIrp = IrpContext->Irp;
3120 for (UnwindRunCount = 0;
3121 UnwindRunCount < RunCount;
3122 UnwindRunCount += 1, ThisIoRun += 1, ThisRawRead += 1) {
3134 IrpContext->Irp->IoStatus.Information = 0;
3159 IrpContext->Irp->IoStatus.Information = 0;
3189 IrpContext->IoContext,
3228 IrpContext->IoContext->IrpCount = RunCount;
3229 IrpContext->IoContext->MasterIrp = MasterIrp;
3244 for (UnwindRunCount = 0;
3245 UnwindRunCount < RunCount;
3248 Irp = IoRuns[UnwindRunCount].SavedIrp;
3249 IoRuns[UnwindRunCount].SavedIrp =
NULL;
3311 (
VcbMounted == IrpContext->Vcb->VcbCondition)) {
3313 if (CdReadDirDataThroughCache( IrpContext,
Run )) {
3347 IrpContext->IoContext->ResourceThreadId = ((
ULONG_PTR)IrpContext->IoContext) | 3;
3350 (
PVOID)IrpContext->IoContext->ResourceThreadId );
3360 IrpContext->IoContext,
3390 (
VOID)
IoCallDriver( IrpContext->Vcb->TargetDeviceObject, IrpContext->Irp );
3695 Irp->IoStatus.Information = 0;
3751 Irp->IoStatus.Information = 0;
3788CdReadAudioSystemFile (
3834 PVOID CurrentSector;
3866 RawPath->
DirId[0] =
'\0';
3902 RawDirent = SystemBuffer;
3916 RawDirent->
FileId[0] =
'\0';
3943 RawDirent->
FileId[0] =
'\1';
3993 CurrentSector = SystemBuffer;
4012 if (CurrentTrack >= IrpContext->Vcb->TrackCount) {
4017 ThisTrack = &IrpContext->Vcb->CdromToc->TrackData[CurrentTrack];
4056 TrackOnes = (TrackOnes % 10) +
'0';
4059 TrackTens = (TrackTens % 10) +
'0';
4189 Irp->IoStatus.Status = 0;
4190 Irp->IoStatus.Information = 0;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedIncrement
#define InterlockedExchange
#define InterlockedDecrement
#define SYSTEM_XA_SIGNATURE
#define CD_ATTRIBUTE_DIRECTORY
RAW_PATH_ISO * PRAW_PATH_ISO
LONG CdXAAudioPhileHeader[]
UCHAR CdAudioFileNameLength
ULONG CdAudioDirentsPerSector
ULONG CdAudioSystemUseOffset
#define AUDIO_NAME_TENS_OFFSET
#define AUDIO_NAME_ONES_OFFSET
#define ASSERT_IRP_CONTEXT(IC)
__inline TRACK_MODE_TYPE CdFileTrackMode(_In_ PFCB Fcb)
NTSTATUS CdHijackIrpAndFlushDevice(_In_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp, _In_ PDEVICE_OBJECT TargetDeviceObject)
VOID CdMultipleXAAsync(_In_ PIRP_CONTEXT IrpContext, _In_ ULONG RunCount, _Inout_ PIO_RUN IoRuns, _In_ PRAW_READ_INFO RawReads, _In_ TRACK_MODE_TYPE TrackMode)
NTSTATUS NTAPI CdMultiSyncCompletionRoutine(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
NTSTATUS NTAPI CdSingleAsyncCompletionRoutine(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
NTSTATUS NTAPI CdMultiAsyncCompletionRoutine(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
IO_COMPLETION_ROUTINE CdSyncCompletionRoutine
BOOLEAN CdReadSectors(_In_ PIRP_CONTEXT IrpContext, _In_ LONGLONG StartingOffset, _In_ ULONG ByteCount, _In_ BOOLEAN ReturnError, _Out_writes_bytes_(ByteCount) PVOID Buffer, _In_ PDEVICE_OBJECT TargetDeviceObject)
BOOLEAN CdFinishBuffers(_In_ PIRP_CONTEXT IrpContext, _Inout_ PIO_RUN IoRuns, _In_ ULONG RunCount, _In_ BOOLEAN FinalCleanup, _In_ BOOLEAN SaveXABuffer)
NTSTATUS CdCreateUserMdl(_In_ PIRP_CONTEXT IrpContext, _In_ ULONG BufferLength, _In_ BOOLEAN RaiseOnError, _In_ LOCK_OPERATION Operation)
NTSTATUS CdPerformDevIoCtrlEx(_In_ PIRP_CONTEXT IrpContext, _In_ ULONG IoControlCode, _In_ PDEVICE_OBJECT Device, _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, _In_ ULONG InputBufferLength, _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer, _In_ ULONG OutputBufferLength, _In_ BOOLEAN InternalDeviceIoControl, _In_ BOOLEAN OverrideVerify, _Out_opt_ PIO_STATUS_BLOCK Iosb)
VOID CdWaitSync(_In_ PIRP_CONTEXT IrpContext)
NTSTATUS FASTCALL CdPerformDevIoCtrl(_In_ PIRP_CONTEXT IrpContext, _In_ ULONG IoControlCode, _In_ PDEVICE_OBJECT Device, _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer, _In_ ULONG OutputBufferLength, _In_ BOOLEAN InternalDeviceIoControl, _In_ BOOLEAN OverrideVerify, _Out_opt_ PIO_STATUS_BLOCK Iosb)
NTSTATUS NTAPI CdSingleSyncCompletionRoutine(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
_In_ PFCB _In_ LONGLONG _Out_ PLONGLONG DiskOffset
#define SwapCopyUchar4(Dst, Src)
#define CdMapUserBuffer(IC, UB)
#define LlSectorTruncate(L)
#define CdReleaseCache(IC)
_Inout_ PFCB _In_ BOOLEAN RaiseOnError
#define AssertVerifyDeviceIrp(I)
#define CdAcquireCacheForRead(IC)
_In_ PFCB _In_ LONGLONG StartingOffset
#define CdUnlockVcb(IC, V)
#define LlBytesFromSectors(L)
VOID CdLbnToMmSsFf(_In_ ULONG Blocks, _Out_writes_(3) PUCHAR Msf)
#define CdConvertCacheToShared(IC)
#define CdNormalizeAndRaiseStatus(IC, S)
#define SectorTruncate(L)
static INLINE ULONG SectorsFromLlBytes(ULONGLONG Bytes)
#define RawSectorAlign(B)
#define CdLockUserBuffer(IC, BL, OP)
#define SectorsFromBytes(L)
#define CdAcquireCacheForUpdate(IC)
#define CdFreeIoContext(IO)
#define BytesFromSectors(L)
#define CdRaiseStatus(IC, S)
#define FCB_STATE_MODE2_FILE
#define FCB_STATE_MODE2FORM2_FILE
#define IRP_CONTEXT_FLAG_WAIT
AUDIO_PLAY_HEADER * PAUDIO_PLAY_HEADER
#define VCB_STATE_AUDIO_DISK
#define CD_SEC_CACHE_CHUNKS
struct _RIFF_HEADER RIFF_HEADER
#define FCB_STATE_DA_FILE
#define IRP_CONTEXT_FLAG_ALLOC_IO
#define CD_SEC_CHUNK_BLOCKS
#define IRP_CONTEXT_FLAG_TOP_LEVEL
#define _Requires_lock_held_(lock)
#define _Analysis_assume_lock_held_(lock)
#define NT_SUCCESS(StatCode)
#define CDFS_NTC_FCB_PATH_TABLE
#define SafeNodeType(Ptr)
#define CDFS_NTC_FCB_INDEX
_In_ PIO_STACK_LOCATION IrpSp
#define ExReleaseResourceForThreadLite(res, thrdID)
#define PsGetCurrentThread()
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
#define ClearFlag(_F, _SF)
IN OUT PVCB IN PDEVICE_OBJECT TargetDeviceObject
_Must_inspect_result_ _In_ LONGLONG _In_ LONGLONG Lbn
#define EXCEPTION_EXECUTE_HANDLER
VOID NTAPI IoBuildPartialMdl(IN PMDL SourceMdl, IN PMDL TargetMdl, IN PVOID VirtualAddress, IN ULONG Length)
#define Add2Ptr(PTR, INC)
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
VOID NTAPI MmProbeAndLockPages(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation)
VOID NTAPI MmUnlockPages(IN PMDL Mdl)
VOID NTAPI MmBuildMdlForNonPagedPool(IN PMDL Mdl)
_In_ UINT _In_ UINT BytesToCopy
#define _In_reads_bytes_(s)
#define _Out_writes_bytes_opt_(s)
#define _Analysis_assume_
#define _Out_writes_bytes_(s)
#define _In_reads_bytes_opt_(s)
#define UNREFERENCED_PARAMETER(P)
struct __RAW_READ_INFO RAW_READ_INFO
enum _TRACK_MODE_TYPE TRACK_MODE_TYPE
#define IOCTL_CDROM_RAW_READ
#define ARGUMENT_PRESENT(ArgumentPointer)
VOID NTAPI ExSetResourceOwnerPointer(IN PERESOURCE Resource, IN PVOID OwnerPointer)
PVOID NTAPI FsRtlAllocatePoolWithTag(IN POOL_TYPE PoolType, IN ULONG NumberOfBytes, IN ULONG Tag)
BOOLEAN NTAPI FsRtlIsNtstatusExpected(IN NTSTATUS NtStatus)
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
VOID NTAPI IoReuseIrp(IN OUT PIRP Irp, IN NTSTATUS Status)
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
VOID NTAPI IoFreeIrp(IN PIRP Irp)
PIRP NTAPI IoMakeAssociatedIrp(IN PIRP Irp, IN CCHAR StackSize)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define IRP_MJ_DEVICE_CONTROL
#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
#define STATUS_MORE_PROCESSING_REQUIRED
TRACK_DATA TrackData[MAXIMUM_NUMBER_TRACKS_LARGE]
ERESOURCE_THREAD ResourceThreadId
__volatile NTSTATUS Status
ULONG TransferBufferOffset
PVOID TransferVirtualAddress
union _IO_STACK_LOCATION::@1581 Parameters
struct _IO_STACK_LOCATION::@1581::@1582 DeviceIoControl
struct _IO_STACK_LOCATION::@3980::@3984 Read
union _IRP::@1583 AssociatedIrp
UCHAR FileId[MAX_FILE_ID_LENGTH]
UCHAR DirId[MAX_FILE_ID_LENGTH]
ULONG MaximumTransferRawSectors
ULONG MaximumPhysicalPages
PCDROM_TOC_LARGE CdromToc
TRACK_MODE_TYPE TrackMode
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_INVALID_PARAMETER
#define STATUS_INVALID_USER_BUFFER
#define STATUS_VERIFY_REQUIRED
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE Device
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ _In_ ULONG Flags
ULONG_PTR ERESOURCE_THREAD
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
FORCEINLINE VOID IoSetNextIrpStackLocation(_Inout_ PIRP Irp)
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID _In_ ULONG _In_ BOOLEAN InternalDeviceIoControl
#define SL_OVERRIDE_VERIFY_VOLUME
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
IO_COMPLETION_ROUTINE * PIO_COMPLETION_ROUTINE
#define IRP_MJ_FLUSH_BUFFERS
enum _LOCK_OPERATION LOCK_OPERATION
#define ADDRESS_AND_SIZE_TO_SPAN_PAGES(_Va, _Size)