Re: detect "changed" contacts using POOM
From: mazza (mazza_at_net)
Date: 08/13/04
- Next message: flourface: "How to make WCE application for MIPS with Embedded Visual tools 3."
- Previous message: Victor: "XMLDOM.loadXML and latest builds of Microsoft Mobile 2003"
- In reply to: Peter Foot [MVP]: "Re: detect "changed" contacts using POOM"
- Next in thread: mazza: "Re: detect "changed" contacts using POOM"
- Reply: mazza: "Re: detect "changed" contacts using POOM"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 13 Aug 2004 16:45:04 +0100
I am writing a code to read all messages using MAPI.
But I haven't understood MAPI yet.....
The maximum rows of QueryRows is 10 rows.
How can i read more than 10 messages ?
Sorry many questions..
Here is my code:
ULONG numberOfMessages;
lpTable->GetRowCount(0,&numberOfMessages); // The number of messages;
hRes = lpTable->SetColumns( (LPSPropTagArray)&sContents, 0 );
hRes = lpTable->QueryRows( numberOfMessages, 0, &pRows ); <-------
problem
lpTable->Release();
for(int k=0;k<numberOfMessages;k++){
hRes = pMsgStore->OpenEntry( pRows->aRow[k].lpProps[0].Value.bin.cb,
(LPENTRYID)pRows->aRow[k].lpProps[0].Value.bin.lpb, NULL, 0, &ulObjType,
(LPUNKNOWN FAR *)&lpMessage);
SizedSPropTagArray(1,rgTags_SENDER) = {1,PR_SENDER_NAME};
hRes = lpMessage->GetProps((LPSPropTagArray) &rgTags_SENDER, MAPI_UNICODE,
&pcount, &rgprops);
senderID=space->textTostr(rgprops->Value.lpszW);
SizedSPropTagArray(1,rgTags_SUBJECT) = {1,PR_SUBJECT};
hRes = lpMessage->GetProps((LPSPropTagArray) &rgTags_SUBJECT,
MAPI_UNICODE, &pcount, &rgprops);
subject=space->textTostr(rgprops->Value.lpszW);
add(new SmsMessage( ... ));
}
"Peter Foot [MVP]" <feedback@nospam-inthehand.com> wrote in message
news:%23P7sBUjfEHA.2896@TK2MSFTNGP11.phx.gbl...
> You are passing 0 as the last parameter into CeOpenDatabaseEx2 - this
needs
> to be a pointer to a CENOTIFYREQUEST structure which contains the window
> handle which is to receive notifications.
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> www.inthehand.com
>
> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> Embedded newsgroups? Let us know!
> https://www.windowsembeddedeval.com/community/newsgroups
>
> "mazza" <mazza@net> wrote in message
> news:%23%23abUeifEHA.2028@tk2msftngp13.phx.gbl...
> >I would like to detect when a contact is deleted or added.
> > When a contact is deleted or added, WM_DBNOTIFICATION happens , doesn't
> > it?
> > But I can't catch any event.
> >
> > Any idea?
> >
> > Here is my code:
> > CEOID ceDB;
> > CEDBASEINFO ceDBInfo;
> > HANDLE g_hDbContacts = INVALID_HANDLE_VALUE;
> > g_guidDB = (PCEGUID) LocalAlloc (LPTR, sizeof (CEGUID));
> > CREATE_INVALIDGUID(g_guidDB);
> >
> > g_hDbContacts = CeOpenDatabaseEx2(g_guidDB, &ceDB, _T("Contacts
> > Database"),
> > 0,CEDB_AUTOINCREMENT, 0);
> >
> > LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
> > lParam)
> > {
> >
> > ...
> >
> > switch (message)
> > {
> > case WM_DBNOTIFICATION:
> >
> > case DB_CEOID_CREATED:
> >
> > case DB_CEOID_DATABASE_DELETED:
> >
> > }
> > }
> >
> > Thanks,
> >
> >
>
>
- Next message: flourface: "How to make WCE application for MIPS with Embedded Visual tools 3."
- Previous message: Victor: "XMLDOM.loadXML and latest builds of Microsoft Mobile 2003"
- In reply to: Peter Foot [MVP]: "Re: detect "changed" contacts using POOM"
- Next in thread: mazza: "Re: detect "changed" contacts using POOM"
- Reply: mazza: "Re: detect "changed" contacts using POOM"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|