| 212 | } |
| 213 | |
| 214 | HANDLE CreateUniqueEvent() |
| 215 | { |
| 216 | static char szEventName[32]; // The name of the event, unique for this process |
| 217 | sprintf(szEventName, "BWAPI #%u", GetCurrentProcessId()); |
| 218 | |
| 219 | HANDLE hEvent = CreateEventA(NULL, FALSE, FALSE, szEventName); |
| 220 | if (GetLastError() == ERROR_ALREADY_EXISTS) // There is a BWAPI module already injected |
| 221 | hEvent = nullptr; |
| 222 | |
| 223 | return hEvent; |
| 224 | } |
| 225 | |
| 226 | void SetDebug() |
| 227 | { |