IVdsAdmin::RegisterProvider method (vdshwprv.h)

[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]

Registers the specified hardware provider with VDS. Hardware providers call this method.

Syntax

HRESULT RegisterProvider(
  [in] VDS_OBJECT_ID     providerId,
  [in] CLSID             providerClsid,
  [in] LPWSTR            pwszName,
  [in] VDS_PROVIDER_TYPE type,
  [in] LPWSTR            pwszMachineName,
  [in] LPWSTR            pwszVersion,
  [in] GUID              guidVersionId
);

Parameters

[in] providerId

The GUID of the hardware provider.

[in] providerClsid

The COM class identifier (Clsid) of the hardware provider.

[in] pwszName

The name of the hardware provider as a zero-terminated, human-readable string.

[in] type

The provider types enumerated by VDS_PROVIDER_TYPE. Use the VDS_PT_HARDWARE value to register a hardware provider with VDS.

[in] pwszMachineName

The name of the computer on which the hardware provider executes; a null-terminated, human-readable string. Use NULL to reference the current computer.

[in] pwszVersion

The version of the provider as a zero-terminated, human-readable string.

[in] guidVersionId

The GUID for this version of the provider.

Return value

This method can return standard HRESULT values, such as E_INVALIDARG or E_OUTOFMEMORY, and VDS-specific return values. It can also return converted system error codes using the HRESULT_FROM_WIN32 macro. Errors can originate from VDS itself or from the underlying VDS provider that is being used. Possible return values include the following.

Return code/value Description
VDS_E_ALREADY_REGISTERED
0x80042403L
The providerId is already registered. Only one version of a provider can be registered at any given time.

Remarks

If necessary, call UnregisterProvider to remove a provider before registering a new version.

An in-process provider calls this method from DllRegisterServer; whereas, an out-of-process provider calls from the WinMain function.

Hardware providers must not stop running while VDS is running.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header vdshwprv.h
Library Uuid.lib

See also

IVdsAdmin

IVdsAdmin::UnregisterProvider

VDS_PROVIDER_TYPE