IGuest_executeProcess and IGuest_getProcessStatus

This is for discussing general topics about how to use VirtualBox.
Post Reply
borja
Posts: 7
Joined: 25. Oct 2011, 09:43
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Sci Linux

IGuest_executeProcess and IGuest_getProcessStatus

Post by borja »

I am trying to use VBox SDK via web services.
And I am facing problems trying to retrieve the output of an executed process...
The 2 related functions are describes in the doc as:
IProgress IGuest::executeProcess(
[in] wstring execName,
[in] unsigned long flags,
[in] wstring arguments[],
[in] wstring environment[],
[in] wstring userName,
[in] wstring password,
[in] unsigned long timeoutMS,
[out] unsigned long pid)

getProcessOutput
octet[] IGuest::getProcessOutput(
[in] unsigned long pid,
[in] unsigned long flags,
[in] unsigned long timeoutMS,
[in] long long size)

but in the web service I can see:
public uint IGuest_executeProcess(string _this, string execName, uint flags, string[] arguments, string[] environment, string userName, string password, uint timeoutMS, out string returnval)

for what I can see here, the pid is being returned as the return value of the method, and the IProgress value is being returned as a managed object reference in returnval. (please clarify me)

Then I try to get the output:
Once again the SDK differs from what I have check in the web services:
public string IGuest_getProcessOutput(string _this, uint pid, uint flags, uint timeoutMS, long size)
It isn't such a great difference, but it returns a string instead of octet[]. So i suppose that bytes are being read as a string...
but not in the proper way, since the string has no sense for me at all... How culd i get the proper meaning of the string value???

Thanks a lot!!!
borja
Posts: 7
Joined: 25. Oct 2011, 09:43
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Sci Linux

Re: IGuest_executeProcess and IGuest_getProcessStatus

Post by borja »

It seems that he string was a Base64String, so it was necessary to convert it to a normal string.
Thanks anyway :D
Post Reply