Share via


IObex::EnumDevices (Windows Embedded CE 6.0)

1/6/2010

This method returns a pointer to the IDeviceEnum interface that enumerates the list of known devices.

Syntax

HRESULT EnumDevices(
  IDeviceEnum** ppDeviceEnum, 
  REFCLSID uuidTransport
);

Parameters

  • ppDeviceEnum
    [out] Pointer to the IDeviceEnum interface.
  • uuidTransport
    [in] Specifies the UUID of the particular transport to do device enumeration. This allows device enumeration to be limited to one transport if so desired. If device enumeration for all transports is desired, this value should be set to CLSID_NULL. The available device types are listed in the following table.

    Value Description

    BthTransport

    A device that uses Bluetooth to communicate with other devices.

    GUID_NULL

    All devices.

    HeaderCollection

    The header collection of a device.

    IpTransport

    A device that uses TCP/IP to communicate with other devices.

    IrdaTransport

    A device that uses IRdA to communicate with other devices.

    Obex

    An OBEX-class device.

    PropertyBag

    The property bag of a device.

Return Value

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    The method completed successfully.

Remarks

When synchronous device enumeration is being used, this method sorts the returned information. To use this method, start the enumeration first using the IOBex::StartDeviceEnum method. To stop the enumeration, use the IObex::StopDeviceEnum method. After these two operations have been run, use IObex::EnumDevices to collate the returned device information.

This method should not be called before calling the IObex::StartDeviceEnum method or it will return a failure.

If the device has been cached by the discovery mechanism below OBEX, it may not be connectable.

Requirements

Header obex.h, obex.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IObex:IUnknown
IObex::StartDeviceEnum
IDeviceEnum:IUnknown
OBEX Interfaces