Share via


IVMVirtualMachine::SetAccountNameAndPassword method

The SetAccountNameAndPassword method sets the account name and password for the context in which this virtual machine will run.

Syntax

HRESULT SetAccountNameAndPassword(
  [in] BSTR accountName,
  [in] BSTR accountPassword
);

Parameters

accountName [in]

The account name for the context in which this virtual machine will run.

accountPassword [in]

The account password for the context in which this virtual machine will run.

Return value

This method can return one of these values.

Return code Description
S_OK
The operation was successful.
E_ACCESSDENIED
The accountName or accountPassword parameter is not valid.
VM_E_VM_UNKNOWN
The virtual machine configuration is not valid.
DISP_E_EXCEPTION
An unexpected error has occurred.

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMVirtualMachine