IVdsServiceLoader::LoadService method (vds.h)
[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]
Launches VDS on the specified computer and returns a pointer to the service object.
Syntax
HRESULT LoadService(
[in] LPWSTR pwszMachineName,
[out] IVdsService **ppService
);
Parameters
[in] pwszMachineName
This parameter must be set to NULL.
Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista and Windows Server 2003: This parameter contains the name of the host computer. Setting it to NULL causes VDS to be loaded and initialized on the local host.
[out] ppService
The address of an IVdsService interface pointer. Callers must release the interface when it is no longer needed by calling the IUnknown::Release method.
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 | Description |
---|---|
|
The service has launched successfully. |
Remarks
Although S_OK indicates that VDS has launched successfully, the service initialization can be incomplete when the method returns. For this reason, after calling this method, you must call the IVdsService::WaitForServiceReady method to wait for VDS initialization to complete.
For a code example, see Loading VDS.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | vds.h |
Library | Uuid.lib |