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

i_opencbm.h File Reference

Internal API for opencbm installation. More...

#include "opencbm.h"

Go to the source code of this file.

Defines

#define CBMCTRL(_x_)   CBMCTRL_##_x_

Typedefs

typedef BOOL(CBMAPIDECL * P_CBM_I_DRIVER_INSTALL )(OUT PULONG Buffer, IN ULONG BufferLen)

Functions

BOOL cbm_ioctl (IN CBM_FILE HandleDevice, IN DWORD ControlCode, IN PVOID InBuffer, IN ULONG InBufferSize, OUT PVOID OutBuffer, IN ULONG OutBufferSize)
 Perform an ioctl on the driver.
BOOL cbm_i_driver_stop (VOID)
 Stop a device driver.
BOOL cbm_i_driver_start (VOID)
 Start a device driver.
BOOL cbm_i_i_driver_install (OUT PULONG Buffer, IN ULONG BufferLen)
 Complete driver installation, "direct version".
EXTERN BOOL CBMAPIDECL cbm_i_driver_install (OUT PULONG Buffer, IN ULONG BufferLen)
 Complete driver installation, "external version".
LONG RegGetDWORD (IN HKEY RegKey, IN char *SubKey, OUT LPDWORD Value)
 Get a DWORD value from the registry.
BOOL IsDriverStartedAutomatically (VOID)
 Is the driver started automatically?


Detailed Description

Internal API for opencbm installation.

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

Author:
Spiro Trikaliotis
Version:
Id
i_opencbm.h,v 1.7 2006/04/19 11:53:25 trikalio Exp


Definition in file i_opencbm.h.


Define Documentation

#define CBMCTRL _x_   )     CBMCTRL_##_x_
 

A macro for the call to cbm_ioctl() Remember, I'm lazy...

Definition at line 39 of file i_opencbm.h.

Referenced by cbm_i_i_driver_install(), cbmarch_clear_eoi(), cbmarch_close(), cbmarch_get_eoi(), cbmarch_iec_poll(), cbmarch_iec_release(), cbmarch_iec_set(), cbmarch_iec_setrelease(), cbmarch_listen(), cbmarch_lock(), cbmarch_open(), cbmarch_parallel_burst_read(), cbmarch_parallel_burst_read_track(), cbmarch_parallel_burst_write(), cbmarch_parallel_burst_write_track(), cbmarch_pp_read(), cbmarch_pp_write(), cbmarch_reset(), cbmarch_talk(), cbmarch_unlisten(), cbmarch_unlock(), cbmarch_untalk(), and CbmInstallUpdate().


Typedef Documentation

typedef BOOL(CBMAPIDECL * P_CBM_I_DRIVER_INSTALL)(OUT PULONG Buffer, IN ULONG BufferLen)
 

Function pointer for the cbm_i_driver_install() function

Definition at line 49 of file i_opencbm.h.


Function Documentation

EXTERN BOOL CBMAPIDECL cbm_i_driver_install OUT PULONG  Buffer,
IN ULONG  BufferLen
 

Complete driver installation, "external version".

This function performs anything that is needed to successfully complete the driver installation.

Parameters:
Buffer Pointer to a buffer which will return the install information
BufferLen The length of the buffer Buffer points to (in bytes).
Returns:
FALSE on success, TRUE on error
This function is for use of the installation routines only!

This version of this function is for exporting out of the DLL.

Definition at line 251 of file WINBUILD/archlib.c.

References cbm_i_i_driver_install(), FUNC_ENTER, and FUNC_LEAVE_INT.

BOOL cbm_i_driver_start VOID   ) 
 

Start a device driver.

This function start a device driver. It is the programmatically equivalent for "net start <driver>"

Returns:
Returns TRUE on success, else FALSE.
This function is for use of the installation routines only!

Definition at line 435 of file lib/WINBUILD/i_opencbm.c.

References DBG_ERROR, DBG_PREFIX, DBG_SUCCESS, DBG_WARN, FUNC_ENTER, FUNC_LEAVE_BOOL, and OPENCBM_DRIVERNAME.

Referenced by CbmCheckCorrectInstallation(), CbmInstall(), and opencbm_init().

BOOL cbm_i_driver_stop VOID   ) 
 

Stop a device driver.

This function stops a device driver. It is the programmatically equivalent for "net stop <driver>"

Returns:
Returns TRUE on success, else FALSE.
This function is for use of the installation routines only!

Definition at line 510 of file lib/WINBUILD/i_opencbm.c.

References DBG_ERROR, DBG_PREFIX, DBG_SUCCESS, FUNC_ENTER, FUNC_LEAVE_BOOL, and OPENCBM_DRIVERNAME.

Referenced by CbmCheckCorrectInstallation(), CbmRemove(), and opencbm_init().

BOOL cbm_i_i_driver_install OUT PULONG  Buffer,
IN ULONG  BufferLen
 

