I found this tutorial about MFC DLLs here: http://www.dotnetheaven.com/
I'm trying to find out how to make a DLL but not for MFC or Win32 API in Visual Studio. This DLL will just contain C++ code I wrote myself, no other GUI API like MFC or Win32 API will be used.
Can you tell me how to do this step-by-step in Visual Studio 2005 or Visual Studio 2008? I would like to know what project type to choose in Visual Studio, what settings I have to apply in the properties dialog of that project, what code changes (if any) to my existing code I have to make to get a DLL after compiling, how to export functions to that DLL, etc etc...
It would be great if somebody could tell me step by step how to do this because I have never compiled a DLL file myself.
(please remember I don't want to make a MFC or Win32 API DLL but just C++ code that doesn't use any GUI API from Windows must be compiled into a DLL)
best regards,
Harry
HarryPosted Jan 9, 2009, 8:41 AM
I bought that book recently but I didn't find the answer to my question (yet) in the book.
Are you sure that tutorial makes a DLL without using Win32 API because it says 'How to create a WIN32 DLL from the scratch, A beginners tutorial.' and I also see the file "stdafx.h' there?
I also don't understand where to get the lines to put in the .def file. They write "sum @1" there, but where do I have to look to find this line to add?
thx in advance!
Mahesh ChandPosted Jan 9, 2009, 8:04 AM
Hmm .. It sends me 12 years back when I build a DLL using C++ by typing all code by hand. I think you should by a book called Programming Windows by Charles Petzold.
Here looks like a good link:
http://logix4u.net/Programming/vc++/A_Tutorial_on_creating_DLLs_with_VC++.html