Classes | |
class | _AtomicInt32 |
Provides atomic operation support for 32-bit integers. More... | |
class | IUnknownDeviceInterface |
class | BusDevice |
class | BusPDO |
class | BasicCDVolume |
class | BulkUsbClient |
class | UniversalVolume |
class | _TimeSpan |
class | _DateTime |
class | ExternalDeviceObjectReference |
class | Device |
Represents a DDK device. Suitable for both legacy, WDM and filter devices. More... | |
class | Driver |
class | _File |
class | _DirectoryIterator |
class | _Directory |
class | _DirectFile |
Represents a file that is read/written by sending IRP_MJ_READ/IRP_MJ_WRITE IRPs to FS driver. More... | |
class | FilePathIteratorBase |
class | Filter |
class | IODevice |
class | IODeviceFilter |
class | IncomingIrp |
PowerIRP-aware class that encapsulates an IRP. No extra action is required to process IRP_MJ_POWER requests. More... | |
class | OutgoingIRP |
class | IrpQueue |
class | KEvent |
Represents the kernel KEVENT object. More... | |
class | FastMutex |
Represents a fast mutex. See ExInitializeFastMutex() for details. More... | |
class | KMutex |
Represents a standard NT mutex. See ExInitializeFastMutex() for details. More... | |
class | KSemaphore |
Represents a standard NT semaphore. See KeInitializeSemaphore() for details. More... | |
class | KSpinLock |
Represents a spin lock. See KeInitializeSpinLock() for details. More... | |
class | KEResource |
Represents a read-write lockable resource. More... | |
class | PNPDevice |
class | RegistryKey |
class | StorageDevice |
class | StorageFilter |
class | string |
class | StaticString |
class | BasicStorageVolume |
Enumerations | |
enum | DevicePNPState { NotStarted = 0, Started, StopPending, Stopped, RemovePending, SurpriseRemovePending, Deleted, Unknown } |
Functions | |
static unsigned | GetObjectReferenceCount (PVOID pObject) |
static unsigned | GetObjectHandleCount (PVOID pObject) |
const char * | MapDeviceControlCode (ULONG Code) |
void | DumpDeviceControlCode (const char *pszFormat, ULONG Code) |
void | DumpBinaryBuffer (const void *pBuffer, int Size) |
void | DumpInt32Buffer (const void *pBuffer, int Size) |
const wchar_t * | MapNTStatus (NTSTATUS Status) |
Each windows driver based on BazisLib framework should subclass the Driver class and define the CreateMainDriverInstance() routine. The latter is called on driver startup and should return a pointer to a newly created driver instance. A PnP-aware driver typically has the Driver::AddDevice() method overloaded. That method corresponds to DDK AddDevice() callback and should create the device object and register it within the system. It is typically done by instantiating a device object (device classes are rooted from the Device class; see Device class description for subclass hierarchy) and registering it via AddDevice() call. When you create a PnP-compatible device, you can set the bDeleteThisAfterRemoveRequest parameter to true to let the device delete itself after the IRP_MN_REMOVE_DEVICE request. Otherwise, the device will delete the DEVICE_OBJECT, however, the Device class instance itself will not be freed. In that case, it should be freed from your driver class destructor.
An IRP sent to your driver is represented by the IncomingIrp object. See IncomingIrp reference for detailed explanation. If you want to create an IRP to send it to another driver, you should use the OutgoingIRP class.
To access files from your driver, you should use the BazisLib::DDK::File class. Note that in further versions the File::File() constructor may change its interface.
It is highly recommended to use the BazisLib::DDK::string class to manipulate strings. This class allows exporting UNICODE_STRING structure and buffer exporting to paged pool. To simplify converting constant strings to UNICODE_STRING structures, you can use the BazisLib::DDK::StaticString class.
void BazisLib::DDK::DumpBinaryBuffer | ( | const void * | pBuffer, | |
int | Size | |||
) |
void BazisLib::DDK::DumpDeviceControlCode | ( | const char * | pszFormat, | |
ULONG | Code | |||
) |
void BazisLib::DDK::DumpInt32Buffer | ( | const void * | pBuffer, | |
int | Size | |||
) |
static unsigned BazisLib::DDK::GetObjectHandleCount | ( | PVOID | pObject | ) | [inline, static] |
static unsigned BazisLib::DDK::GetObjectReferenceCount | ( | PVOID | pObject | ) | [inline, static] |
const char* BazisLib::DDK::MapDeviceControlCode | ( | ULONG | Code | ) |
const wchar_t* BazisLib::DDK::MapNTStatus | ( | NTSTATUS | Status | ) |