方法1 tmail -service "MMS" -to "" -body ""
方法2 附加到进程
static void LaunchInboxApp(void)
{
//#include <Toolhelp.h>
HANDLE handle=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
PROCESSENTRY32 info;
info.dwSize=sizeof(info);
int i=0;
if(Process32First(handle,&info))
{
if(_tcscmp(info.szExeFile,TEXT("tmail.exe"))==0 )
{
HANDLE handle2=OpenProcess(0,FALSE,info.th32ProcessID);
TerminateProcess(handle2,0);
}
else
{
while (Process32Next(handle,&info)!=FALSE)
{
if(_tcscmp(info.szExeFile,TEXT("tmail.exe"))==0 )
{
HANDLE handle2=OpenProcess(0,FALSE,info.th32ProcessID);
TerminateProcess(handle2,0);
break;
}
}
}
}
CloseToolhelp32Snapshot(handle);
SHELLEXECUTEINFO si ;
ZeroMemory( &si, sizeof(si) ) ;
si.cbSize = sizeof(SHELLEXECUTEINFO) ;
si.lpFile = L"\\windows\\tmail.exe" ;
si.lpParameters = L"-NoUI";
ShellExecuteEx( &si ) ;
}