ITAMutex.cpp 290 Bytes
Newer Older
Jonas Stienen's avatar
Jonas Stienen committed
1 2 3 4
#include "ITAMutex.h"

#include "ITAException.h"

5 6 7 8
ITAMutex::ITAMutex()
{
	if( FAILED( hMutex = CreateMutex( NULL, FALSE, NULL ) ) )
		ITA_EXCEPT1( UNKNOWN, "Mutex konnte nicht erzeugt werden" );
Jonas Stienen's avatar
Jonas Stienen committed
9 10
}

11 12 13 14
ITAMutex::~ITAMutex()
{
	WaitForSingleObject( hMutex, INFINITE );
	CloseHandle( hMutex );
Jonas Stienen's avatar
Jonas Stienen committed
15
}