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

C / C++ / MFC

 
GeneralA project made from XPCOM components and VC++6.0 (I desperately need for any ideas) Pin
cuesdean florin2-Jan-08 5:44
cuesdean florin2-Jan-08 5:44 
GeneralRe: A project made from XPCOM components and VC++6.0 (I desperately need for any ideas) Pin
led mike2-Jan-08 8:19
led mike2-Jan-08 8:19 
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 
tiwal wrote:
By the way , I adapted my (very simple) code to your example , but it didn't work either.
I mean, I included a header file with __declspec(dllimport) and extern "C" directives in the calling code, but the error code is always the same (127).


You haven't to do this. I haven't done it. You need to use the extern "C" block when you compile your DLL using C++, because you need to export C interface (the one recognized by GetProcAddress), see (again) MSDN http://msdn2.microsoft.com/en-us/library/ms682507.aspx[^].

tiwal wrote:
I shouldn't need to use a header file and a dllimport directive in my case, since I'm linking my dll explicitly, and as far as I know this is only needed when you do it implicitly (that is , with a .lib for the export of symbols).

The above is true. in fact I didn't use neither header file nor dllimport directive in my example.
tiwal wrote:
he fact instead, that GetProcAddress () couldn't be able to handle mangled names , is interesting : even if I really don't know how to work around it ....


Simply GetProcAddress is designed to handle the C programming interface (WIN32 is a C API, after all), moreover, AFAIK, there is no unique standard (among compiler productors) on function name mangling.
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
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 
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 

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.