Click here to Skip to main content
15,914,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHelp on DLL export Pin
tiwal2-Jan-08 5:19
tiwal2-Jan-08 5:19 
GeneralRe: Help on DLL export Pin
CPallini2-Jan-08 5:36
mveCPallini2-Jan-08 5:36 
GeneralRe: Help on DLL export Pin
tiwal2-Jan-08 21:58
tiwal2-Jan-08 21:58 
GeneralRe: Help on DLL export Pin
CPallini2-Jan-08 22:29
mveCPallini2-Jan-08 22:29 
GeneralRe: Help on DLL export Pin
tiwal2-Jan-08 23:49
tiwal2-Jan-08 23:49 
GeneralRe: Help on DLL export Pin
CPallini3-Jan-08 0:04
mveCPallini3-Jan-08 0:04 
GeneralRe: Help on DLL export Pin
tiwal3-Jan-08 21:31
tiwal3-Jan-08 21:31 
GeneralRe: Help on DLL export Pin
CPallini3-Jan-08 21:49
mveCPallini3-Jan-08 21:49 
tiwal wrote:
I've seen that you're using a dll header , which includes the exported function prototype ....


The DLL header has two purposes (a macro (un)definition makes the trick):
(1) Correctly declare the functions for exportation when compiling the DLL itself.
(2) Correctly declare the function for importation whenever you compile an application that links at load time the DLL (i.e. implicit link, via .lib file).

Since you application uses run-time (explicit) DLL link, then the header is not needed.


tiwal wrote:
using extern "C" right before the function definition is just the same , isn't it ?

Using the extern "C" block when compiling (with C++) the DLL makes it exporting a C-like interface, the same kind exported by the Win32 API; run time linking such kind of interface is simpler.


tiwal wrote:
Anyway, the fact that there's no unique standard on function name mangling scares me ....
What does it mean ? that you can't use a dll in a program that's not compiled with the same environment ?


Yes, there are compatibility issues, see for instance
http://blogs.msdn.com/oldnewthing/archive/2004/01/12/57833.aspx[^]
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

[my articles]


GeneralRe: Help on DLL export Pin
led mike2-Jan-08 5:36
led mike2-Jan-08 5:36 
GeneralRe: Help on DLL export Pin
tiwal2-Jan-08 22:00
tiwal2-Jan-08 22:00 
GeneralRe: Help on DLL export Pin
Matthew Faithfull2-Jan-08 5:43
Matthew Faithfull2-Jan-08 5:43 
GeneralRe: Help on DLL export Pin
tiwal2-Jan-08 22:13
tiwal2-Jan-08 22:13 
GeneralRe: Help on DLL export Pin
CPallini2-Jan-08 22:33
mveCPallini2-Jan-08 22:33 
QuestionRe: Help on DLL export Pin
David Crow2-Jan-08 8:45
David Crow2-Jan-08 8:45 
GeneralRe: Help on DLL export Pin
tiwal2-Jan-08 22:19
tiwal2-Jan-08 22:19 
QuestionRe: Help on DLL export Pin
David Crow3-Jan-08 6:53
David Crow3-Jan-08 6:53 
GeneralRe: Help on DLL export Pin
tiwal3-Jan-08 21:49
tiwal3-Jan-08 21:49 
GeneralHi David Pin
Hamid_RT3-Jan-08 6:09
Hamid_RT3-Jan-08 6:09 
GeneralRe: Hi David Pin
David Crow3-Jan-08 6:45
David Crow3-Jan-08 6:45 
GeneralRe: Help on DLL export Pin
Hamid_RT2-Jan-08 18:16
Hamid_RT2-Jan-08 18:16 
GeneralRe: Help on DLL export Pin
tiwal2-Jan-08 22:21
tiwal2-Jan-08 22:21 
GeneralFile map performance Pin
George_George2-Jan-08 5:03
George_George2-Jan-08 5:03 
GeneralRe: File map performance Pin
CPallini2-Jan-08 5:10
mveCPallini2-Jan-08 5:10 
GeneralRe: File map performance Pin
Matthew Faithfull2-Jan-08 5:16
Matthew Faithfull2-Jan-08 5:16 
GeneralSockets and multithreading - doubt Pin
Raj Prathap2-Jan-08 4:02
Raj Prathap2-Jan-08 4:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.