IWSDDeviceHost::RegisterService method (wsdhost.h)

Registers a service object for incoming requests and adds the service to the device host metadata.

Syntax

HRESULT RegisterService(
  [in] LPCWSTR  pszServiceId,
  [in] IUnknown *pService
);

Parameters

[in] pszServiceId

The ID of the service to be registered. This ID must appear in the device's service host metadata.

[in] pService

The service object that will handle requests addressed to the specified service.

Return value

Possible return values include, but are not limited to, the following:

Return code Description
S_OK
Method completed successfully.
E_INVALIDARG
pszServiceId is NULL, the length in characters of pszServiceId exceeds WSD_MAX_TEXT_LENGTH (8192), or a service matching pszServiceId has already been registered.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wsdhost.h (include Wsdapi.h)
DLL Wsdapi.dll

See also

IWSDDeviceHost