Workaround for OCX State Problem (VMRC Active X)

26. April 2007 04:31 by Csaborio in General  //  Tags: ,   //   Comments (0)

On a previous post I was having problems with the VMRC ActiveX control when creating an instance at runtime.  The problem boiled down in having an invalid OCX state exception thrown at me whenever I tried to access a property of the VMRC ActiveX control at runtime.

After researching for quite a while on the Internet, it struck me that if I just placed the VMRC ActiveX in a UserControl at Design time, and instantiated that UserControl instead of the ActiveX directly, things would work great.  I implemented this into the VMCA application and it worked perfectly fine.   You can see I managed to get VMRC connections to different machines in different tabs at runtime on this post.

Some people have asked where they can get a copy of the VMCA.  Unfortunately as of now, the application hasn't been thoroughly tested and is missing some functionality which I deem as basic.  Also, this is something I have been working on my spare time and lately I have been swamped with other projects.  Perhaps the best approach would be to take it to stable phase and then try and get it on CodePlex so that everyone can pitch in...we'll see how that goes.

For all things related to software migration, be sure to visit Artinsoft's website. For training in Visual Basic to C# migrations, Visual Basic to VB.Net, Virtualization, and 64-bit training check our training web page.