00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #define DATA_PORT_OFFSET 0
00025 #define STATUS_PORT_OFFSET 1
00026 #define CONTROL_PORT_OFFSET 2
00027
00028 #define LPT1_PORT_STATUS 0x3bd
00029 #define LPT2_PORT_STATUS 0x379
00030 #define LPT3_PORT_STATUS 0x279
00031 #define LPT_MASK 0xff0
00032 #define IRQ 0x10
00033
00034 #define NOTBUSY 0x80
00035 #define HOST_LPT_BUSY (1 << 0)
00036 #define STATUS_REG_MASK 0x07
00037
00038 #define get_status(adap) (*(PUCHAR)((ULONG)(((PVDM_PROCESS_OBJECTS)(PsGetCurrentProcess()->VdmObjects))->PrinterStatus)+(ULONG)adap))
00039 #define get_control(adap) (*(PUCHAR)((ULONG)(((PVDM_PROCESS_OBJECTS)(PsGetCurrentProcess()->VdmObjects))->PrinterControl)+(ULONG)adap))
00040 #define host_lpt_status(adap) (*(PUCHAR)((ULONG)(((PVDM_PROCESS_OBJECTS)(PsGetCurrentProcess()->VdmObjects))->PrinterHostState)+(ULONG)adap))
00041 #define set_status(adap,val) *(PUCHAR)((ULONG)(((PVDM_PROCESS_OBJECTS)(PsGetCurrentProcess()->VdmObjects))->PrinterStatus)+(ULONG)adap) = val
00042
00043
00044
extern NTSTATUS PspSetProcessIoHandlers(
00045 IN
PEPROCESS Process,
00046 IN PVOID IoHandlerInformation,
00047 IN ULONG IoHandlerLength
00048 );
00049
extern NTSTATUS VdmFlushPrinterWriteData(USHORT Adapter);