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 :)
so the exactly thing i do is this just with native functions:
HANDLE hMutex;
hMutex = OpenMutex(MUTEX_ALL_ACCESS, FALSE, "NameOfMyMutex");
if(hMutex == NULL)
{
hMutex = CreateMutex(NULL, FALSE, "NameOfMyMutex");
}
else
{
return FALSE;
}