//---------------------------------------------------------------------------
// =====================
// Cancel Message Hunter
// =====================
//
// by JTHZ
// using Borland C++Builder 5 PRO
// April 10, 2000
//---------------------------------------------------------------------------

#include "Global.h"
#pragma hdrstop

//---------------------------------------------------------------------------

USERES("CancelHunt.res");
USEFORM("CancelHuntUnit.cpp", HuntForm);

//---------------------------------------------------------------------------

WINAPI WinMain(HINSTANCE, HINSTANCE, PSTR, int){

  // single instance only
  HANDLE MutexHandle = CreateMutex(
    NULL,
    TRUE,
    "{A8061420-0E20-11D4-8F85-8B6D85EBDD62}"
  );
  if(GetLastError() == ERROR_ALREADY_EXISTS){
    if(MutexHandle)
      CloseHandle(MutexHandle);
    return 0;
  }

  try{
    Application->Initialize();
    Application->Title = "Idiot Hens' Cancel Hunter";
     Application->CreateForm(__classid(THuntForm), &HuntForm);
    Application->Run();
  }
  catch(Exception &exception){
    Application->ShowException(&exception);
  }

  ReleaseMutex(MutexHandle);
  CloseHandle(MutexHandle);

  return 0;

}

//---------------------------------------------------------------------------

