27 IN
char *TextControlCode,
29 IN PVOID InBuffer, IN ULONG InBufferSize,
30 OUT PVOID OutBuffer, IN ULONG OutBufferSize);
37 #define CBMCTRL( _x_ ) CBMCTRL_##_x_, "CBMCTRL_" #_x_
39 #define CBMCTRL( _x_ ) CBMCTRL_##_x_
47 extern LONG
RegGetDWORD(IN HKEY RegKey, IN
char *SubKey, OUT LPDWORD Value);
57 #define REGKEY_EVENTLOG \
58 "System\\CurrentControlSet\\Services\\Eventlog\\System\\opencbm"
60 extern PCHAR FormatErrorMessage(DWORD Error);
61 extern BOOL
CbmInstall(IN LPCTSTR DriverName, IN LPCTSTR ServiceExe, IN BOOL AutomaticStart);
63 extern BOOL
CbmRemove(IN LPCTSTR DriverName);
72 IN ULONG IecCableType,
73 IN ULONG PermanentlyLock,
74 IN BOOL DebugFlagsDriverPresent, IN ULONG DebugFlagsDriver,
75 IN BOOL DebugFlagsDllPresent, IN ULONG DebugFlagsDll);
78 extern VOID CbmOutputDebuggingBuffer(VOID);
BOOL cbm_driver_install(OUT PULONG Buffer, IN ULONG BufferLen)
Complete driver installation, "direct version".
BOOL cbm_driver_stop(VOID)
Stop a device driver.
BOOL CbmCheckPresence(IN LPCTSTR DriverName)
Check for the presence of the driver.
VOID WaitForIoCompletionConstruct(LPOVERLAPPED Overlapped)
Boilerplate code for asynchronous I/O requests.
LONG RegGetDWORD(IN HKEY RegKey, IN char *SubKey, OUT LPDWORD Value)
Get a DWORD value from the registry.
BOOL CbmRemove(IN LPCTSTR DriverName)
Remove the driver.
BOOL cbm_driver_start(VOID)
Start a device driver.
VOID WaitForIoCompletionDeinit(VOID)
Uninitialize WaitForIoCompletion()
Shared library / DLL for accessing the driver Read configuration file.
BOOL WaitForIoCompletion(BOOL Result, CBM_FILE HandleDevice, LPOVERLAPPED Overlapped, DWORD *BytesTransferred)
Wait for the completion of an I/O operation.
BOOL IsDriverStartedAutomatically(VOID)
Is the driver started automatically?
VOID WaitForIoCompletionInit(VOID)
Initialize WaitForIoCompletion()
DLL interface for accessing the driver.
VOID CbmParportRestart(VOID)
Restart the parallel port.
BOOL CbmInstall(IN LPCTSTR DriverName, IN LPCTSTR ServiceExe, IN BOOL AutomaticStart)
Install the driver.
int CbmCheckDriver(void)
Check for the correct installation.
VOID WaitForIoCompletionCancelAll(VOID)
Cancel any running WaitForIoCompletion()
BOOL cbm_ioctl(IN CBM_FILE HandleDevice, IN DWORD ControlCode, IN char *TextControlCode, IN PVOID InBuffer, IN ULONG InBufferSize, OUT PVOID OutBuffer, IN ULONG OutBufferSize)
Perform an ioctl on the driver.
BOOL CbmUpdateParameter(IN ULONG DefaultLpt, IN ULONG IecCableType, IN ULONG PermanentlyLock, IN BOOL DebugFlagsDriverPresent, IN ULONG DebugFlagsDriver, IN BOOL DebugFlagsDllPresent, IN ULONG DebugFlagsDll)
Update the parameter of the driver.