Share via


IObex::BindToDevice

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method returns a pointer to the IObexDevice interface.

Syntax

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

Parameters

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

Return Value

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::BindToDeviceprovides 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

Header obex.h, obex.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

IObex:IUnknown
IObexDevice:IUnknown
OBEX Interfaces