Creation of DLL task in visual studio 2005 is so simple. Follow the following
steps to make DLL in visual studio 2005.

Make new project via using menu or press “Ctrl+Shift+N”.

Select Win32 from Project types and select “Win32 Console Application” project
template.

Give project name which you want, select location of project where you want to
save. Press OK.

Win32 Application Wizard will welcome you, press Next button.

You have to select DLL in application type and Press Finish.

Your project will create. Build your project and get Library File(.lib file) and Dynamic Link Library (.dll file).

Now, important thing related to exporting function. There is two ways of exporting function. One, using Module-Definition File (.def file) which is old way to export DLL (I like this way), second way, export function using Microsoft Specific extension of the C language via using __declspec(dllexport) keyword.

For learning these ways visit following sites.

(using def file)
[link] http://msdn2.microsoft.com/en-us/library/28d6s79h(VS.80).aspx

(using keyword)
[link] http://msdn2.microsoft.com/en-us/library/a90k134d(vs.80).aspx

By,
-–| AimsLife™ |–



5 Responses to “How make DLL using C/C++ in Visual Studio 2005?”  

  1. 1 Constantin

    Man if you want to write something good , write a complete tutorial about how to create a dll. Many people can figure on their one the part with the New Project and select the dll radio button.

  2. 2 Dirty D

    Yay, I completely agree with him Constantin! This is nothing!

  3. 3 Muhammad Omer Nasir

    Inshah Allah! I will write complete tutorial on it with example source code, very soon… Thanks!

  4. Hi

    I am trying to create a DLL which will be combination of a number of .obj files. Some of the object files will be present in some other location. Please let me know where to specify the location of object files in VS?


Leave a Reply