RE: Modified jhProtominer Source Code 06-30-2014, 12:24 AM
#5
(06-10-2014, 10:05 AM)xornull Wrote: May I ask why there is no part of the code that prevents it from executing itself multiple times?
all it takes is this
Code:void check_already_running(wchar_t *cMutexName, HANDLE *hMutex) { *hMutex = CreateMutexW(NULL, true, cMutexName); if(ERROR_ALREADY_EXISTS == GetLastError()) ExitProcess(NULL); }
ExitProcess takes a UINT as a parameter, not a pointer type -- NULL.
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)