The IoGetDriverObjectExtension routine retrieves a previously allocated per-driver context area.
PVOID
IoGetDriverObjectExtension(
IN PDRIVER_OBJECT DriverObject,
IN PVOID ClientIdentificationAddress
);
IoGetDriverObjectExtension returns a pointer to the context area, if any or returns NULL.
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
Drivers call IoGetDriverObjectExtension to retrieve a pointer to a previously allocated extension area.
Callers of this routine must be running at IRQL <= DISPATCH_LEVEL.