[Applies to UMDF 1.x only]
The OnInitialize method performs any operations that are necessary to initialize a driver.
- pWdfDriver [in]
A pointer to the IWDFDriver interface for the framework driver object that represents the driver that is loaded in the host process.
OnInitialize returns S_OK if the driver completed its global initialization. Otherwise, this method returns one of the error codes that are defined in Winerror.h. If the driver returns an error code, the framework will not load the driver.
The framework creates a new driver object for each driver that is loaded in the driver host process. When a driver enters the system, the framework calls OnInitialize to notify the driver and passes the IWDFDriver interface in the call.