> I couldn't find the constructor implementation - only its
> declaration... can you see if you can find it? And say which file?

It's in atlsync.inl for VC7.1.  I just searched for
"CCriticalSection::CCriticalSection" to find it, BTW.

> But it would not have worked anyway, for the indeterminate global
> initialisation problem.

Yup.

> I will look, but the reason I specifically said no ATL is because I
> don't like mixing in template syntax into a project, and what you
> suggested requires similar syntax (it's a shame that using the
> standard library forces one to use that syntax - I would have hoped
> that anything that tried to claim it was part of the core of C++ would
> stick to normal classes)

You seem to have big problems with C++ templates' syntax.  Is there anything
you'd like us to explain about them, which makes you particularly
uncomfortable with them?

> >   CCriticalSection & global_cs()
> >   {
> >    static CCriticalSection cs;
> >    return cs;
> >   }
>
> Hmmm... the structure it was in WAS static... but it still seemed to
> fail at Lock().

Please take a look at the code again: it's a function having a local static
variable.  This way, the variable gets constructed the first time the
function is entered.  This is different with a static member of a
*structure*, which gets constructed at program's startup.

-------------
Ehsan Akhgari

Farda Technology (http://www.farda-tech.com/)

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]

An instrument of your body is also your small wisdom, my brother, which you
call "mind"- a little instrument and toy of your great wisdom.
-Thus Spoke Zarathustra, F. W. Nietzsche





Reply via email to