EnumDevices (Windows CE 5.0)
This function returns a list of the active device file names currently present in the file system. Calling RequestDeviceNotifications with DEVCLASS_STREAM_GUID supersedes this function.
DWORD EnumDevices(LPTSTR lpszDevList,LPDWORD lpBuflen);
[in] List of null-terminated strings. The list terminates with two consecutive null characters, one terminating the last entry in the list and an additional null, for example, "COM1:\0COM2:\0PGR1:\0\0".
[in] Pointer to a DWORD containing the length of the lpszDevList buffer that the caller allocated. If the buffer is too small to hold the entire list, then EnumDevices will store the necessary buffer size in lpBufLen.
The following table shows the return values for this function.
|ERROR_SUCCESS||The function returned successfully.|
|ERROR_INSUFFICIENT_BUFFER||The lpszDevList buffer was not big enough to hold any entries; lpBufLen will contain the required size.|
|ERROR_INVALID_PARAMETER||The lpBufLen parameter was NULL.|
|ERROR_MORE_DATA||The lpszDevList buffer was not big enough to hold the complete list of active devices; lpBufLen will contain the required size.|
|ERROR_NO_MORE_DEVICES||EnumDevices failed to find any active devices.|
Do not use this function. There is no guarantee that a specified device name corresponds to a specific device type. Instead, use RequestDeviceNotifications and StopDeviceNotifications.
OS Versions: Windows CE 1.0 and later.
Link Library: Coredll.lib.
Send Feedback on this topic to the authors