|
-
August 10th, 2009, 12:42 AM
#1
VB 6.0 and DLL Files
I have a project that I have made into an .exe file. My project uses a DLL file that my code is referenced to.
My question is how can I make my project reference to that DLl file without having to have the DLL file in the same folder (upon deployment)?
I would like to be able to have people download my program (exe file only) and have that one exe file on their desktop without having to have the DLL file present.
Is there a way?
Thanks in advanced
daveofgv
-
August 10th, 2009, 03:29 AM
#2
Re: VB 6.0 and DLL Files
NO! Well maybe??? It depends upon what the dll does and how you reference it but most vb6 programs need to be packaged and installed. See the PDW Package and Deployment Wizard and add the dll if it does not show up automatically. You could also use Inno. As for not needing the dll, if you treat it like a C dll in that you have API calls to it, then all you would need to do is check for its existence in win32 or app.path and if not there then don't use any code that calls the dll. Otherwise, if it is activex, your out of luck.
Good Luck
-
August 10th, 2009, 12:20 PM
#3
Re: VB 6.0 and DLL Files
Not quite.
A dll file, if not found in the app.path is then searched in C:\windows\system32
You can try on your developement system:
Copy the dll into C:\Windows\System32
Delete it from your project's folder
Run and see if it is found.
If so, you can make an install package with the P&D wizard.
Check if the dll file is correctly referrenced therein. If it is, it will be placed properly in the System32 folder on the target system.
Even with an activeX you are not out of luck yet.
Remove the ocx from your project.
Unregister the ocx in your app path.
Move it to System32
Register it there again.
Add it to your project again.
The P&D Wizard will put it to System32 on the target system automatically.
-
August 10th, 2009, 12:59 PM
#4
Re: VB 6.0 and DLL Files
If you are the owner of the DLL, you can just embed the code of the DLL into your own EXE and then have only one EXE run of the user's system. However, if you are referring to a third party DLL, then you need to have that DLL on the computer where your EXE will run. There is no work around for it.
Another option would be, if the DLL is a standard DLL that comes with the Operating System, then you can use Latebinding in your code.
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
|