Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

The IObexDevice::Getmethod is used to obtain a file from the server. In a typical multi-step Getoperation, the client sends a Getrequest 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 Getrequest 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 Getrequests 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:

Steps

Step Topic

1. Enable the client to discover an OBEX device by using IConnectionPointContainerand IObexSink:IUnknowninterfaces.

Discovering OBEX Devices

2. Retrieve the IObexDevicereference.

None.

3. Call the appropriate method of the IHeaderCollectioninterface to add a header.

None.

4. Call the IObexDevice::Connectmethod on the IObexDevicereference to connect to an OBEX server.

Connecting to an OBEX Server

5. Call Geton the IObexDevicereference to return a header. This method returns a pointer to IStream.

Headers to Use with Get Operations

6. Call IStream::Readto retrieve the header information.

Use of Streams

7. Close the connection to the OBEX server by calling the IObexDevice::Disconnecton the IObexDevicereference.

Disconnecting from an OBEX Server

8. Release all interfaces and allocated resources.

  • Call the IObex::Shutdownmethod to release IObex.

  • Call the standard COM Releasemethod to release all other interfaces.

None.

See Also