I made a dll project... and I made an exe project :( But I'm afraid I'm not sure how to link them. I went through another program I got a while back that does this but I still can't figure out how.
[edit]BTW, I use MS VC++ 6[/edit]
Printable View
I made a dll project... and I made an exe project :( But I'm afraid I'm not sure how to link them. I went through another program I got a while back that does this but I still can't figure out how.
[edit]BTW, I use MS VC++ 6[/edit]
What do you want to do with them?
From a project you can load a DLL through LoadLibrary and then access an exported function using GetProcAddress. Have a look in the MSDN libraries for linking to DLLs etc.
Hope it helps.
HD
Thanks, but I still need one more thing... I like the example parksie posted but that uses VB :( and I looked through MSDN and just got more comfused :(
So how exactly would I include my C++ DLL into my C++ Win App? :confused:
You need to use the .lib file created when you linked the DLL in conjunction with the header file. That way it can link the functions implictly. Without them, you need LoadLibrary and GetProcAddress.
This means you need to take the lib file that is created and list it in the linker input section of the project settings.
After its compiled, Do I still need to include the .lib file? or does it look for .dll when its compiled?
Huh?
You don't need to distribute the lib along with your app if that's what you want to know - all your app needs is included in the exe.
The .lib has information on which DLL actually contains the code, so no, you don't need the .lib afterwards.