Compartilhar via


EnumPnpIds (Windows CE 5.0)

Send Feedback

This function returns a list of the Plug and Play identifiers that are currently active in the system. Calling RequestDeviceNotifications with DEVCLASS_STREAM_GUID supersedes this function.

DWORD EnumPnpIds(LPTSTRlpszPnpList,LPDWORDlpBuflen);

Parameters

  • lpszPnpList
    [in] List of null-terminated strings. The list terminates with two consecutive null characters, one that terminates the last entry in the list and another null character to terminate the list. For example, MEGAHERTZ-XJ2288-9E81\0XIRCOM-X2250-F877\0\0.
  • lpBuflen
    [in] Pointer to a DWORD containing the length of the lpszPnpList buffer that the caller allocated. If the buffer is too small to hold the entire list, then EnumPnpIds stores 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 buffer size was sufficient, but the buffer pointer was NULL.

Because the buffer size is treated as valid even when the buffer pointer is set to NULL, a return value of ERROR_INSUFFICIENT_BUFFER means that a call to EnumPnpIds with a particular buffer size would have succeeded had it been made with a non-NULL buffer pointer.

ERROR_INVALID_PARAMETER The lpBufLen parameter was NULL.
ERROR_MORE_DATA The buffer size passed in was not large enough to hold all the data items.
ERROR_NO_MORE_DEVICES EnumPnpIds failed to find any active Plug and Play identifiers.

Remarks

Device drivers should not use this function. Use the PC Card services functions to access the information that this function provides.

Control Panel uses this function to display the cards in the PC Card slots.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Devload.h.
Link Library: Coredll.lib.

See Also

RequestDeviceNotifications

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.