Share via


IObex::BindToDevice (Compact 2013)

3/26/2014

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::BindToDevice provides the data transfer connection to a specified device.

This method should be used if device enumeration is done outside of the Object Exchange (OBEX) Protocol 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 connection.

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

Requirements

Header

obex.h,
obex.idl

Library

uuid.lib

See Also

Reference

IObex
IObexDevice
OBEX Interfaces