I have two exe’s one in C# and other is a vc++ exe . Both of these exe need to access a file.
So I am planning to create a named mutex in c#. vc++ how can i access this named mutex. Can any one give me sample codes for this
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Something like this in the C++ code:
If you need to know if the mutex already existed, check for
hMutex != null && GetLastError() == ERROR_ALREADY_EXISTS.The default ACL you get should be OK for cases with both processes in the same session, otherwise you will need to set an appropriate ACL.