IUPnPRegistrar::RegisterDeviceProvider method (upnphost.h)
The RegisterDeviceProvider method registers a device provider with the device host. The device provider is not published on the network. Instead, it creates devices dynamically and registers them using RegisterRunningDevice.
HRESULT RegisterDeviceProvider( BSTR bstrProviderName, BSTR bstrProgIDProviderClass, BSTR bstrInitString, BSTR bstrContainerId );
Specifies the name of the device provider.
Specifies the ProgID of object that implements the IUPnPDeviceProvider interface. This object must already be registered with COM. This object must be an in-process COM server (CLSCTX_INPROC_SERVER) and must be accessible to LocalService.
Identifies an initialization string specific to a device provider.
Specifies a string that identifies the process group in which the device provider belongs. All devices and device providers with the same container ID are contained in the same process.
If the method succeeds, the return value is S_OK. Otherwise, the method returns one of the COM error codes defined in WinError.h.
Common errors that can occur when invoking this function include:
- The necessary COM object was not found.
- There is no access to the COM object for LocalService.
- Subordinate COM interfaces.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||None supported|