Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile DLL and Distribute DLL & Source Code with Calling program? 1

Status
Not open for further replies.

Austral

Programmer
Oct 31, 2002
18
0
0
US
Hi,

I have a VB 6.0 DLL that I wrote and a VB program that uses the DLL. I need to be able to distribute both. I want to distribute the executable without the source code for the DLL and the source code for the VB calling program.

First, what is the best way to compile the DLL? Should I use the Package and Deployment or just File|Make. If I use the Package and Deployment, It creates a Package folder and a sub folder Support. I assume I would have to distribute the .CAB, setup.exe and SETUP.LST that are in the Package folder but I would not distribute anything in the Support folder. Is that true?

If I then run the setup.exe on another computer will it register the DLL on that computer? If, yes where does it put it? Someone told me that I should create a batch file to register the DLL on another computer. If I need to do that does anyone have a sample that I could use to understand how to do this.

Do I have to use REGSRVR32 to register the DLL?

Also, to make it unique I understand I need a GUID. Does this get created when I run the Make or the Package and Deployment or do I have to do something special.

I don't want to distribute the source for the DLL so I can't just send them the sourec for the DLL and the calling program and let them run the Package and Deployment for both. But I have to give them the source code for the calling program because they have to customize it for their needs.

Any ideas or samples would be greatly appreciated.

Thanks

Austral
 

First, Yes that is true
Second, Usually the system/system32 folder.
Second.Five, A batch (MSDOS *.bat file) would contain the same commands as you could type in a dos window to register the dll.
Third, Yes
Fourth, Compiling and installation will take care of this for you,
Fifth, Fully document the dll and distribute it via the setup.

Good Luck

 
Thank you very much. Your response was very helpful.
 
I'm back working on this project.

I compiled the DLL and I'm now trying to run the P&D for the calling program using the compiled DLL.

I'm getting "Missing Dependency Information"
Name - msado21.tlb C:\Program Files\Common Files\System\ado

I have a reference set for Microsoft ActiveX Data Objects 2.1 library in my calling program that I'm trying to complie.

I found a document on MSDN "Missing Dependency Information". It said that "The VB6dep.ini file provides the Package and Deployment Wizzard with an all-purpose list of dependency files and references used by Visual Basic". It said that this list is created when you install Visual Basic.

I looked in the VBdep.ini file. I only have an entry for MSADO20.tlb even though I have available references for Microsoft ActiveX Data Objects 2.0, 2.1, 2.5, 2.6 and 2.7.

Do I need an reference for these in VBdep.ini? Is my file obsolete or corrupted?

The 5 lines after [MSADO20.tbl] are exactly the same as the 5 lines after [MSADOR15.dll]. Can I just edit the VBdep.ini file and add a reference for MSADO21.tbl?

Thanks for any help you can give me.

Austral
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top