VirtualBox

Opened 9 years ago

#14230 new defect

VirtualBox ISession get_Console returns S_OK but IConsole ptr is NULL

Reported by: vboxcomapijunkie Owned by:
Component: other Version: VirtualBox 4.3.28
Keywords: VirtualBox MS COM API Cc:
Guest type: Linux Host type: Windows

Description

Hi,

I am running into a strange thing here. My (pseudo) code (see below) works fine on Windows 7 SP1 / 64bit with 64bit VirtualBox and 64bit app binary. But when I compile the stuff not as x64 but Win32 (32bit binary on SysWOW64), the app crashes because get_Session returns S_OK but the delivered pointer IConsole * is NULL !!! Is this a bug or is it not possible to run a Win32 binary on Win7/64 with VirtualBox/64? I thought that it should be completely transparent using Microsoft COM? Here is the pseudo code:

BSTR machineName = SysAllocString(L"VMName");
IMachine *pMachine = NULL;
if (FAILED(pVBOX->FindMachine(machineName,&pMachine)))
{//do error stuff}
if (FAILED(pMachine->LockMachine(pVBOXSession,LockType_Write)))
{//do error stuff}
pMachine->Release, pMachine = NULL;
if (FAILED(pVBOXSession->get_Machine(&pMachine))) // get mutable one
{// do error stuff}
IConsole *pConsole = NULL;
if (FAILED(pVBOXSession->get_Console(&pConsole)))
{// do error stuff }

[...] At this position, pConsole is NULL on Win32 (SysWOW64) and not NULL on Win64 (x64). Any ideas?

Thank you.

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