[RESOLVED] Early bind/referencing ActiveX DLL problem
I have few ActiveX DLLs and one EXE, all stored in some folder. Then i have a BAT file, where i:
- copy all DLLs and EXE to the folder where BAT is located (optional) and
- run EXE.
Here's the problem. EXE is referencing old DLLs (located in the "original" folder). Is there a way, i can assing new (copied) DLLs as a reference to my new (copied) EXE? Here's why... i can't recompile any DLL if any instance of EXE is still running cause it's referencing it/em'.
Thank you!
-gav
Re: Early bind/referencing ActiveX DLL problem
You would have to unregister them and reregister them with the new path for it to use the new location.
Re: Early bind/referencing ActiveX DLL problem
Also, you don't have to use early binding at all - it's only convenient during development.
Before deploying I usually "switch" to late bindings (CreateObject...) - this way your app doesn't necessary depend on most recent release of your dll but it must be fully backward compatible.
Re: Early bind/referencing ActiveX DLL problem
Quote:
Originally Posted by RhinoBull
Also, you don't have to use early binding at all - it's only convenient during development.
Before deploying I usually "switch" to late bindings (CreateObject...) - this way your app doesn't necessary depend on most recent release of your dll but it must be fully backward compatible.
And with late binding, you should be able to register your DLL in form load and unregister it on unload if desired. In the code bank there is a project for doing this. I think the only issue is that if the DLL was created with binary compatibility, then maybe registration might fail if older version is in use? Dunno, never tried it. However, late binding prevents WithEvent declarations and Implements I would think.
Re: Early bind/referencing ActiveX DLL problem
Quote:
Originally Posted by LaVolpe
...However, late binding prevents WithEvents declarations and Implements I would think.
Most often this shouldn't even be an issue - I personally almost never use it anyway...
Re: Early bind/referencing ActiveX DLL problem
Quote:
Originally Posted by RobDog888
You would have to unregister them and reregister them with the new path for it to use the new location.
Of course :thumb:
Quote:
Originally Posted by RhinoBull
Also, you don't have to use early binding at all - it's only convenient during development.
Before deploying I usually "switch" to late bindings (CreateObject...) - this way your app doesn't necessary depend on most recent release of your dll but it must be fully backward compatible.
I'll concider this ;)
Thanks again!
-gav