开发者

How to compile to form a DLL

I have sample project codes. When I compile it inside Visual C++, it produce as EXE. I would like to know, how can I change the final output to DLL form. Means that, when I compile,开发者_JAVA百科 it become DLL.


In a nut shell, a dynamic link library (DLL) is a collection of small programs, which can be called upon when needed by the executable program (EXE) that is running.

E.g Suppose, it would be if the program (exe) needs to get the free space of your hard drive. It can call the DLL file that contains the function with parameters and a call function. The DLL will then tell the executable the free space. This allows the executable program to be smaller in size and not have to write the function that has already exists

You can check the required steps here : How to Create a Simple Win32 DLL ?


Compiling it as a DLL is comparatively easy, namely you set the "Configuration Type" in Configuration -> General in the project properties to "Dynamic Link Library".

However this isn't going to accomplish much unless you also export the entry point(s) into the DLL.


When you create a new project choose "Class Library" in the New Project dialog:

How to compile to form a DLL

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