Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Apr : Is this ok to do?

www.cryer.info
Managed Newsgroup Archive

Is this ok to do?

Subject:Is this ok to do?
Posted by:"Craig Hammon" (firebirdwebg..@hotmail.com)
Date:Sat, 26 Apr 2008 12:19:40 -0600

Im assuming this is ok to do? I have a situation where I need to protect the
DB resource  and Screen vars at the same time.. Only once in a blue moon..


EnterCriticalSection(GlobalVars_CS);
EnterCriticalSection(DB_CS);
Try


Finally
   LeaveCriticalSection(GlobalVars_CS);
   LeaveCriticalSection(DB_CS);
End;

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive