Tuesday, November 1, 2011

DLLs

Hey all,
This time I'd like to discuss about DLL. DLL - The most used term in Windows operating system.
+ Dynamic Link Libraries(DLL) can be shared across multiple process in windows OS.
+ They can be loaded at run time unlike static libraries and they can really create modular apps in windows.
+ They can be easily upgraded without affecting the complete app.

They have some cons as well:
- DLL and its client should use same and same version of compiler
- DLL and its client should use same version of CRT DLL
- When class is exported from DLL then its base class and member class also should be exported.

Here we see some interesting questions about DLL in job market:
1. Why DLL instead of static libraries ?
2. What is lib file and how it is used by app?
3. How do you export C++ class in DLL?
4. Can I share data from DLL across different process and DLLs? If yes then how?
5. How can you debug DLL?
6. When will you use module definition file and when will you use lib file?
7. How do you load different version of DLL without affecting the client APP?
8. Using what tool you can see the exported function details in windows?
9. What are the difference between DLL and EXE?
10. How do you differentiate overloaded functions using GetProcAddress() when explicit linking is used?
11. How to call C++ DLL functions from C app?


No comments: