Partager via


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

Send Feedback

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.

Hardware and Software Assumptions

You have declared pointers to the following interfaces:

To track your progress in the following table, select the check box next to each step.

  Step Topic
1. Enable the client to discover an OBEX device by using IConnectionPointContainer and IObexSink 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 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 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.

See Also

Client Support | Implementing the GET Operation | How to Send a Data Object to the OBEX Server

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.