|
| ||||||||||
| Tags: api, c program, dll |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Using DLL in a C program
BTW: what is a DLL? what are the similarities and differences with an API? Need your help! |
|
#2
| ||||
| ||||
| Re: Using DLL in a C program
DLL is a library that is particularly being responsible to start the application and linked to the application at that time; unlike a static library included in the program at compile time. http://en.wikipedia.org/wiki/Linker API is just a function whose name and arguments and their actions are defined in a document. DLL or static libraries contain an implementation of an API. A header contains just declarations of functions just to say the compiler that the function exists and take the arguments that calls the functions. Finally, if you have a sufficient level in English: http://en.wikipedia.org/wiki/Dynamic-link_library very complete with full references below. |
|
#3
| ||||
| ||||
| Re: Using DLL in a C program Quote:
A Windows API (API for others it may be different) is not a set of functions. It is a function, written in C, included in Windows and documented by Microsoft. The API physically resides in DLLs (user32.dll, for example). |
|
#4
| ||||
| ||||
| Re: Using DLL in a C program Quote:
An API can be reduced to a function, but in general this is not the case. And what about windows, in Wikipedia: Quote:
Quote:
|
|
#5
| ||||
| ||||
| Re: Using DLL in a C program
Thank you for these answers very clear Also what are the advantages and disadvantages of a DLL loading implicit and explicit loading? |
|
#6
| ||||
| ||||
| Re: Using DLL in a C program
The difference is that for a load explicit, we must include in the program to call LoadLibrary (), GetProcAddress (), and FreeLibrary () when it is not necessary if the load is implied. Generally for the DLL that it creates itself, loading is explicit, so we made the three calls the calling program. With LoadLibrary (), it is certain that the DLL will be charged. This avoids having to ask questions depending on the version of Windows or other parameters. And if we LoadLibrary () when it is not useful, then everything works anyway. But for DLLs hyper Commons, the kind user32.dll is unnecessary to do so. Often booleans are actually integers. But it would be better if the DLL return the integers. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Using DLL in a C program" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows 7: Program Files vs Program Files(x86) | Script | Operating Systems | 5 | 01-06-2011 06:03 PM |
| “This program is using by another program” error message in windows 7 | SchuRacer | Operating Systems | 3 | 28-01-2011 12:57 PM |
| Windows DEP program continuously closes the MSN mail program | Charioteer | Windows Software | 4 | 19-10-2010 11:52 AM |
| Running a program under WOW64 on a program X64 | Pratyush | Software Development | 2 | 08-04-2009 09:51 PM |
| End Program ccSvcHst Program not responding | Leena | Operating Systems | 6 | 29-08-2008 01:58 PM |