|
Free Educational Resource Center for teachers and students. Includes Interviews, Sourcecode, Free Software, Research Papers, Articles, Tutorials and much more.. |
R E S E A R C H A C T I V I T Y . C O M
Our Fellow Research Center for Ph.D Schollars |
|
| Home About Submit & Earn | Archives: C And C + + Programming » Dev Packages » Interviews » Php Mysql Programming » Windows Programming | |
|
Windows Programming > create dll easily in c
Create DLL Easily In C DLL stands for Dynamic Link library you probably already know. You put few functions (and may be classes) in external file, compile it as DLL, then you call these functions at runtime through your application, that's all the story about DLL, which is not mystery. As per its name, best practice is to load DLL file in your application at runtime and use functions in it. The second way (I will not discuss is,) let your linker attach DLL to your application executable. I will discuss the first method which is called EXPLICIT LINKING. Part 1 : CREATING DLL
Part 2 : USING DLL As I already mentioned in first paragraph, that we will be using explicit linking method, here you go. First we need to make typedef of our function pointer that we need to call. In previous example we had a function called 'function1' which return type was 'void'. So creating new type out of it will be this way Then you need to load DLL in memory, get address of function function1 then run it, and then free the library.
|