[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]
The OnInitialize method performs any operations that are necessary to initialize a driver.
HRESULT OnInitialize( IWDFDriver *pWdfDriver );
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.
|Header||wudfddi.h (include Wudfddi.h)|