Ejemplo n.º 1
0
        /// <summary>
        /// Login to the virtual machine
        /// </summary>
        /// <returns>true if succeeded, otherwise false</returns>
        public bool LogIn(string username, string password)
        {
            IJob jobHandle = m_vmHandle.LoginInGuest(username, password, 0, null);

            m_vixError = jobHandle.WaitWithoutResults();

            return(m_vixError == VixCOM.Constants.VIX_OK);
        }
Ejemplo n.º 2
0
        public void LoginInGuest(string username, string password)
        {
            VixCOM.IJob job = _virtualMachine.LoginInGuest(username, password, 0, null);
            UInt64      err = job.WaitWithoutResults();

            if (lib.ErrorIndicatesFailure(err))
            {
                short  errCode = lib.ErrorCode(err);
                string errMsg;
                errMsg = lib.GetErrorText(err, null);

                throw new Exception("LoginInGuest: " + errMsg);
            }
        }