Discovering OBEX Devices (Windows CE 5.0)
Device discovery enables clients to discover other OBEX devices that are in range, regardless of their protocol. To obtain a list of available devices, clients call the IObex::EnumDevices method.
Another and probably preferred method for device discovery is using IConnectionPointContainer and IObexSink interfaces.
To make device discovery notifications by using IConnectionPointContainer and IObexSink:
- Create an IObex object by calling the CoCreateInstance method.
- Call QueryInterface on the IObex object to retrieve an IConnectionPointContainer reference.
- Call the FindConnectionPoint method on the IConnectionPointContainer reference. This method receives a pointer to the IConnectionPoint interface of a connection point.
- Implement IObexSink and create an object of this class.
- Call the Advise method on the IConnectionPoint reference retrieved by FindConnectionPoint and pass the IObexSink object as a parameter.
- Call the StartDeviceEnum method on the IObex object.
For more information see Device Capability.
See Also
Send Feedback on this topic to the authors