public void powerOff()
        {
            //string sessionRef = service.IMachine_getSessionPID( machineRef );
            //service.IMachine_lockMachine( machineRef, sessionRef, LockType.Shared );
            //string sessionName = service.IMachine_getSessionName( machineRef );
            string session = service.IWebsessionManager_getSessionObject(vboxRef);

            service.IMachine_lockMachine(machineRef, session, LockType.Shared);

            //service.IWebsessionM
            //service.IConsole_powerDown( machineRef );
            string console = service.ISession_getConsole(session);

            service.IConsole_powerDown(console);
            service.ISession_unlockMachine(session);
        }
示例#2
0
文件: Machine.cs 项目: palzj/VBOX.NET
        public void Stop()
        {
            String progress = service.IConsole_powerDown(Console);

            service.IProgress_waitForCompletion(progress, -1);
        }