Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IVdsAdmin::RegisterProvider method

[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

providerId [in]

The GUID of the hardware provider.

providerClsid [in]

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

pwszName [in]

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

type [in]

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

pwszMachineName [in]

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

pwszVersion [in]

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

guidVersionId [in]

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/valueDescription
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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

VdsHwPrv.h

Library

Uuid.lib

See also

IVdsAdmin
IVdsAdmin::UnregisterProvider
VDS_PROVIDER_TYPE

 

 

Show: