Re: share data between dll's
- From: "Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx>
- Date: Wed, 29 Aug 2007 14:13:37 -0500
"tasleem" <tasleem@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9FC714D6-6BB8-4E54-BBC0-D1FAE04AE8FB@xxxxxxxxxxxxxxxx
hi -->thanks for reply
2dll project name is awWebBubbleSDK so i m using this in class header file
"DragHelper.h"
#if awWebBubbleSDK
#define SHARED_STUFF __declspec(dllexport) extern "C" bool
m_bStartWatchThread=false;
#define SHARED_STUFF __declspec(dllexport) extern "C" int intvar=23;
#else
#define SHARED_STUFF __declspec(dllimport) extern "C" bool
m_bStartWatchThread=false;
#define SHARED_STUFF __declspec(dllimport) extern "C" int intvar=23;
#endif
Like this:
#if awWebBubbleSDK
#define SHARED_STUFF __declspec(dllexport) extern "C"
#else
#define SHARED_STUFF __declspec(dllimport) extern "C"
#endif
SHARED_STUFF bool g_bStartWatchThread;
SHARED_STUFF int g_intvar;
Then put your initializations only in one source file (not header file) in
the dll doing the export:
bool g_bStartWatchThread = false;
int g_intvar=23;
.
- References:
- Re: share data between dll's
- From: Igor Tandetnik
- Re: share data between dll's
- From: Ben Voigt [C++ MVP]
- Re: share data between dll's
- From: tasleem
- Re: share data between dll's
- Prev by Date: Re: How to identify at runtime which C/C++ runtime library linked in?
- Next by Date: Re: Share .cpp and .h along projects
- Previous by thread: Re: share data between dll's
- Next by thread: EM_SETCHARFORMAT breaks the Undo queue in ReciEdit 2
- Index(es):
Relevant Pages
|
Loading