13 lines
306 B
Text
13 lines
306 B
Text
REM Create mutex:
|
|
SYS "CreateMutex", 0, 0, 0 TO hMutex%
|
|
|
|
REM Wait to acquire mutex:
|
|
REPEAT
|
|
SYS "WaitForSingleObject", hMutex%, 1 TO res%
|
|
UNTIL res% = 0
|
|
|
|
REM Release mutex:
|
|
SYS "ReleaseMutex", hMutex%
|
|
|
|
REM Free mutex:
|
|
SYS "CloseHandle", hMutex%
|