|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.|
This function searches for device information and fills a DEVMGR_DEVICE_INFORMATIONstructure with this information.
HANDLE FindFirstDevice( DeviceSearchType searchType, LPCVOID pvSearchParam, PDEVMGR_DEVICE_INFORMATION pdi );
[in] Method of searching for a device. Set to an element of the DeviceSearchTypeenumeration.
[in] Pointer to a string, pointer to a GUID, or an activation handle. The following table shows examples of these based on the element of DeviceSearchType passed in searchType.
L"COM*" for all COMx: devices.
L"COM*" for all COMx devices.
L"PCI_0_3*" for PCI_0_3_0, PCI_0_3_1 and so on.
Pointer to a GUID.
Activation handle value from ActivateDeviceEx.
[out] Pointer to a DEVMGR_DEVICE_INFORMATIONstructure to store the device's information.
If successful, FindFirstDevicereturns a search handle that can be used in subsequent calls to FindNextDevice. If the function is not successful, it returns INVALID_HANDLE_VALUE. To obtain extended error information, the application can call the GetLastErrorfunction.
Wildcards are supported in name-based searches. Unnamed devices can be found using a zero-length search string.
Close the handle with FindClosewhen searching is complete.
|Windows Embedded CE||Windows CE 5.0 and later|
|Windows Mobile||Windows Mobile Version 5.0 and later|