IoCallDriver in ReactOS
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { /* Call fastcall */ return IofCallDriver(DeviceObject, Irp); } NTSTATUS FASTCALL IofCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PDRIVER_OBJECT DriverObject; PIO_STACK_LOCATION StackPtr; /* Get the Driver Object */ DriverObject = DeviceObject->DriverObject; /* Decrease the current location and check if */ Irp->CurrentLocation--; if ( Irp->CurrentLocation <= 0 ) { /* This IRP ran out of stack, bugcheck */ KeBugCheckEx(NO_MORE_IRP_STACK_LOCATIONS, (ULONG_PTR)Irp, 0, 0, 0); } /* Now update the stack location */ StackPtr = IoGetNextIrpStackLocation(Irp); Irp->Tail.Overlay.CurrentStackLocation = StackPtr; /* Get the Device Object */ StackPtr->DeviceObject = DeviceObject; /* Call it */ return DriverObject->MajorFunction[StackPtr->MajorFunction](DeviceObject, Irp); } |
'Windows Programming > 드라이버' 카테고리의 다른 글
IoCompleteRequest in ReactOS (0) | 2009.06.11 |
---|---|
signtool.exe (0) | 2009.05.27 |
FsRtlRegisterFileSystemFilterCallbacks() - FileMap을 이용한 파일엑세스 모니터링 (1) | 2009.05.15 |
RtlVolumeDeviceToDosName() - 마운트된 디스크의 드라이브 문자 구하기 (0) | 2009.05.15 |
IoGetDiskDeviceObject() - FileSystem Devive Object의 Storage Device Object 얻기 (0) | 2009.05.15 |