|
-
June 30th, 1999, 09:40 AM
#2
Re: NT - checking if another instance of a program is running
you can try something like this in InitInstance() :
m_mutex = CreateMutex( NULL, TRUE, _T("MyApp"));
if( GetLastError() == ERROR_ALREADY_EXISTS) {
::MessageBox( NULL, _T("An instance is already running."),
_T("ERROR!"), MB_OK | MB_ICONEXCLAMATION );
return TRUE;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|