|
-
Jan 10th, 2008, 07:40 PM
#1
[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
-
Jan 10th, 2008, 07:56 PM
#2
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 10th, 2008, 08:54 PM
#3
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.
-
Jan 10th, 2008, 09:50 PM
#4
Re: Early bind/referencing ActiveX DLL problem
 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.
Last edited by LaVolpe; Jan 10th, 2008 at 09:54 PM.
-
Jan 10th, 2008, 10:11 PM
#5
Re: Early bind/referencing ActiveX DLL problem
 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...
-
Jan 11th, 2008, 06:08 AM
#6
Re: Early bind/referencing ActiveX DLL problem
 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 
 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|