Page 1 of 1

SDK question

Posted: 26. Jan 2010, 06:07
by bovus
I am interesting in using the VirtualBox SDK in .NET. I am looking for a function that will allow me to copy a file from a guest machine onto my host machine and vice-versa. I looked through the SDK reference manual but was not able to find anything useful. Did I miss something? Thanks.

Re: SDK question

Posted: 26. Jan 2010, 09:42
by mpack
Nope, you didn't miss anything. The SDK is about starting and stopping VMs etc, i.e. manipulating the VirtualBox application in various ways. What you are talking about is manipulating the guest OS, requiring intimate knowledge of the guest OS (e.g. its filesystem or active networking and security protocols), beyond the scope of the SDK.

Re: SDK question

Posted: 28. Jan 2010, 00:06
by bovus
Thanks for your reply. Do you have suggestions on anything I can look into for file sharing between host and guest OS outside of the VirtualBox SDK? I know I will only be using Windows-based guest OS's.

Re: SDK question

Posted: 28. Jan 2010, 15:23
by mpack
bovus wrote:Do you have suggestions on anything I can look into for file sharing between host and guest OS outside of the VirtualBox SDK?
I'm not sure what you are asking. You can use VirtualBox shared folders or an ordinary network share. If you were willing to contemplate COM programming then I doubt you need advice from me on how to access a network drive in software.

Re: SDK question

Posted: 21. Jul 2011, 17:46
by rjzak
Not to resurrect dead threads, but the latest SDK, 4.1, has functions copyToGuest() and copyFromGuest(). Skip to page 88 in the SDK PDF.
IProgress IGuest::copyToGuest(
[in] wstring source,
[in] wstring dest,
[in] wstring userName,
[in] wstring password,
[in] unsigned long flags)
source Source file on the host to copy.
dest Destination path on the guest.
userName User name under which the copy command will be executed; the user has to exist
and have the appropriate rights to write to the destination path.
password Password of the user account specified.
flags CopyFileFlag flags. Not used at the moment and should be set to 0.
Copies files/directories from host to the guest.
If this method fails, the following error codes may be reported:
• VBOX_E_IPRT_ERROR: Error while copying.