Click here to Skip to main content
15,912,072 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionview problem Pin
sheetal_065-Mar-07 22:24
sheetal_065-Mar-07 22:24 
AnswerRe: view problem Pin
Cedric Moonen5-Mar-07 22:30
Cedric Moonen5-Mar-07 22:30 
Questionhow to find the character width? Pin
kotakmayurrMCA5-Mar-07 22:23
kotakmayurrMCA5-Mar-07 22:23 
AnswerRe: how to find the character width? Pin
PJ Arends5-Mar-07 22:38
professionalPJ Arends5-Mar-07 22:38 
QuestionHow to set the caption text in the page of sheet? Pin
dungpapai5-Mar-07 22:22
dungpapai5-Mar-07 22:22 
AnswerRe: How to set the caption text in the page of sheet? Pin
Xing Chen5-Mar-07 22:31
Xing Chen5-Mar-07 22:31 
AnswerRe: How to set the caption text in the page of sheet? Pin
_AnsHUMAN_ 5-Mar-07 22:56
_AnsHUMAN_ 5-Mar-07 22:56 
QuestionCR+LF in RichEdit20 Pin
jsumm5-Mar-07 22:04
jsumm5-Mar-07 22:04 
Questiondelete printer Icon from system tray Pin
sajithomas5-Mar-07 21:54
sajithomas5-Mar-07 21:54 
AnswerRe: delete printer Icon from system tray Pin
Xing Chen5-Mar-07 22:22
Xing Chen5-Mar-07 22:22 
Question[Win32 C] how save HICON to a icon file? Pin
HOW WHAT5-Mar-07 21:41
HOW WHAT5-Mar-07 21:41 
AnswerRe: [Win32 C] how save HICON to a icon file? Pin
Programm3r5-Mar-07 21:53
Programm3r5-Mar-07 21:53 
AnswerRe: [Win32 C] how save HICON to a icon file? Pin
prasad_som5-Mar-07 21:53
prasad_som5-Mar-07 21:53 
GeneralRe: [Win32 C] how save HICON to a icon file? Pin
HOW WHAT5-Mar-07 22:14
HOW WHAT5-Mar-07 22:14 
GeneralRe: [Win32 C] how save HICON to a icon file? Pin
prasad_som5-Mar-07 22:25
prasad_som5-Mar-07 22:25 
QuestionHow to change "Caption" of Menu Item Dynamcally? Pin
cshivaprasad5-Mar-07 21:39
cshivaprasad5-Mar-07 21:39 
AnswerRe: How to change "Caption" of Menu Item Dynamcally? Pin
prasad_som5-Mar-07 22:07
prasad_som5-Mar-07 22:07 
QuestionDLL Header file content Pin
Programm3r5-Mar-07 21:34
Programm3r5-Mar-07 21:34 
AnswerRe: DLL Header file content Pin
Cedric Moonen5-Mar-07 21:53
Cedric Moonen5-Mar-07 21:53 
#ifdef STATIC_LIBRARY

This is probably a user defined macro (I don't think this is a standard macro). The user can specify if the library should be a static or a dynamic library.
If it is a static library, then you don't need to add specific keyword before your functions in order to be exported (so, DLL_IMPORT_EXPORT will simply be empty).

In the other, if it is a dynamic library, you need to:
1) export your functions if the project is the dll project (in that case, the macro DLL_SOURCE_CODE will be specified by the user)
2) import your functions if the project is using the dll (in that case, the macro DLL_SOURCE_CODE is not defined).

This is only used on the WIN32 platform (thus the #ifdef WIN32).

That summarize the first part, meaning:


Programm3r wrote:
#ifdef STATIC_LIBRARY
#define DLL_IMPORT_EXPORT
#else
#ifdef WIN32
#ifdef DLL_SOURCE_CODE
#define DLL_IMPORT_EXPORT __declspec(dllexport) __stdcall
#else
#define DLL_IMPORT_EXPORT __declspec(dllimport) __stdcall
#endif
#endif
#endif


For the second part (with the NoMangle), you check if the code is C++ specific or C. If it is C, this language use a different linking mechanism (name mangling) and you then need to specify that you are using the 'C' linking scheme (extern "C").

Hope that helps. If you still don't understand, ask a more precise question (which part you don't understand).




Cédric Moonen
Software developer

Charting control [v1.1]

GeneralRe: DLL Header file content Pin
Programm3r5-Mar-07 21:58
Programm3r5-Mar-07 21:58 
QuestionMedia Pin
Try5-Mar-07 21:33
Try5-Mar-07 21:33 
AnswerRe: Media Pin
kakan5-Mar-07 21:39
professionalkakan5-Mar-07 21:39 
GeneralRe: Media Pin
Try5-Mar-07 21:43
Try5-Mar-07 21:43 
GeneralRe: Media Pin
kakan5-Mar-07 22:09
professionalkakan5-Mar-07 22:09 
GeneralRe: Media [modified] Pin
Try5-Mar-07 22:39
Try5-Mar-07 22:39 

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.