Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
How to Request a Data Object from the OBEX Server

How to Request a Data Object from the OBEX Server (Windows Embedded CE 6.0)

1/6/2010

The IObexDevice::Get method is used to obtain a file from the server. In a typical multi-step Get operation, the client sends a Get request that may include a Name header. The server responds with a continue 0x90 code and headers describing the name and size of the pending object. After receiving this code, the client sends another Get request with a final bit set. The server responds with a response packet containing more headers along with another continue response code. The client continues to issue Get requests until the final body of information arrives in an EndOfBody header and the response code is 0xA0, meaning success.

You have declared pointers to the following interfaces:

Step Topic

1. Enable the client to discover an OBEX device by using IConnectionPointContainer and IObexSink:IUnknown interfaces.

Discovering OBEX Devices

2. Retrieve the IObexDevice reference.

None.

3. Call the appropriate method of the IHeaderCollection interface to add a header.

None.

4. Call the IObexDevice::Connect method on the IObexDevice reference to connect to an OBEX server.

Connecting to an OBEX Server

5. Call Get on the IObexDevice reference to return a header. This method returns a pointer to IStream.

Implementing the Get Operation

Headers to Use with Get Operations

6. Call IStream::Read to retrieve the header information.

Use of Streams

7. Close the connection to the OBEX server by calling the IObexDevice::Disconnect on the IObexDevice reference.

Disconnecting from an OBEX Server

8. Release all interfaces and allocated resources.

  • Call the IObex::Shutdown method to release IObex.
  • Call the standard COM Release method to release all other interfaces.

None.

Community Additions

ADD
Show:
© 2015 Microsoft