IObex::BindToDevice

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

OS Versions: Windows CE .NET 4.0 and later.
Header: Obex.h, Obex.idl.
Link Library: Uuid.lib.

See Also

IObex | IObexDevice | OBEX Interfaces

 Last updated on Friday, April 09, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.