Share via


IObex::BindToDevice (Windows CE 5.0)

Send Feedback

This method returns a pointer to the IObexDevice interface.

HRESULT BindToDevice(IPropertyBag* pPropertyBag,IObexDevice** ppDevice);

Parameters

  • pPropertyBag
    [in] Property bag that describes the device.
  • ppDevice
    [out] Pointer to the IObexDevice interface.

Return Values

This method returns one of the following values.

Return value Description
S_OK The method completed successfully.
E_POINTER An invalid pointer was passed in either the property bag or the device.
E_INVALIDARG The argument was invalid.
E_FAIL The request failed.
E_OUTOFMEMORY Out of memory.
OBEX_E_NOT_INITIALIZED Not initialized.

Remarks

This method provides a pointer to a device by using the property bag values of that device. When asynchronous device notification is being used, IObex::BindToDevice provides the data transfer connection to a specified device.

This method should be used if device enumeration is done outside of the OBEX interfaces. The calling application must acquire the address and specify which transport to use or the name of the device.

**Note   **This method should always be used because it makes the physical (IRDA/BTH) connection.

To obtain the GUID for the transport, such as for IRDA or Bluetooth, you can populate the transport in the property bag. For example, pPropertyBag would be RequestServiceUUID.

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 | IObexDevice | OBEX Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.