The DRV_CLOSE message is the first message sent by Windows to an installable driver after an application calls the CloseDriver function.
dwDriverIdentifier
Specifies the unique 32-bit identifier returned by the OpenDriver function.
hDriver
Identifies the instance of the installable driver that should be closed.
lParam1
Specifies driver-specific data.
lParam2
Specifies driver-specific data.
An installable driver returns nonzero if its DriverProc function successfully closes the driver. Otherwise, it returns zero.
The lParam1 and lParam2 parameters specify the same values as the lParam1 and lParam2 parameters for the CloseDriver function.
Each time a driver processes this message, it must decrement a private use-count variable. When the value of this variable is zero, Windows closes the driver.