Re: Critical section shared betwen dll and main program
- From: "Volodymyr Shcherbyna" <v_scherbina@xxxxxxxxxxxxxxx>
- Date: Mon, 7 Jan 2008 16:10:39 +0100
Actually, I would not suggest to pass pointer to any structure between
different components like EXE and DLL.
Because there is a theoretical chance of incompatible ABE (Application
Binary Environment) bug. Even taking into account, that CRITICAL_SECTION was
not changed since 9x, there always exists a possibility that it might
change, and the code will have a very hidden and weird bug, when DLL uses
old version of CRITICAL_SECTION and passes a pointer to it which is used in
EXE, which was compiled in a newer environment, with another
CRITICAL_SECTION. This of course is a weird situation, but one should keep
in mind such kind of possibility.
--
VolodymyrNG tips:
http://msmvps.com/blogs/v_scherbina/pages/microsoft-newsgroups-tips.aspx
"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message
news:uSXppnyTIHA.5264@xxxxxxxxxxxxxxxxxxxxxxx
"Mandi" <mandi@xxxxxxxxxxxx> wrote in message
news:%23nauFfyTIHA.4476@xxxxxxxxxxxxxxxxxxxxxxx
I use critical section in my dll. Now I want to refer to it in my Main
executable?
Is there a way to do it?
There is no problem with passing its address between exe and DLL.
--
Scott McPhillips [VC++ MVP]
.
- Follow-Ups:
- Re: Critical section shared betwen dll and main program
- From: Ben Voigt [C++ MVP]
- Re: Critical section shared betwen dll and main program
- References:
- Critical section shared betwen dll and main program
- From: Mandi
- Re: Critical section shared betwen dll and main program
- From: Scott McPhillips [MVP]
- Critical section shared betwen dll and main program
- Prev by Date: Re: memory leak in the code?
- Next by Date: Re: FindFirstFileExW and MAX_PATH
- Previous by thread: Re: Critical section shared betwen dll and main program
- Next by thread: Re: Critical section shared betwen dll and main program
- Index(es):
Relevant Pages
|