|
-
May 28th, 2002, 09:56 AM
#1
Thread Starter
New Member
Register/Unregister DLL and Binary Compatible Q's
I apologize if these questions have been asked before. I searched the forums and could not find what I was looking for.
I have a program that is going to use an .exe that calls an activeX .dll. Both the .dll and the .exe were created in VB6. Right now, on my test box, I have the .exe shell to regsvr32.exe to register the .dll when the program starts, and unregister it when it ends.
Is there any disadvantage to doing it this way?
Am I filling up the registry with junk keys each time I register and unregister the .dll?
Also, do I have to use binary compatibility mode when I compile the .dll if I plan to make internal changes to the functions in future releases? By internal, I mean that I would not affect any public interfaces, just how the 'guts' of the functions work.
Thanks in advance for your help.
JH
-
May 28th, 2002, 10:24 AM
#2
If you register and unregister the dll within your application then that kind of defeats the part of the purpose of using the dll. Usually a dll is used to share functions among mulitple applications but since you unregister it then it wont be available to other applications unless they do the same. Why have you choosen to do this? Yes use binary compatibility.
-
May 28th, 2002, 10:59 AM
#3
Thread Starter
New Member
The only reason I was having the .exe register and unregister the .dll was so that it would be easy to swap out the .dll with a new version, just by making sure that the program isn't running, and copying the .dll over the old one. Am I mistaken?
Also, here's one more question. Is there any way to make the DLL so that it only works with approved programs? I mean, I guess I could write an authentication routine that checks for a password/key that is passed by the executable, but I was wondering if there was any built-in functionality.
Thanks again!
JH
-
May 28th, 2002, 11:36 AM
#4
use a class module within the exe
to do this, you could try using a class module within an exe.
rgds,
abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
May 28th, 2002, 11:55 AM
#5
As long as backward compatibility exists then you can just replace the dll without needing to re-register it or if new things are added then re-registering the newer one once when it is installed will still keep applications that used the old version working. If this the only application that uses the dll then you may want to follow abhijit's advice and move your classes into the exe. That would solve both of your problems.
-
May 28th, 2002, 11:56 AM
#6
Thread Starter
New Member
Excellent. Thank you for your help!
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
|