IObex::EnumDevices (Windows CE 5.0)
This method returns a pointer to the IDeviceEnum interface that enumerates the list of known devices.
HRESULT EnumDevices(IDeviceEnum** ppDeviceEnum,REFCLSIDuuidTransport);
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 Values
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
Smartphone: Smartphone 2002 and later
Pocket PC: Pocket PC 2002 and later
OS Versions: Windows CE .NET 4.0 and later.
Header: Obex.h, Obex.idl.
Link Library: Uuid.lib.
See Also
IObex::StartDeviceEnum | IObex | IDeviceEnum | OBEX Interfaces
Send Feedback on this topic to the authors