The call to CreateMutex in Application::isAppAlreadyRunning() always fails.
This CreateMutex call is made with a name created as follows:
SmartUtil::tstring appPath = getModulePath() + getModuleFileName();
This name contains backslashes because of the directory paths.
CreateMutex will fail if there are backslashes in the name (see http://msdn2.microsoft.com/en-us/library/ms682411.aspx\).
This can be corrected by removing the backslashes in isAppAlreadyRunning before the CreateMutex call with:
// Replace all the backslash characters in the path.
SmartUtil::tstring::size_type p = 0;
while( (p = appPath.find(_T('\\'), p)) != SmartUtil::tstring::npos )
appPath[p] = _T('_');
After the backslashes are removed, the call to CreateMutex no longer fails.
Right you are. The fix is in CVS. Thanks.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.