Skip to content
⌘ NSIS Forum Archive

new CreateMutex plugin!

6 posts

billym#

new CreateMutex plugin!

This is my first plugin so please give me all the feedback you can.
Joost Verburg#
It's just the same as a single API call with the System plug-in like this:

System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e'

The only advantage could be that if you only need this System call it might save a KB or two.
Guest#
Was just playing around with this plugin and observed that the routine returns a different value if the "optional parameter" is explicitly "2" vs. letting it default to "2".

CreateMutex::nsCreateMutex "myMutex" "2"
returns "MUTEX_EXISTS"

CreateMutex::nsCreateMutex "myMutex"
returns "ALREADY_EXISTS"