EnumDevices (Windows CE 5.0)

Send Feedback

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);


  • lpszDevList
    [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".
  • lpBuflen
    [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.

Return Values

The following table shows the return values for this function.

Value Description
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.
Header: Devload.h.
Link Library: Coredll.lib.

See Also

Device File Names | RequestDeviceNotifications | StopDeviceNotifications

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.