> -----Ursprüngliche Nachricht----- > Von: VirtualBox end user list <[email protected]> > Gesendet: 15.05.08 11:15:48 > An: VirtualBox end user list <[email protected]> > Betreff: Re: [vbox-users] Odd behavoir with COM and CLSID_Session
> Dennis Rapp wrote: > > > I have tried to use the VirtualBox SDK like it is shown here: > > http://www.virtualbox.org/browser/trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp > > to create my own hosting/management process for VBox. > > > > But when I try to instantiate the Session coclass i receive > > an error telling me, that the class is not registered. After looking > > up the CLSID in the CLASSES_ROOT registry hive and trying to obtain > > the class factory manually by loading the associated VBoxC.dll the only > > problem/issue I can think of is, that I'm creating a 32-bit process on > > a 64-bit machine. But is that important with COM? Or is there any other > > reason the whole COM thing fails? (the outproc server/etc. is working) > > As you know all in-process COM classes (and Session is such a class) > reside in DLLs and get loaded into the client process' address space > when instances of these classes are created. However, you cannot load a > 32-bit DLL to a 64-bit process on Windows (and vice versa). > > To solve this and similar problems, 64-bit Windows has two registries: > the "normal" one which is for 64-bit stuff (including 64-bit COM DLLs) > and the "legacy" one which is for 32-bit stuff (including 64-bit COM > DLLs). For 32-bit processes, the "legacy" one shadows (substitutes) the > "normal" one so that 32-bit processes only see 32-bit COM DLLs while > 64-bit processes only see 64-bit COM DLLs. > > Therefore, if you install a 64-bit version of VirtualBox, you can only > access Session (VBoxC.dll) from a 64-bit process. If you install a > 32-bit verison of VirtualBox to a 64-bit Windows, you will only be able > to create Session from a 32-bit process. > > Note that it is unrelated to out-of-process classes like VirtualBox > because they live in a separate process and can flawlessly communicate > to other processes no matter what bitness they have. > > So, if I understand your case right, you will have to install a 32-bit > version of VirtualBox if you want to use Session from a 32-bit process. > > -- > Regards, > Dmitry A. Kuminov > > > _______________________________________________ > vbox-users mailing list > [email protected] > http://vbox.innotek.de/mailman/listinfo/vbox-users > That's exactly the issue, so thanks for clearing up the things (meanwhile I've installed the 64-Bit compilers from the SDK which has solved all those problems). _______________________________________________________________________ Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220 _______________________________________________ vbox-users mailing list [email protected] http://vbox.innotek.de/mailman/listinfo/vbox-users
