Exemplo n.º 1
0
bool FarsiteEvent::AllocEvents(long numevents, char *basename, bool ManReset, bool InitState)
{
     if(numevents==NumEvents)
     	return true;

	FreeEvents();

     bool NoErr=true;
     long i;
     char Name[128]="";

     hEvent=new HANDLE[numevents];
	if(hEvent==NULL)
     	return false;

     for(i=0; i<numevents; i++)
     {    sprintf(Name, "%s_%02ld", basename, i+1);

     	hEvent[i]=CreateEvent(NULL, ManReset, InitState, reinterpret_cast<LPCSTR>(Name));
          if(hEvent[i]==NULL)
          {	NoErr=true;
               break;
          }
          NumEvents++;
     }


     return NoErr;
}
Exemplo n.º 2
0
CHandler::~CHandler()
{
    FreeEvents(); // Free m_pConnection
	m_pAddin->Release();
}
Exemplo n.º 3
0
FarsiteEvent::~FarsiteEvent()
{
	FreeEvents();
}