#include <wdm.h>
#include "cbm_driver.h"
#include "iec.h"
Go to the source code of this file.
Functions | |
| VOID | cbm_init_registry (IN PUNICODE_STRING RegistryPath, IN PDEVICE_EXTENSION Pdx) |
| Initialize from registry. | |
| NTSTATUS | DriverCommonInit (IN PDRIVER_OBJECT Driverobject, IN PUNICODE_STRING RegistryPath) |
| Perform driver initialization, common to WDM and NT4 driver. | |
| VOID | DriverCommonUninit (VOID) |
| Undo what DriverCommonInit() has done. | |
| NTSTATUS | AddDeviceCommonInit (IN PDEVICE_OBJECT Fdo, IN PUNICODE_STRING DeviceName, IN PCWSTR ParallelPortName) |
| Initialize device object, common to WDM and NT4 driver. | |
**************************************************************
Definition in file libcommon/init.c.
|
||||||||||||||||
|
Initialize device object, common to WDM and NT4 driver. This function initializes the device object, as done in AddDevice() of a WDM driver, or in DriverEntry() for an NT4 driver.
1. Initialize the Pdx 2. Initialize the Queue inside of the Pdx 3. Initialize the operating mode of the Fdo (Buffered, Direct, Neither) 4. Get the information from the parallel port 5. Start the Worker Thread 6. Log either success or failure Definition at line 277 of file libcommon/init.c. References cbm_start_thread(), cbm_startio(), DBG_ERROR, DBG_PREFIX, FUNC_ENTER, LogErrorOnly, LogErrorString, ParPortInit(), and QueueInit(). Referenced by AddDevice(). |
|
||||||||||||
|
Initialize from registry. This function initializes some driver settings from the appropriate registry keys.
Pdx can be NULL, too. If it is NULL, no device-specific data is read at all. If RegistryPath is not NULL, some memory is allocated. This has to be freed by calling DriverCommonUninit(). Definition at line 56 of file libcommon/init.c. References cbm_lock_parport(), cbm_registry_close(), cbm_registry_open_for_read(), cbm_registry_read_ulong(), cbmiec_global_init(), cbmiec_set_cabletype(), DBG_ASSERT, FUNC_ENTER, FUNC_LEAVE, and MTAG_SERVKEY. Referenced by AddDevice(), cbm_execute_devicecontrol(), and DriverCommonInit(). |
|
||||||||||||
|
Perform driver initialization, common to WDM and NT4 driver. This function is called from the DriverEntry() of either the WDM or the NT4 driver.
Definition at line 191 of file libcommon/init.c. References cbm_cleanup(), cbm_createopenclose(), cbm_devicecontrol(), cbm_init_registry(), cbm_readwrite(), DriverUnload(), FUNC_ENTER, and PERF_INIT. Referenced by DriverEntry(). |
|
|
Undo what DriverCommonInit() has done. This function is called from the DriverUnload() of either the WDM or the NT4 driver. This function frees memory allocated by cbm_init_registry(). Definition at line 224 of file libcommon/init.c. References DBGDO, FUNC_ENTER, FUNC_LEAVE, and PERF_SAVE. Referenced by DriverUnload(). |
1.4.2