m_hMutex = OpenMutex( MUTEX_ALL_ACCESS, FALSE, strClassName);
if(m_hMutex == NULL)
{
m_hMutex = CreateMutex(NULL, TRUE, strClassName);
}
else
{
AfxMessageBox( "FTPServer already running! ", MB_ICONEXCLAMATION );
::PostMessage( this->m_hWnd, WM_CLOSE, 0, 0 );
return FALSE;
}
if(m_hMutex == NULL)
{
m_hMutex = CreateMutex(NULL, TRUE, strClassName);
}
else
{
AfxMessageBox( "FTPServer already running! ", MB_ICONEXCLAMATION );
::PostMessage( this->m_hWnd, WM_CLOSE, 0, 0 );
return FALSE;
}