Registering Device Implementations (Windows Embedded CE 6.0)
1/6/2010
After you have implemented the functionality of your MediaRenderer or MediaServer device by creating derived classes, as described in Implementing Device Classes, the remaining step is to expose these classes so that they can be used by the Device Host API.
The UPnP AV Framework plugs into and relies on the Device Host API for much of its functionality, including making service implementations available on the network.
This requires implementing an IUPnPDeviceControl COM object and registering it with the Device Host API.**Windows Embedded CE provides **objects that implement IUPnPDeviceControl by deferring service object creation and implementations to UPnP AV Framework C++ classes you create. For more information about UPnP registration, see Implementing a Hosted Device Using COM and Registering a Hosted Device.
While the IConnectionManagerImpl class provides a significant amount of connection and protocol management functionality, you still need to provide the protocol information that your device supports. To do this, use IConnectionManagerImpl::AddSourceProtocol and IConnectionManagerImpl::AddSinkProtocol.
In addition to registering the IUPnPDeviceControl instance with the Device Host API, the appropriate UPnP XML device and service description documents must be located in the \Windows\UPnP directory on the device. Starting points for these documents are available on the UPnP web site, referenced in UPnP AV DCP Documentation.
For a detailed example of how to register devices created using the UPnP AV Framework, examine the AV Renderer Sample, especially the Device.h and Device.cpp files. This sample builds into a DLL called mediarenderer.dll. For more information, see UPnP AV Renderer Sample.
See Also
Concepts
Developing UPnP AV Framework Devices
Implementing a Hosted Device Using COM
Registering a Hosted Device