lpszDevKey
[in] Pointer to a string containing the registry path of the device driver's registry key. This key contains the driver's DLL name, prefix, and other data. For information about the subkeys of the HKEY_LOCAL_MACHINE\Drivers\Active registry key, see Device Manager Registry Keys.
lpRegEnts
[in] Pointer to an array of REGINI structures, each of which defines a registry value to add to the device's Active registry key before its driver is loaded. Set to NULL unless it is for a bus driver.
cRegEnts
[in] Count of the number of REGINI structures to which lpRegEnts points. This affects a generalization of the ActivateDevice function.
lpvParam
[in] Opaque pointer to a driver-specific data structure. You can use it to pass parameters to the loaded driver without having to write them through the registry. lpvParam is passed to the XXX_Init (Device Manager) function as a second parameter. lpvParam can be used by bus drivers to pass bus-specific information, entry points, or both to loaded drivers. Using this parameter prevents clients of that bus from becoming bus-agnostic. This is acceptable for some busses, especially those whose drivers cannot become bus-agnostic.
Return Values
Returns a handle that you can use later as the parameter to the DeactivateDevice function, if successful. If the function is not successful, it returns INVALID_HANDLE_VALUE. To obtain extended error information, call GetLastError.