GuestImpl.cpp revision 5b90f3eca10de3fc7102084740c0d77af33e28c1
* VirtualBox COM class implementation * Copyright (C) 2006-2008 Sun Microsystems, Inc. * This file is part of VirtualBox Open Source Edition (OSE), as * you can redistribute it and/or modify it under the terms of the GNU * General Public License (GPL) as published by the Free Software * Foundation, in version 2 as it comes in the "COPYING" file of the * VirtualBox OSE distribution. VirtualBox OSE is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa * additional information or have any questions. ///////////////////////////////////////////////////////////////////////////// // constructor / destructor ///////////////////////////////////////////////////////////////////////////// // public methods only for internal purposes ///////////////////////////////////////////////////////////////////////////// * Initializes the guest object. /* Enclose the state transition NotReady->InInit->Ready */ /* mData.mAdditionsActive is FALSE */ /* Confirm a successful initialization when it's the case */ * Uninitializes the instance and sets the ready flag to FALSE. * Called either from FinalRelease() or by the parent when it gets destroyed. /* Enclose the state transition Ready->InUninit->NotReady */ ///////////////////////////////////////////////////////////////////////////// // redirect the call to IMachine if no additions are installed /* forward the information to the VMM device */ /* forward the information to the VMM device */ /* forward the information to the VMM device */ tr(
"VMM device is not available (is the VM running?)"));
* Creates the argument list as an array used for executing a program. * @returns VBox status code. * @todo Respect spaces when quoting for arguments, e.g. "c:\\program files\\". * @todo Handle empty ("") argguments. for (
int i=0; i<
iArgs; i++)
if (i > 0)
/* Insert space as delimiter. */ * Appends environment variables to the environment block. Each var=value pair is separated * by NULL (\0) sequence. The whole block will be stored in one blob and disassembled on the * guest side later to fit into the HGCM param structure. * @returns VBox status code. *
pcEnv +=
1;
/* Increase env pairs count. */#
endif /* VBOX_WITH_GUEST_CONTROL */#
else /* VBOX_WITH_GUEST_CONTROL */ /* Flags are not supported at the moment. */ /* Just be on the safe side when calling another process. */ /* Prepare environment. */ for (
unsigned i = 0; i <
uNumEnv; i++)
/* Forward the information to the VMM device. */ LogFlow((
"Guest::ExecuteProgram: numParms=%d\n", i));
/** @todo Get the PID. */ tr(
"The service call failed with the error %Rrc"),
#
endif /* VBOX_WITH_GUEST_CONTROL */// public methods only for internal purposes ///////////////////////////////////////////////////////////////////////////// /* Older Additions didn't have this finer grained capability bit, * so enable it by default. Newer Additions will disable it immediately /* vi: set tabstop=4 shiftwidth=4 expandtab: */