Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

instcbm.h File Reference

Header for installation routines. More...

Go to the source code of this file.

Defines

#define REGKEY_EVENTLOG   "System\\CurrentControlSet\\Services\\Eventlog\\System\\opencbm"

Functions

PCHAR FormatErrorMessage (DWORD Error)
 Format a returned error code into a string.
BOOL CbmInstall (IN LPCTSTR DriverName, IN LPCTSTR ServiceExe, IN BOOL AutomaticStart)
 Install the driver.
BOOL CbmRemove (IN LPCTSTR DriverName)
 Remove the driver.
BOOL CbmCheckPresence (IN LPCTSTR DriverName)
 Check for the presence of the driver.
BOOL CbmCheckCorrectInstallation (VOID)
 Check if the driver was correctly installed.
VOID CbmParportRestart (VOID)
 Restart the parallel port.
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.
VOID CbmInstallUpdate (VOID)
 Tell the driver to update its settings.


Detailed Description

Header for installation routines.

**************************************************************

Author:
Spiro Trikaliotis
Version:
Id
instcbm.h,v 1.14 2006/03/22 19:53:01 trikalio Exp


Definition in file instcbm.h.


Define Documentation

#define REGKEY_EVENTLOG   "System\\CurrentControlSet\\Services\\Eventlog\\System\\opencbm"
 

Registry key where the opencbm driver is located (under HKLM)

Definition at line 24 of file instcbm.h.

Referenced by CbmRemove(), and CreateLogRegistryKeys().


Function Documentation

BOOL CbmCheckCorrectInstallation VOID   ) 
 

Check if the driver was correctly installed.

This function checks if the driver was correctly installed.

Returns:
FALSE on success, TRUE on error,
This function opens the opencbm driver, tests if anything is ok - especially, if the interrupt could be obtained - and reports this status.

If there was no interrupt available, it tries to enable it on the parallel port.

Definition at line 444 of file startstop.c.

References CBM_I_DRIVER_INSTALL_0M_NO_INTERRUPT, cbm_i_driver_start(), cbm_i_driver_stop(), cbm_i_i_driver_install(), CbmParportRestart(), DBG_PREFIX, DBG_PRINT, FUNC_ENTER, FUNC_LEAVE_BOOL, and IsDriverStartedAutomatically().

BOOL CbmCheckPresence IN LPCTSTR  DriverName  ) 
 

Check for the presence of the driver.

This function checks if the driver is present.

Parameters:
DriverName The name under which the driver is installed.
Returns:
TRUE if the driver is present, FALSE is not, or if there was an error.

Definition at line 497 of file service.c.

References FUNC_ENTER, and FUNC_LEAVE_BOOL.

BOOL CbmInstall IN LPCTSTR  DriverName,
IN LPCTSTR  ServiceExe,
IN BOOL  AutomaticStart
 

Install the driver.

This function installs the opencbm driver on the machine.

Parameters:
DriverName The name under which the driver should be installed.
ServiceExe The path to the executable which contains the logging texts
AutomaticStart If set to TRUE, then the driver start type should be set to "AUTOMATIC", that is, the driver is started on every boot. If FALSE, it is put to "MANUAL".
Returns:
TRUE on success, else FALSE.

Definition at line 281 of file service.c.

References cbm_i_driver_start(), CreateLogRegistryKeys(), DBG_ERROR, DBG_PREFIX, DBG_SUCCESS, DBG_WARN, FormatErrorMessage(), FUNC_ENTER, and FUNC_LEAVE_BOOL.

VOID CbmInstallUpdate VOID   ) 
 

Tell the driver to update its settings.

This function tells the driver to update its settings after they have been changed.

Parameters:
HandleDevice A CBM_FILE which contains the file handle of the driver.
If cbm_driver_open() did not succeed, it is illegal to call cbm_driver_close().

Definition at line 47 of file install/i_opencbm.c.

References CBM_FILE, cbm_ioctl(), cbmarch_driver_close(), cbmarch_driver_open(), CBMCTRL, FUNC_ENTER, and FUNC_LEAVE.

Referenced by CbmUpdateParameter().

VOID CbmParportRestart VOID   ) 
 

Restart the parallel port.

This function tries to restart the parallel port, so that registry changes can take effect.

Definition at line 142 of file parport.c.

References DBG_ASSERT, DBG_ERROR, DBG_PREFIX, DBG_SUCCESS, DBGDO, FUNC_ENTER, and FUNC_LEAVE.

Referenced by CbmCheckCorrectInstallation().

BOOL CbmRemove IN LPCTSTR  DriverName  ) 
 

Remove the driver.

This function removes the opencbm driver from the machine.

Parameters:
DriverName The name under which the driver is installed.
Returns:
TRUE on success, else FALSE.

Definition at line 424 of file service.c.

References cbm_i_driver_stop(), DBG_ERROR, DBG_PREFIX, DBG_SUCCESS, FormatErrorMessage(), FUNC_ENTER, FUNC_LEAVE_BOOL, and REGKEY_EVENTLOG.

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.

This function updates the parameters of the driver.

Parameters:
DefaultLpt The default LPT to be set
IecCableType The IEC cable type
PermanentlyLock Zero if driver should not permanently lock the parallel port, not zero otherwise.
DebugFlagsDriverPresent Specifies if the following DebugFlagsDriver field should be used or not
DebugFlagsDriver The DebugFlags to be set for the driver
DebugFlagsDllPresent Specifies if the following DebugFlagsDll field should be used or not
DebugFlagsDll The DebugFlags to be set for the DLL
Returns:
TRUE on success, else FALSE.

Definition at line 391 of file service.c.

References CbmInstallUpdate(), FUNC_ENTER, and FUNC_LEAVE_BOOL.

PCHAR FormatErrorMessage DWORD  Error  ) 
 

Format a returned error code into a string.

This function formats a returned error code into a string.

Parameters:
Error The error number to be formatted.
Returns:
The string describing the error given by the error code.

Definition at line 56 of file instcbm.c.

Referenced by CbmInstall(), and CbmRemove().


Generated on Sun Apr 30 18:46:10 2006 for opencbm by  doxygen 1.4.2