|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
ActivateDeviceloads a device driver and adds registry keys for it to the HLEY_LOCAL_MACHINE\Drivers\Activebranch of the registry. This function supplements RegisterDevice.
HANDLE ActivateDevice( LPCWSTR lpszDevKey, DWORD dwClientInfo );
On success, ActivateDeviceReturns a handle to the device that can be used in subsequent calls to DeactivateDevice.
ActivateDeviceloads a device driver in the manner that the plug and play system loads a device driver. ActivateDevicereads the registry key specified in lpszDevKeyto get the DLL name, device prefix, index, and other values. Next it adds the device to the active device list in the registry branch HKEY_LOCAL_MACHINE\Drivers\Active, and stores the relevant values there. If no device index was specified in the key named in lpszDevKey, then it assigns a free index. Then it calls RegisterDeviceto actually load the device driver DLL in the process space of the Device Manager. Finally, it broadcasts a WM_DEVICECHANGE message for the new device.
Additionally, you can call CeResyncFilesysto cause a file system driver to remount a device because of a media change.
Applications that need to load custom-purpose device drivers can do so by invoking ActivateDevice, if they need the system as a whole to be aware of the device driver. Otherwise, they can use RegisterDevice.
|Runs on||Versions||Defined in||Include||Link to|
|Windows CE OS||2.11 and later|
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
Last updated on Tuesday, July 13, 2004