I confirm that on Windows XP (32 Bit of course) the exact same code works perfectly
Session s = new Session();
or
Session s = new Session();
doesn't thows any exception and instead creates a valid session i can inspect and use normally.
this enforce my supposition that there is something wrong in the registration of the VBoxC.dll that's apparently is the one that contains the factory for the Session object, or in the TPL defintion when the host system is 64 bit.
that's two times strange if you consider that the code
var vbox = new VirtualBoxClass();
works well both on 64 and 32 bit windows OS... and it is exposed by the same TPL.
In fact it's factory appears to be contained in a different file (VBoxsvc.exe), so this may be the difference...
Unfortunately i'm not a great expert in .NET-COM interaction and at the moment i don't know how to solve this issue.
I'm also considering that the otehr frontends works well on my Windows 7 64 bits, so there should be a way to make this work... obviously the other frontends are not .NET so it is probably all the marshalling-unmarshalling things that becomes brokens somewhere
that's very frustrating