> > BTW, you have considered prosen's suggestion for creating a scope
> > guard, haven't you?  It's a bright suggestion.
>
> It won't work in my situation as it stands - remember, it relies on
> the methods accessing the protected object being members of a class,
> and having a CCriticalSection as a member of that same class; one of
> the places I need to access the item is from within a worker thread
> proc, which is not part of any class (the first form of
> AfxBeginThread() as shown in MSDN). Thus, no member variables.

What makes you say so?  You can simply pass the CCriticalSection object
reference to the CLockWhileExists's ctor, couldn't you?

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

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

List Owner: [EMAIL PROTECTED]

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

"The brightest future will always be based on a forgotten past."





Reply via email to