Because occasionallyProgram..
According to a previous file, most programs now use the createmutex method to limit the multi-open mode,
So I had an idea: it was created, and I release it. Then I can open it more?
However... I have failed some small program verification and online search.
The reason is: For a mutex, only the create process can release it. So it is impossible to use this method.
However, it is not without success. After this "failure" test, we have also increased our understanding of mutex. I also learned about the basic usage ~
Summary:
When createmutex and openmutex already exist, a copy of handle will be returned in the same result.
If the muxtex does not exist, openmutex returns 0 errors and can use getlasterror to get the error message.
Releasemutex can only be executed by the mutex creation process. Otherwise, an error is always returned.
When you use closehandle to release mutex, only the copy handle obtained by the current process is released, and the mutex kernel object is not deleted.
In addition, although a mutex cannot be release by another process, it can be performed in a special way. Such as remote injection, but after remote injection, it is more convenient to use the API Hook method to hook createmutex. In principle, this can be an "omnipotent" option. Wait for time to verify the implementation.