Hi, <div><br></div><div>Thanks for your answer Klaus, but it doesn't change anything.</div><div><br></div><div>I just compiled the given sample for Windows, and I got exactly the same problem.</div><div><br></div><div>

<br><div class="gmail_quote">2012/6/21 Klaus Espenlaub <span dir="ltr"><<a href="mailto:klaus.espenlaub@oracle.com" target="_blank">klaus.espenlaub@oracle.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On <a href="tel:21.06.2012%2016" value="+12106201216">21.06.2012 16</a>:28, Samuel Rats wrote:<br>
> Hi guys,<br>
><br>
> I'm currently working on a custom device manager, and I got a little<br>
> probleme : I'm unable to retreive session object from MSCOM<br>
><br>
> This work :<br>
> CoCreateInstance(CLSID_VirtualBox, 0, CLSCTX_LOCAL_SERVER,<br>
> IID_IVirtualBox, (void**)&this->vbox);<br>
<br>
</div>Yes, because it's getting a reference for an IVirtualBox instance (which<br>
actually lives in an out of process server, VBoxSVC).<br>
<div class="im"><br>
> This does'nt (error 80040154):<br>
> CoCreateInstance(CLSID_Session, 0, CLSCTX_LOCAL_SERVER, IID_ISession,<br>
> (void**)&this->session)<br>
<br>
</div>The session object doesn't exist yet, and it must be created in the<br>
current process. So it must be CLSCTX_INPROC_SERVER.<br>
<br>
> Any advice ?<br>
<br>
Yes, look at the SDK sample code for this<br>
(sdk/bindings/mscom/samples/tstVBoxAPIWin.cpp) - it has the respective<br>
code sequences in it.<br>
<br>
Klaus<br>
<br>
_______________________________________________<br>
vbox-dev mailing list<br>
<a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br>
<a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Samuel Rats
<div>Co-Fondateur du LYAUG</div><br>
</div>