IWSDDeviceHost (Windows Embedded CE 6.0)
1/6/2010
This interface represents a DPWS-compliant device. The device host will announce its presence on the network using the WS-Discovery protocol. The device host will also automatically respond to discovery queries and metadata requests.
The caller can register user-implemented services with the device host. These services will be exposed in the device metadata and the services will be available over the network. Messages bound for these services will be automatically dispatched into the service object.
Call WSDCreateDeviceHost or WSDCreateDeviceHostAdvanced to create an object that exposes this interface.
The IWSDDeviceHost interface inherits the methods of the IUnknown interface.
In addition, the following table lists the methods supported by the IWSDDeviceHost interface in vtable order.
Method | Description |
---|---|
Initializes an instance of an IWSDDeviceHost object. |
|
Starts the device host and publishes the device host using a WS-Discovery Hello message. |
|
Sends a WS-Discovery Bye message and stops the host. |
|
Terminates the host and releases any attached services. |
|
Registers a port type for incoming messages. |
|
Sets the metadata for a device, excluding user-defined service metadata. |
|
Registers a service object for incoming requests and adds the service to the device host metadata. |
|
Unregisters a service object that was registered using RegisterService and removes the service from the device host metadata. |
|
Registers a service object for incoming requests, but does not add the service to the device host metadata. This is used for transient (dynamic) services. |
|
Unregisters a service object that was registered using AddDynamicService. |
|
Controls whether or not the service is advertised using WS-Discovery. |
|
Notifies all subscribed clients that an event has occurred. |
Remarks
After retrieving this interface, the application would then take the following action:
- Call the RegisterPortType method to register all necessary port types.
- Call SetMetadata to describe the device and optionally call RegisterService one or more times to register services described in the service host metadata.
- Call the Start method to start the device host and to publish the device using WS-Discovery.
- Call the Stop method to terminate host execution and terminate publication of the device.
After starting the device host in step 3, the following optional actions may be taken:
- Call AddDynamicService for services not described in the service host metadata (for example, an ad hoc print job).
- Call RetireService to terminate action on and disconnect a service activated by the RegisterService method.
- Call the SignalEvent method to indicate that notifications should be sent for subscriptions relating to a particular event.
An IWSDDeviceHost object can provide a COM object for a service on demand (using a notification callback) when calling the host receives a request message directed at that service.
Requirements
Header | wsdapi.h |
Library | wsdapi.lib |
Windows Embedded CE | Windows Embedded CE 6.0 R2 |
See Also
Reference
Web Services on Devices Interfaces
Web Services on Devices Reference