the wrapper is not working on 64 bit vista

Sep 21, 2009 at 4:43 PM
Edited Sep 21, 2009 at 4:44 PM

Hello,

       I am using our wrapper on 64 bit vista but its not working giving exception for interop. Even though i build my solution as x86 the error is the same . So can u tell me what could be the possible error or in case u want my projectcode how can i send it to u?

 

best regrads

papapa

Coordinator
Sep 21, 2009 at 6:48 PM
  • Are you able to run the same program on a 32-bit OS?
  • What is the error you're getting?

 

Sep 23, 2009 at 10:23 AM

Hello dblock,

                        yes i am able thr same program on 32 bit vista, the following is the simple source code  and the exception

 

-------------------------------------------------------------------------------------------------------------------------------------------

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vestris.VMWareLib;


namespace Vertis
{
    class Program
    {
        static void Main(string[] args)
        {

             try
            {
                Console.WriteLine("Now we try to power on the VMWare...\n");

                VMWareVirtualHost virtualHost = new VMWareVirtualHost();
                // connect to a local (VMWare Workstation) virtual machine
                virtualHost.ConnectToVMWareWorkstation();
                // open an existing virtual machine
                VMWareVirtualMachine virtualMachine = virtualHost.Open(@"e:\smoketest\winxp\windows xp professional en.vmx");
                // power on this virtual machine
                virtualMachine.PowerOn();

                             

              Console.WriteLine ( "The  VM is powered on...");
              Console.ReadLine();
             }

            catch (Exception e)
            {
                string s = "The VM failed to power on because.....  ";
                Console.WriteLine(s + e.ToString());
                Console.ReadLine();
           
            }
        }
        }
    }

 

 

--------------------------------------------------------------------------------------------------------------------------

 

Now we try to power on the VMWare...

The VM failed to power on because.....  System.TypeInitializationException: The
type initializer for 'Vestris.VMWareLib.VMWareInterop' threw an exception. --->
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM cla
ss factory for component with CLSID {6874E949-7186-4308-A1B9-D55A91F60728} faile
d due to the following error: 80040154.
   at Vestris.VMWareLib.VMWareInterop..cctor()
   --- End of inner exception stack trace ---
   at Vestris.VMWareLib.VMWareVirtualHost.ConnectToVMWareWorkstation()
   at Vertis.Program.Main(String[] args) in C:\Users\Administrator\Documents\Vis
ual Studio 2008\Projects\Vertis\Vertis\Program.cs:line 21

-------------------------------------------------------------------------------------------------

it seems that there its a COM->.net exception but the same wrapper works fine on 32 bit vista.

 

 

 

Coordinator
Sep 23, 2009 at 12:47 PM

This just says that VixCOM is not registered. I would uninstall VixCOM (I assume you did install it :)) and reinstall it, then if the problem persists I'd ask why this happens specifically on a 64-bit system on the VixCOM forum.

Coordinator
Sep 30, 2009 at 7:54 PM

Someone else ran into the same problem and found a solution. Make sure your program targets the x86 CPU and is not Any CPU (the default).