BOOL LanchSystemSmsEditor (const TCHAR * SmsReceiver, const TCHAR * SmsContent,
TCHAR * SmsSubject)
{
TCHAR commandLine [MAX_PATH];
TCHAR
SzAppName [MAX_PATH];
Lstrcpy (szAppName, _ T ("tmail.exe "));
PROCESS_INFORMATION
ProcInfo;
If (! CreateProcess (szAppName, _ T ("-service \" Sms \""),
NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, & procInfo)
)
{
Return FALSE;
}
Swprintf (commandLine,
_ T ("mailto: % s? Body = % s & subject = % s "), SmsReceiver, SmsContent, SmsSubject );
If (! CreateProcess (szAppName, commandLine,
NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, & procInfo)
)
{
Return FALSE;
}
WaitForSingleObject (procInfo. hProcess,
INFINITE );
Return TRUE;
}
BOOL LanchSymtemEmailEditor (const
TCHAR * EmailAddress, const TCHAR * Subject, const TCHAR * EmailBody)
{
TCHAR commandLine [MAX_PATH];
TCHAR
SzAppName [MAX_PATH];
Lstrcpy (szAppName, _ T ("tmail.exe "));
PROCESS_INFORMATION procInfo;
If (! CreateProcess (szAppName, _ T ("-service
\ "ActiveSync \" "), NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL,
NULL, & procInfo ))
{
Return false;
}
Swprintf (commandLine, _ T ("mailto: % s? Subject = % s & body = % s "),
EmailAddress, Subject, EmailBody );
If (!
CreateProcess (szAppName, commandLine, NULL, NULL, FALSE, CREATE_NEW_CONSOLE,
NULL, & procInfo ))
{
Return false;
}
WaitForSingleObject (procInfo. hProcess, INFINITE );
Return
TRUE;
}
BOOL LanchSystemMMSEditor (const TCHAR * SmsReceiver, const
TCHAR * SmsContent, TCHAR * SmsSubject)
{
TCHAR
CommandLine [MAX_PATH];
TCHAR szAppName [MAX_PATH];
Lstrcpy (szAppName,
_ T ("tmail.exe "));
PROCESS_INFORMATION procInfo;
If (!
CreateProcess (szAppName, _ T ("-service \" MMS \ ""), NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, & procInfo ))
{
Return
FALSE;
}
Swprintf (commandLine,
_ T ("mailto: % s? Body = % s & subject = % s "), SmsReceiver, SmsContent, SmsSubject );
If (! CreateProcess (szAppName, commandLine,
NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, & procInfo)
)
{
Return FALSE;
}
WaitForSingleObject (procInfo. hProcess,
INFINITE );
Return TRUE;
}