> -----Original Message-----
> From: BeginThread.com MSVC List [mailto:[EMAIL PROTECTED]]On Behalf
> Of Neil Devlin
> Sent: 06 May 2003 15:08
> To: [EMAIL PROTECTED]
> Subject: [msvc] Best way of accessing functions..
>
>
> Hi,
> I have a global class that gets used with events from iexplorer, which
> works fine. But I have one of the functions called within the same global
> class during the OnTimer(..) which resets some of the variables.
> What is the
> best way of making sure that the variables are not getting modified by the
> two parts of the application? I tried using CCriticalSection, but didnt
> work, then realised it protects the sections from different threads.
>
> Anyone any ideas the best way of doing this?
A static flag (within the function) saying whether you're already in it or
not, preventing re-entry?
--
Jason Teagle
[EMAIL PROTECTED]
