[Mutex参照链接(http://blog.csdn.net/chexlong/article/details/7051193)
class Mutex
{
public:
Mutex()
{
_mutex = CreateMutex(NULL, FALSE, NULL);
}
~Mutex()
{
CloseHandle(_mutex);
}
void lock()const
{
DWORD d = WaitForSingleObject