VirtualBox

Opened 2 years ago

#21074 new defect

launchVMProcess via MSCOM -- environment changes parameter type mismatch ambiguity

Reported by: jprogman Owned by:
Component: other Version: VirtualBox 6.1.30
Keywords: launchVMprocess COM Cc:
Guest type: all Host type: Windows

Description

When calling launchVMProcess() through MSCOM by VBScript, JScript, Python, etc.. they all end up with a "type mismatch" error. After some process of limitation, it might be the third and final parameter the cause of it: the list of environment changes.

According to the source in c++, it supposed to accept a string array, but the source wants a specific type of array: a string (utf-8) array. It doesn't like variant arrays (I believe they're called safearrays?). Unfortunately, because the samples or examples provided in the SDK doc is too outdated -- i.e. using openRemoteSession rather than launchVMprocess -- I'm lost as to how to pass something to that third parameter that'll satisfy VirtualBox MSCOM.

I was referring to the definition of launchVMProcess() here: trunk/src/VBox/Main/src-server/MachineImpl.cpp#L7814

If there are new steps that weren't documented, they should be updated accordingly; especially the SDK doc.

It's worth mentioning that the issue from Ticket #20750 might be related to what was mentioned here.

Change History (0)

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette