EnumDevices (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

DWORD EnumDevices(
  LPTSTR lpszDevList,
  LPDWORD lpBuflen
);

Parameters

  • 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 Value

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.

Remarks

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.

Requirements

Header devload.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

Device Manager Functions
RequestDeviceNotifications
StopDeviceNotifications

Concepts

Device File Names