activex.exe only works when running in VB
I have created an ActiveX.exe containing a single class. The purpose of this class is to use a comport on a remote machine. But I can't even get it to work on the local machine, unless I start the ActiveX.exe project in VB and then access it from another VB project. I have tried to use both and but I get a "The specified module could not be found." error.
I have done this many times before, and it usually works fine so I'm a bit puzzled. Any suggestions?
Re: activex.exe only works when running in VB
Have you compiled with Binary Compatibility?
Re: activex.exe only works when running in VB
Re: activex.exe only works when running in VB
In that case, could you have a permissions issue? If you compile an ActiveX object on a machine, then it should be creatable. If you are using binary compatibility there should be no problems.
Re: activex.exe only works when running in VB
This might be a silly question but, did you actually register the ActiveX object using regsvr32?
Re: activex.exe only works when running in VB
If you've compiled it then it will be automatically registered on the host machine (always a bad idea, but the boys at m$ . . .)
Sounds to me like an interface forwarding problem.
What you need to do is to clean out the registry of all references to your server (activex exe) switch compatibility to None, and recompile, then switch compatibility to binary.
You will need to delete the exe from your filesystem (or copy it elsewhere) before you clean your registry. I use regscrub (google for free download) to clean out the entries.
Recompile your exe as above and then you should be all done.
Any project that references this exe will need to be re-referenced, and recompiled against the new compilation