Complete driver installation, "direct version".

This function performs anything that is needed to successfully complete the driver installation.

Parameters:
Buffer Pointer to a buffer which will return the install information
BufferLen The length of the buffer Buffer points to (in bytes).
Returns:
FALSE on success, TRUE on error
This function is for use of the installation routines only!

This version is for usage in the DLL or the install package.

Definition at line 575 of file lib/WINBUILD/i_opencbm.c.

References CBM_FILE, CBM_I_DRIVER_INSTALL_0_FAILED, CBM_I_DRIVER_INSTALL_0_IOCTL_FAILED, cbm_ioctl(), cbmarch_driver_close(), cbmarch_driver_open(), CBMCTRL, CBMT_I_INSTALL_OUT_MAKE_VERSION, CBMT_I_INSTALL_OUT_MAKE_VERSION_EX, DBG_ASSERT, DBG_ERROR, DBG_PREFIX, CBMT_I_INSTALL_OUT::DllVersion, CBMT_I_INSTALL_OUT::DllVersionEx, CBMT_I_INSTALL_OUT::ErrorFlags, FUNC_ENTER, and FUNC_LEAVE_INT.

Referenced by cbm_i_driver_install(), and CbmCheckCorrectInstallation().

BOOL cbm_ioctl IN CBM_FILE  HandleDevice,
IN DWORD  ControlCode,
IN PVOID  InBuffer,
IN ULONG  InBufferSize,
OUT PVOID  OutBuffer,
IN ULONG  OutBufferSize
 

Perform an ioctl on the driver.

This function performs an ioctl on the driver. It is used internally only.

Parameters:
HandleDevice A CBM_FILE which contains the file handle of the driver.
ControlCode The ControlCode of the IOCTL to be performed.
TextControlCode A string representation of the IOCTL to be performed. This is used for debugging purposes, only, and not available in free builds.
InBuffer Pointer to a buffer which holds the input parameters for the IOCTL. Can be NULL if no input buffer is needed.
InBufferSize Size of the buffer pointed to by InBuffer. If InBuffer is NULL, this has to be zero,
OutBuffer Pointer to a buffer which holds the output parameters of the IOCTL. Can be NULL if no output buffer is needed.
OutBufferSize Size of the buffer pointed to by OutBuffer. If OutBuffer is NULL, this has to be zero,
Returns:
TRUE: IOCTL succeeded, else FALSE an error occurred processing the IOCTL
If cbm_driver_open() did not succeed, it is illegal to call this function.

Definition at line 382 of file lib/WINBUILD/i_opencbm.c.

References DBG_ERROR, DBG_PREFIX, DBG_WARN, FUNC_ENTER, and FUNC_LEAVE_BOOL.

Referenced by cbm_i_i_driver_install(), cbmarch_clear_eoi(), cbmarch_close(), cbmarch_get_eoi(), cbmarch_iec_poll(), cbmarch_iec_release(), cbmarch_iec_set(), cbmarch_iec_setrelease(), cbmarch_listen(), cbmarch_lock(), cbmarch_open(), cbmarch_parallel_burst_read(), cbmarch_parallel_burst_read_track(), cbmarch_parallel_burst_write(), cbmarch_parallel_burst_write_track(), cbmarch_pp_read(), cbmarch_pp_write(), cbmarch_reset(), cbmarch_talk(), cbmarch_unlisten(), cbmarch_unlock(), cbmarch_untalk(), and CbmInstallUpdate().

BOOL IsDriverStartedAutomatically VOID   ) 
 

Is the driver started automatically?

This function finds out if the driver is started automatically or manually.

Returns:
Returns TRUE if driver is started automatically, FALSE if not.

Definition at line 634 of file lib/WINBUILD/i_opencbm.c.

References CBM_REGKEY_SERVICE, DBG_ERROR, DBG_PREFIX, DBG_WARN, FUNC_ENTER, FUNC_LEAVE_BOOL, and RegGetDWORD().

Referenced by CbmCheckCorrectInstallation(), and opencbm_init().

LONG RegGetDWORD IN HKEY  RegKey,
IN char *  SubKey,
OUT LPDWORD  Value
 

Get a DWORD value from the registry.

This function gets a DWORD value in the registry. It is a simple wrapper for convenience.

Parameters:
RegKey A handle to an already opened registry key.
SubKey Pointer to a null-terminiated string which holds the name of the value to be created or changed.
Value Pointer to a variable which will contain the value from the registry
Returns:
ERROR_SUCCESS on success, -1 otherwise
If this function returns -1, the given Value will not be changed at all!

Definition at line 77 of file lib/WINBUILD/i_opencbm.c.

References DBG_ASSERT, DBG_ERROR, DBG_PREFIX, DBG_SUCCESS, FUNC_ENTER, FUNC_LEAVE_INT, and FUNC_PARAM.


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