[vbox-dev] MSCOM - ISession CoCreateInstance
samuel.rats at gmail.com
Mon Jun 25 00:37:16 PDT 2012
Thanks for your answer Klaus, but it doesn't change anything.
I just compiled the given sample for Windows, and I got exactly the same
2012/6/21 Klaus Espenlaub <klaus.espenlaub at oracle.com>
> On 21.06.2012 16:28, Samuel Rats wrote:
> > Hi guys,
> > I'm currently working on a custom device manager, and I got a little
> > probleme : I'm unable to retreive session object from MSCOM
> > This work :
> > CoCreateInstance(CLSID_VirtualBox, 0, CLSCTX_LOCAL_SERVER,
> > IID_IVirtualBox, (void**)&this->vbox);
> Yes, because it's getting a reference for an IVirtualBox instance (which
> actually lives in an out of process server, VBoxSVC).
> > This does'nt (error 80040154):
> > CoCreateInstance(CLSID_Session, 0, CLSCTX_LOCAL_SERVER, IID_ISession,
> > (void**)&this->session)
> The session object doesn't exist yet, and it must be created in the
> current process. So it must be CLSCTX_INPROC_SERVER.
> > Any advice ?
> Yes, look at the SDK sample code for this
> (sdk/bindings/mscom/samples/tstVBoxAPIWin.cpp) - it has the respective
> code sequences in it.
> vbox-dev mailing list
> vbox-dev at virtualbox.org
Co-Fondateur du LYAUG
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vbox-dev