HDRVOBJ EngCreateDriverObj(
PVOID pvObj, | |
FREEOBJPROC pFreeObjProc, | |
HDEV hdev | |
); |
EngCreateDriverObj creates a DRIVEROBJ structure. This structure is used to track a driver-managed resource that must be released if the resource-allocating process terminates without first cleaning it up.
BOOL CALLBACK DrvobjFreeObjProc(DRIVEROBJ *pDriverObj);
The return value is a handle that identifies the newly-created DRIVEROBJ structure if the function is successful. Otherwise, it is zero.
The driver can explicitly delete the DRIVEROBJ structure by calling EngDeleteDriverObj. Otherwise, the engine frees the resource by calling the function pointed to by pFreeObjProc when the process that created the DRIVEROBJ terminates.