#include <ntddk.h>
#include "cbm_driver.h"
#include <cbmioctl.h>
Go to the source code of this file.
Functions | |
| NTSTATUS | AddDevice (IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PdoUNUSED, IN PCWSTR ParallelPortName) |
| create functional device object (FDO) for enumerated device | |
| VOID | DriverUnload (IN PDRIVER_OBJECT DriverObject) |
| Unload routine of the driver. | |
| NTSTATUS | DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath) |
| Start routine of the driver. | |
**************************************************************
Definition in file nt4/LoadUnload.c.
|
||||||||||||||||
|
create functional device object (FDO) for enumerated device AddDevice is responsible for creating functional device objects (FDO) or filter device objects (filter DO) for devices enumerated by the Plug and Play (PnP) Manager.
As long as we are an NT4 style device driver, AddDevice is not automatically called by the system as we don't have an INF file. Thus, it is called from our DriverEntry by ourself.
Definition at line 56 of file nt4/LoadUnload.c. References AddDeviceCommonInit(), CBMDEVICENAME, DBG_ERROR, DBG_PREFIX, DebugNtStatus(), FUNC_ENTER, LogErrorString, and MTAG_DEVNAME. Referenced by DriverEntry(). |
|
||||||||||||
|
Start routine of the driver. DriverEntry is the first routine called after a driver is loaded, and it is responsible for initializing the driver.
Definition at line 272 of file nt4/LoadUnload.c. References AddDevice(), DBG_PREFIX, DBG_PRINT, DBG_SUCCESS, DriverCommonInit(), FUNC_ENTER, ParPortEnumerate(), ParPortEnumerateClose(), and ParPortEnumerateOpen(). |
|
|
Unload routine of the driver. DriverUnload performs any operations that are necessary before the system unloads the driver.
Definition at line 179 of file nt4/LoadUnload.c. References cbm_stop_thread(), cbm_unlock_parport(), DBG_ASSERT, DriverCommonUninit(), FUNC_ENTER, FUNC_LEAVE, and ParPortDeinit(). |
1.4.2