// Resources.h : Resource management and related classes.
// Default to the high-order WORD set, which on Win2K
// pre-allocates the critical section. Default spin
// count to 1024.
// Pre-allocate a new critical section, using the spin
// count to wait until the critical section can be created.
CCriticalSection(DWORD dwSpinCount) :
if (!InitializeCriticalSectionAndSpinCount(&m_cs, dwSpinCount))
// Delete the critical section.
// It is the caller's responsibility to call
// unlock enough times from the owning thread
// before this object is destroyed.
// Lock the critical section in the calling thread. This
// will block if it is owned by one thread and attempting
// to be locked by others.
void Lock() throw()
// Unlock the critical section by the owning calling thread.
// Unlock should be called an equal number of times as Lock.
// See get_LockCount to determine how many times to unlock.
void Unlock() throw()
// Don't unlock more times than we've locked.
// Gets the net number of times Lock and Unlock were called.
// TODO: Finish System.Resources.ResourceManager-like implementation.
LANGID GetCurrentUILanguage() throw();
UINT LoadString(UINT uID, LPTSTR pszBuffer, UINT cchBuffer);
std::map<LCID, HINSTANCE> m_ResourceInstances;
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)