254{
258
259#ifdef CD_SANITY
260 PVOID PreviousTopLevel;
261#endif
262
264
265#if DBG
266
268
269#endif
270
272
274
276
277#ifdef CD_SANITY
279#endif
280
281
282
283
284
285 do {
286
287
288
289
290
292
293
294
295
296
297
298 if (IrpContext ==
NULL) {
299
300
301
302
303
304
305
306
308
310
311 } else {
312
314 }
315
317
318
319
320
321
323
324#ifdef CD_SANITY
327#endif
328
329
330
331
332
333 } else {
334
335
336
337
338
339
340
343 }
344
345
346
347
348
349 switch (IrpContext->MajorFunction) {
350
352
353 Status = CdCommonCreate( IrpContext,
Irp );
354 break;
355
357
358 Status = CdCommonClose( IrpContext,
Irp );
359 break;
360
362
363
364
365
366
367
369
371
372 } else {
373
374 Status = CdCommonRead( IrpContext,
Irp );
375 }
376
377 break;
378
380
381 Status = CdCommonWrite( IrpContext,
Irp );
382 break;
383
385
386 Status = CdCommonQueryInfo( IrpContext,
Irp );
387 break;
388
390
391 Status = CdCommonSetInfo( IrpContext,
Irp );
392 break;
393
395
396 Status = CdCommonQueryVolInfo( IrpContext,
Irp );
397 break;
398
400
401 Status = CdCommonDirControl( IrpContext,
Irp );
402 break;
403
405
406 Status = CdCommonFsControl( IrpContext,
Irp );
407 break;
408
410
412 break;
413
415
417 break;
418
420
421 Status = CdCommonCleanup( IrpContext,
Irp );
422 break;
423
425
427 break;
428
430
431 Status = CdCommonShutdown( IrpContext,
Irp );
432 break;
433
434 default :
435
438 }
439
441
444
446
447#ifdef CD_SANITY
450#endif
451
453
455
457}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
VOID CdCompleteRequest(_Inout_opt_ PIRP_CONTEXT IrpContext, _Inout_opt_ PIRP Irp, _In_ NTSTATUS Status)
LONG CdExceptionFilter(_Inout_ PIRP_CONTEXT IrpContext, _In_ PEXCEPTION_POINTERS ExceptionPointer)
VOID CdSetThreadContext(_Inout_ PIRP_CONTEXT IrpContext, _In_ PTHREAD_CONTEXT ThreadContext)
#define ASSERT_OPTIONAL_IRP(I)
NTSTATUS CdCompleteMdl(_In_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp)
VOID CdCleanupIrpContext(_In_ PIRP_CONTEXT IrpContext, _In_ BOOLEAN Post)
NTSTATUS CdCommonLockControl(_Inout_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp)
NTSTATUS CdCommonDevControl(_Inout_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp)
_Ret_valid_ PIRP_CONTEXT CdCreateIrpContext(_In_ PIRP Irp, _In_ BOOLEAN Wait)
#define IRP_CONTEXT_FLAG_MORE_PROCESSING
#define CDFS_NTC_IRP_CONTEXT
#define SafeNodeType(Ptr)
#define KeGetCurrentIrql()
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
#define UNREFERENCED_PARAMETER(P)
PIRP NTAPI IoGetTopLevelIrp(VOID)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionInformation()
#define IRP_MJ_DIRECTORY_CONTROL
#define IRP_MJ_DEVICE_CONTROL
#define IRP_MJ_QUERY_VOLUME_INFORMATION
#define IRP_MJ_LOCK_CONTROL
#define IRP_MJ_SET_INFORMATION
#define IRP_MJ_QUERY_INFORMATION
#define STATUS_INVALID_DEVICE_REQUEST
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_In_ WDFDPC _In_ BOOLEAN Wait
#define IRP_MJ_FILE_SYSTEM_CONTROL