ActiveX DLL reference

Reply

Join Date: Jan 2007
Posts: 2
Reputation: richburg is an unknown quantity at this point 
Solved Threads: 0
richburg richburg is offline Offline
Newbie Poster

ActiveX DLL reference

 
0
  #1
Jan 7th, 2007
I have created activex dll using vb6. I have registered it using
regsvr32 on my clients pc. I call the dll functions from both VB exe file
and Excel VBA. All works fine so far. When I Remake my DLL file with
VB6 both the VB exe and the Excel VBA can no longer reference my DLL.
The version of my DLL is the same. For it to work I need to delete the
reference in Excell VBA and then Browse for the same DLL in the same
place and it works ok after that. For the VB exe file I need to do the same
and recompile the exe. How can I have the reference remain in place while
the dll file is the same? I want to be able to change my business logic in
the dll without having to reinstall all my software on my clients pc.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: ActiveX DLL reference

 
1
  #2
Jan 9th, 2007
Hi,

Use Late Binding of the .dll, like Create object.
Dont directly add the reference in VB6 (Calling project).

Dim MyObj As Object
Set MyObj = CreateObject("MyProj.MyDll")
This code creates an instance of the MyDll class that is defined by the DLL project named MyProj. After Creating the Class Object, U can use the Public properties and methods of the MyObj object just as if it had declared it using early binding. Now if you change the DLL's public methods, the compiled executable will still work (if you removed the methods the program uses). The problem with late binding is you don't get intellisense and calling the DLL's methods may take a bit longer time than it does with early binding.
And In Your Calling / Main Project, Just by Replacing the .dll, ur exe will work.


Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 2
Reputation: richburg is an unknown quantity at this point 
Solved Threads: 0
richburg richburg is offline Offline
Newbie Poster

Re: ActiveX DLL reference

 
0
  #3
Jan 9th, 2007
That fixed it. Thanks very much
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC