Determine if only one instance is running: Difference between revisions

no edit summary
m (→‎{{header|Perl 6}}: fix file open error handling)
No edit summary
Line 700:
calldll #kernel32, "CloseHandle", mutex as ulong, ret as ulong
end</lang>
 
=={{header|M2000 Interpreter}}==
We can lock a file in user folder. Only one instance can lock a file.
 
<lang M2000 Interpreter>
Module Checkit {
Try {
Open "MYLOCK" For Output Exclusive As #F
Print "DO SOMETHING"
A$=Key$
Close#f
}
}
</lang>
 
 
=={{header|Mathematica}} / {{header|Wolfram Language}}==
Anonymous user