|Yes you may contruct the
MFC object anyway, but you HAVE to call
GetLastError (as Albert Holguin already noted) to see what really happened.
Is by chance your
Jun Du wrote: I don't know how CMutex behaves exactly, as we don't have its source.
Visual Studio installation broken? Do you know
MFC comes with source code, don't you?
As you are using
MFC synchronization objects the following Newcomer's article is a worthy reading: "Avoid CMutex, CEvent, CSemaphore and CCrticalSection"[^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke