|
|
|
date: Wed, 30 Jan 2008 12:08:43 +0100,
group: microsoft.public.platformsdk.mapi
back
PR_ENTRYID difference.
From a MAPI application, when I try to get entry ID of a contact, I do not
always get the same key ans same creation date.
pMessageStore->OpenEntry(EntryContact.cb,
(LPENTRYID) EntryContact.lpb,
NULL,
MAPI_BEST_ACCESS,
&ulType,
(LPUNKNOWN*)&pContact);
and
static SizedSPropTagArray(3,sptEntry) = {3,
PR_ENTRYID,
PR_MESSAGE_CLASS,
PR_CREATION_TIME
};
hr = pContact->GetProps((LPSPropTagArray) &sptEntry, 0L, &nbEntryProp,
&lpEntryProp );
For instance, on the same contact, some time the entryID last digits and
creation date are
00000030505F0000 and 20050115072647737Z
or
0000003050600000 and 20050115072647753Z
Byte 3 from entry ID end and millisecond fraction from creation date are not
the same.
Where does it come from, and how can I safely get rid of it ?
Thanks.
date: Wed, 30 Jan 2008 12:08:43 +0100
author: Francois francois@corebridgecom
Re: PR_ENTRYID difference.
Does the old entry id still work? If no, the contact was recreated. If yes,
you shoudl never compare teh entry ids; that is what
IMAPISEssion::CompareEntryIDs is for.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Francois" <francois@corebridgecom> wrote in message
news:ervOgBzYIHA.4272@TK2MSFTNGP05.phx.gbl...
> From a MAPI application, when I try to get entry ID of a contact, I do not
> always get the same key ans same creation date.
>
> pMessageStore->OpenEntry(EntryContact.cb,
> (LPENTRYID) EntryContact.lpb,
> NULL,
> MAPI_BEST_ACCESS,
> &ulType,
> (LPUNKNOWN*)&pContact);
>
> and
>
> static SizedSPropTagArray(3,sptEntry) = {3,
> PR_ENTRYID,
> PR_MESSAGE_CLASS,
> PR_CREATION_TIME
> };
>
> hr = pContact->GetProps((LPSPropTagArray) &sptEntry, 0L, &nbEntryProp,
> &lpEntryProp );
>
>
>
> For instance, on the same contact, some time the entryID last digits and
> creation date are
> 00000030505F0000 and 20050115072647737Z
> or
> 0000003050600000 and 20050115072647753Z
>
>
> Byte 3 from entry ID end and millisecond fraction from creation date are
> not the same.
>
>
> Where does it come from, and how can I safely get rid of it ?
>
>
> Thanks.
>
date: Wed, 30 Jan 2008 13:33:09 -0700
author: Dmitry Streblechenko
Re: PR_ENTRYID difference.
Thanks.
Seems in my case that both ID are valid.
So you mean Exchange can give different ID and different date for the same
record ?
At least a bit strange.
François.
"Dmitry Streblechenko" a écrit dans le message de news:
%23rKfn83YIHA.1168@TK2MSFTNGP02.phx.gbl...
> Does the old entry id still work? If no, the contact was recreated. If
> yes, you shoudl never compare teh entry ids; that is what
> IMAPISEssion::CompareEntryIDs is for.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Francois" <francois@corebridgecom> wrote in message
> news:ervOgBzYIHA.4272@TK2MSFTNGP05.phx.gbl...
>> From a MAPI application, when I try to get entry ID of a contact, I do
>> not always get the same key ans same creation date.
>>
>> pMessageStore->OpenEntry(EntryContact.cb,
>> (LPENTRYID) EntryContact.lpb,
>> NULL,
>> MAPI_BEST_ACCESS,
>> &ulType,
>> (LPUNKNOWN*)&pContact);
>>
>> and
>>
>> static SizedSPropTagArray(3,sptEntry) = {3,
>> PR_ENTRYID,
>> PR_MESSAGE_CLASS,
>> PR_CREATION_TIME
>> };
>>
>> hr = pContact->GetProps((LPSPropTagArray) &sptEntry, 0L, &nbEntryProp,
>> &lpEntryProp );
>>
>>
>>
>> For instance, on the same contact, some time the entryID last digits and
>> creation date are
>> 00000030505F0000 and 20050115072647737Z
>> or
>> 0000003050600000 and 20050115072647753Z
>>
>>
>> Byte 3 from entry ID end and millisecond fraction from creation date are
>> not the same.
>>
>>
>> Where does it come from, and how can I safely get rid of it ?
>>
>>
>> Thanks.
>>
>
>
date: Fri, 1 Feb 2008 15:36:23 +0100
author: Francois francois@corebridgecom
Re: PR_ENTRYID difference.
Yes, the entry ids can be different - short term and long term. Even for the
long term entry ids, they can be different based on whether you are
accessing a message through the primary mailbox, delegate, etc.
Again, MAPI specs explicitly state that you cannot binary compare two entry
ids, you must use IMAPISEssion::CompareEntryIDs.
In case of Exchange (online), you can use PR_SOURCE_KEY (which does stay the
same) and can be directly compared. Given a source key, you can construct an
entry id (to be used in OpenEntry) using
IExchangeManageStore::EntryIDFromSourceKey().
AS for the date properties, I am not sure what you mean - if a message is
modified, the properties can change, even if the entry id stays teh same.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Francois" <francois@corebridgecom> wrote in message
news:OC6aw%23NZIHA.5612@TK2MSFTNGP06.phx.gbl...
> Thanks.
>
> Seems in my case that both ID are valid.
> So you mean Exchange can give different ID and different date for the same
> record ?
> At least a bit strange.
>
> François.
>
> "Dmitry Streblechenko" a écrit dans le message de
> news: %23rKfn83YIHA.1168@TK2MSFTNGP02.phx.gbl...
>> Does the old entry id still work? If no, the contact was recreated. If
>> yes, you shoudl never compare teh entry ids; that is what
>> IMAPISEssion::CompareEntryIDs is for.
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Francois" <francois@corebridgecom> wrote in message
>> news:ervOgBzYIHA.4272@TK2MSFTNGP05.phx.gbl...
>>> From a MAPI application, when I try to get entry ID of a contact, I do
>>> not always get the same key ans same creation date.
>>>
>>> pMessageStore->OpenEntry(EntryContact.cb,
>>> (LPENTRYID) EntryContact.lpb,
>>> NULL,
>>> MAPI_BEST_ACCESS,
>>> &ulType,
>>> (LPUNKNOWN*)&pContact);
>>>
>>> and
>>>
>>> static SizedSPropTagArray(3,sptEntry) = {3,
>>> PR_ENTRYID,
>>> PR_MESSAGE_CLASS,
>>> PR_CREATION_TIME
>>> };
>>>
>>> hr = pContact->GetProps((LPSPropTagArray) &sptEntry, 0L, &nbEntryProp,
>>> &lpEntryProp );
>>>
>>>
>>>
>>> For instance, on the same contact, some time the entryID last digits and
>>> creation date are
>>> 00000030505F0000 and 20050115072647737Z
>>> or
>>> 0000003050600000 and 20050115072647753Z
>>>
>>>
>>> Byte 3 from entry ID end and millisecond fraction from creation date are
>>> not the same.
>>>
>>>
>>> Where does it come from, and how can I safely get rid of it ?
>>>
>>>
>>> Thanks.
>>>
>>
>>
>
>
date: Fri, 1 Feb 2008 23:54:22 -0700
author: Dmitry Streblechenko
|
|