2010-05-19 4 views
2

누군가 Windows Mobile 장치 6에서 messagestore를 읽는 방법을 예제로 게시 할 수 있습니까? 나는 "InTheHand"로 이런 짓을 :C# Windows 모바일 장치에서 메시지 저장소를 읽는 방법 6

foreach (InTheHand.WindowsMobile.PocketOutlook.SmsMessage mess in sess.SmsAccount.SentItems) 
       { 
        if (mess.Received.Year == thisYear && mess.Received.Month == thisMonth) 
        { 
         smsThisMonth++; 
        } 
       } 

문제는, 난 단지 InTheHand의 평가 버전이 있는지 확인하십시오. 가능한 경우 OpenNetCF 또는 mapidotnet을 사용하여이 작업을 수행하고 싶습니다. 하지만 OpenNetCF로이 작업을 수행하는 방법을 알지 못했고 mapitdotnet을 sourceforge 사이트 (http://sourceforge.net/projects/mapidotnet/)에서 더 이상 사용할 수 없습니다. svn 디렉토리에서만 찾았지만 dll은 없습니다.

답변

1

OpenNETCF 라이브러리는이 기능을 제공하지 않습니다. 사용 가능한 솔루션 (InTheHand의 라이브러리)과 I don't like reinventing the wheel if there's a perfectly good one already available이 이미 있으므로 구현하기가 쉽지 않습니다.

가격이 너무 가파르다면 언제든지 this MSDN article on COM Interop in the CF을보고 online tutorials on MAPIthe MAPI documentation 중 일부와 연결할 수 있습니다.

The MAPIDotNet project is probably worth investigation too. 바이너리가 없다고 말하지만 그게 무슨 상관 이죠? 컴파일러가 있습니다.

MAPI는 C++에서도 복잡하고 혼란 스럽습니다. 경험에 비추어 볼 때 C# (InTheHand가 제품을 사용하기 전에 1.0 일 전에 다시 작업 했음) 작업이 적어도 일주일이 걸렸으며 COM 및 C++ 작업 방법을 알고 있다면 말할 수 있습니다.

1

좋아, 나는 mapidotnet으로이 작업을 수행하는 방법, 알아 냈 :

MAPI mapi = new MAPI(); 
IMAPIMsgStore[] stores = mapi.MessageStores; 

     for (int i = 0; i < stores.Length; i++) 
     { 
      if (stores[i].DisplayName == @"SMS") 
      { 
       IMAPIFolder smsSentFolder = stores[i].SentMailFolder.OpenFolder(); 
       smsSentFolder.SortMessagesByDeliveryTime(TableSortOrder.TABLE_SORT_DESCEND); 
       IMAPIMessage[] messages = smsSentFolder.GetNextMessages(999); 
       for (int n = 0; n < messages.Length; n++) 
       { 
        if (messages[n].LocalDeliveryTime.Month == monat && messages[n].LocalDeliveryTime.Year == jahr) 
        { 
         smsDiesenMonat++; 
        } 
       } 
      } 

실제로 프로젝트를 컴파일,하지만 난 내 프로젝트에 Mapilib.dll을 추가 할 수 있다는 이상한 오류가 발생했습니다. 하지만 이제는 제대로 작동합니다.

관련 문제