I am building a system for switching snapshots remotely. I am using a WCF web service as my base. The code so far is simple
Code: Select all
var vBox = new VirtualBoxClass();
Session session = new SessionClass();
var vm = vBox.FindMachine("TestMachine");
vm.LockMachine(session, LockType.LockType_Write);
var console = session.Console;
if (value == 7)
{
var off07Snap = vm.FindSnapshot("Office 2007");
console.RestoreSnapshot(off07Snap);
}
else
{
var off10Snap = vm.FindSnapshot("Office 2010");
console.RestoreSnapshot(off10Snap);
}
I have tried changing the Build Platform target to both x86 and x64.
When I use x86 the program starts and runs until it hits
Code: Select all
Session session = new SessionClass();
if I switch it to x64 then the program doesn't even start with error:{"Retrieving the COM class factory for component with CLSID {3C02F46D-C9D2-4F11-A384-53F0CF917214} failed due to the following error: 8007007e The specified module could not be found. (Exception from HRESULT: 0x8007007E).":null}
It seems to be an issue with my setup as it doesnt seem others have the same problems as me. any help you can give would be great.Could not load file or assembly 'Interop.VirtualBox' or one of its dependencies. An attempt was made to load a program with an incorrect format.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.