3.4.5.2.3.1 IVdsServiceLoader::LoadService (Opnum 3)

The LoadService method is used by client applications to load the VDS service on a remote machine.

 HRESULT LoadService(
   [in, unique, string] LPWSTR pwszMachineName,
   [out] IVdsService** ppService
 );

pwszMachineName: A pointer to a string that contains the name of the machine on which the VDS service is loaded.

ppService: A pointer to the IVdsService interface that, if successfully completed, returns the IVdsService interface to the VDS service that runs on the machine represented by pwszMachineName.

Return Values: The method MUST return zero or a non-error HRESULT (as specified in [MS-ERREF]) to indicate success or return an implementation-specific nonzero error code to indicate failure. For the HRESULT values predefined by the Virtual Disk Service Remote Protocol, see section 2.2.3.

When the server receives this message, it MUST validate the following parameter:

  • Verify that ppService is not NULL.

The server MUST:

  • Load the VDS service on the computer specified by pwszMachineName parameter.

  • QueryInterface for the IVdsServiceInitialization interface.

  • Call the IVdsServiceInitialization::Initialize method, passing the pwszMachineName parameter input to this method.

  • Point ppService to the IVdsService interface for the VDS service that is loaded.

  • Return an HRESULT that indicates failure or success.

The server object that is created when this method is called MUST implement only these interfaces:

  • IVdsService

  • IVdsServiceHba

  • IVdsServiceIscsi

  • IVdsServiceUninstallDisk

  • IVdsServiceSAN