Click here to Skip to main content
16,004,991 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: timers in a console app Pin
eusto9-Oct-06 10:34
eusto9-Oct-06 10:34 
AnswerRe: timers in a console app Pin
Zac Howland9-Oct-06 10:35
Zac Howland9-Oct-06 10:35 
GeneralRe: timers in a console app Pin
led mike9-Oct-06 11:36
led mike9-Oct-06 11:36 
GeneralRe: timers in a console app Pin
Zac Howland10-Oct-06 4:37
Zac Howland10-Oct-06 4:37 
AnswerRe: timers in a console app Pin
Stephen Hewitt9-Oct-06 13:38
Stephen Hewitt9-Oct-06 13:38 
QuestionOpenCV image displaying problem Pin
nalintharanga9-Oct-06 6:28
nalintharanga9-Oct-06 6:28 
AnswerRe: OpenCV image displaying problem Pin
Christian Graus9-Oct-06 10:01
protectorChristian Graus9-Oct-06 10:01 
QuestionGetProcAddress and extern "C" Pin
Sydes9-Oct-06 6:26
Sydes9-Oct-06 6:26 
Scenario:

I have an application that loads a bunch of DLL's. The DLL's share the same header file which describes their exportable functions and therefore behave like plug-ins. I use GetProcAddress to get each DLL/plugin function pointer. My application and the DLL's are written in C++ as I want the DLL's to throw exceptions on error and the main application to catch.

Problem:

My problem is when using extern "C" __declspec(dllexport) in the DLL header as this doesn't allow exceptions being a "C"-style function. If I remove the extern "C" from the DLL function prototypes, the exceptions compile but GetProcAddress fails on every single call at runtime.

How can I get to use GetProcAddress in a non extern "C" function so I can use exception handling across DLLs?
AnswerRe: GetProcAddress and extern "C" Pin
Phil J Pearson9-Oct-06 7:07
Phil J Pearson9-Oct-06 7:07 
AnswerRe: GetProcAddress and extern "C" Pin
Michael Dunn9-Oct-06 7:08
sitebuilderMichael Dunn9-Oct-06 7:08 
AnswerRe: GetProcAddress and extern "C" Pin
James R. Twine9-Oct-06 7:14
James R. Twine9-Oct-06 7:14 
GeneralRe: GetProcAddress and extern "C" Pin
Blake Miller13-Oct-06 4:43
Blake Miller13-Oct-06 4:43 
GeneralRe: GetProcAddress and extern "C" Pin
Sydes9-Oct-06 22:47
Sydes9-Oct-06 22:47 
QuestionNetwork communication!! Pin
ant_eng_m9-Oct-06 6:21
ant_eng_m9-Oct-06 6:21 
AnswerRe: Network communication!! Pin
Zac Howland9-Oct-06 6:50
Zac Howland9-Oct-06 6:50 
AnswerRe: Network communication!! Pin
Hamid_RT9-Oct-06 6:50
Hamid_RT9-Oct-06 6:50 
QuestionCBrush class Pin
LCI9-Oct-06 6:06
LCI9-Oct-06 6:06 
AnswerRe: CBrush class Pin
Hamid_RT9-Oct-06 6:33
Hamid_RT9-Oct-06 6:33 
GeneralRe: CBrush class Pin
LCI9-Oct-06 6:43
LCI9-Oct-06 6:43 
GeneralRe: CBrush class Pin
Hamid_RT9-Oct-06 6:54
Hamid_RT9-Oct-06 6:54 
GeneralRe: CBrush class Pin
LCI9-Oct-06 7:11
LCI9-Oct-06 7:11 
GeneralRe: CBrush class Pin
Hamid_RT9-Oct-06 7:35
Hamid_RT9-Oct-06 7:35 
GeneralRe: CBrush class Pin
Michael Dunn9-Oct-06 7:11
sitebuilderMichael Dunn9-Oct-06 7:11 
QuestionProcess afinity Pin
bouli9-Oct-06 5:44
bouli9-Oct-06 5:44 
AnswerRe: Process afinity Pin
James R. Twine9-Oct-06 7:18
James R. Twine9-Oct-06 7:18 

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.