You need two SEPARATE objects. The first object constructor initializes the critical section, and its destructor deletes the critical section. It has a member function Lock() and Unlock() The second class, its constructor Enters the critical section of first object, by calling its Lock function. The destructor of this class calls the Unlock() of the first class. That way, you don't have to worry about calling Unlock() explicitly from your code. You also don't have to use a 'global' class from your common code, you use instances of the second class. If you don't want to block out the entire scope of a function, then use the local scoping operators around the second class and the code like so { SecondClass MyLocker; ... code } and it will release when closing brace is met. This is also handy when there is an exception, your critical section is not permanently locked and lost by the unwinding of the exception.
Any sufficiently gross incompetence is nearly indistinguishable from malice.