how to use NtCreateMutant(Zw) to create a mutex in C++
- by Simon
Hey i want to create a mutex with the kernel function NtCreateMutant.
I did it like this:
Handle hMutex;
NTSTATUS ntMutex = NtOpenMutant(&hMutex,MUTEX_ALL_ACCESS,false);
the NTSTATUS value that is returned: C0000024 STATUS_OBJECT_TYPE_MISMATCH
hope someone can help me with calling NtOpenMutant the right way.
With the windows API OpenMutex(..) its working just fine..
HANDLE hMutex;
hMutex = OpenMutex(MUTEX_ALL_ACCESS, FALSE, "Name");
Hope someone can explain me how to use the nativ function :)