Click to See Complete Forum and Search --> : activex.exe only works when running in VB
HFMa
Jul 21st, 2005, 04:46 AM
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 createobject and set obj = new cls 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?
Dave Sell
Jul 22nd, 2005, 10:55 AM
Have you compiled with Binary Compatibility?
HFMa
Jul 25th, 2005, 02:06 AM
Yes I have.
Dave Sell
Jul 25th, 2005, 08:59 AM
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.
nkad
Jul 25th, 2005, 05:25 PM
This might be a silly question but, did you actually register the ActiveX object using regsvr32?
yrwyddfa
Aug 5th, 2005, 05:56 AM
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.