49 PIO_STACK_LOCATION irpSp;
50 PDEVICE_EXTENSION pdx;
57 pdx = Fdo->DeviceExtension;
63 irpSp = IoGetCurrentIrpStackLocation(Irp);
66 if (irpSp->MajorFunction == IRP_MJ_CREATE
67 && irpSp->Parameters.Create.Options & FILE_DIRECTORY_FILE)
72 ntStatus = STATUS_NOT_A_DIRECTORY;
78 switch (irpSp->MajorFunction)
90 irpSp->MajorFunction));
99 FUNC_LEAVE_NTSTATUS(ntStatus);
129 if (Pdx->ParallelPortLock)
133 ntStatus = STATUS_SUCCESS;
142 DBG_PRINT((
DBG_PREFIX "The cable state was wrong, try an UNLOCK/LOCK pair with a RESET to put cable in a known state"));
162 FUNC_LEAVE_NTSTATUS(ntStatus);
192 if (Pdx->ParallelPortLock)
196 if (!Pdx->DoNotReleaseBus)
204 ntStatus = STATUS_SUCCESS;
219 FUNC_LEAVE_NTSTATUS(ntStatus);
#define DBG_IRPPATH_PROCESS(_Where_)
Debug IRPPATH: Processing of the IRP.
#define PERF_EVENT_CLOSE_QUEUE()
NTSTATUS cbm_unlock_parport(IN PDEVICE_EXTENSION Pdx)
Unlock the parallel port for the driver.
#define PERF_EVENT_OPEN_EXECUTE()
NTSTATUS cbm_execute_close(IN PDEVICE_EXTENSION Pdx, IN PIRP Irp)
Execute IRPs containing the IRP_MJ_CLOSE I/O function code.
NTSTATUS cbm_execute_createopen(IN PDEVICE_EXTENSION Pdx, IN PIRP Irp)
Execute IRPs containing the IRP_MJ_CREATEOPEN I/O function code.
Definitions for the libiec library.
NTSTATUS QueueStartPacket(PQUEUE Queue, PIRP Irp, BOOLEAN FastStart, PDEVICE_OBJECT Fdo)
Insert an IRP into a QUEUE object.
#define PERF_EVENT_OPEN_QUEUE()
#define PERF_EVENT_CLOSE_EXECUTE()
VOID cbmiec_release_bus(IN PDEVICE_EXTENSION Pdx)
Release the IEC bus.
#define DBG_IRPPATH_COMPLETE(_Where_)
Debug IRPPATH: Completing of the IRP.
NTSTATUS cbm_lock_parport(IN PDEVICE_EXTENSION Pdx)
Lock the parallel port for the driver.
NTSTATUS cbmiec_reset(IN PDEVICE_EXTENSION Pdx)
Send a RESET to the IEC bus.
Definitions for the opencbm driver.
BOOLEAN cbmiec_is_cable_state_wrong(PDEVICE_EXTENSION Pdx)
@@@
#define DBG_IRPPATH_EXECUTE(_Where_)
Debug IRPPATH: Executing of the IRP.
NTSTATUS QueueCompleteIrp(PQUEUE Queue, PIRP Irp, NTSTATUS StatusCode, ULONG_PTR Information)
Complete an IRP which is on a QUEUE.
NTSTATUS cbm_createopenclose(IN PDEVICE_OBJECT Fdo, IN PIRP Irp)
Services IRPs containing the IRP_MJ_CREATE or IRP_MJ_CLOSE I/O function code.