(1) 在debug模式下ShowWind2Top("Start.exe")返回true:
bool ShowWind2Top(LPCTSTR lpszProcessName)
{
if(lpszProcessName=="Start.exe")
return true;
//do other thing
}
(2)但是在release模式下,返回false,需要改为如下,才会返回true.
bool ShowWind2Top(LPCTSTR lpszProcessName)
{
CString strName=lpszProcessName;
if(strName=="Start.exe")
return true;
//do other thing
}