Windows Mobile上怎么调出发短信(彩信,邮件)的界面

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, NULL, 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, NULL, 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, NULL, 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, NULL, 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, NULL, NULL, &procInfo) )
   {
            return FALSE;
   }
   WaitForSingleObject(procInfo.hProcess, INFINITE);

   return TRUE;
}

 

 

你可能感兴趣的:(Windows Mobile)