Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 5 Aug 2008 12:09:38 +0800,    group: microsoft.public.platformsdk.mapi        back       


PR_CREATION_TIME & PR_LAST_MODIFICATION_TIME always returned as "now"   
Using MAPI to retrieve these property values for Outlook objects (messages, 
notes, etc) with HrGetOneProp(), but the return value for both is always 
"now"...  Other dates are returned correctly (such as 
PR_MESSAGE_DELIVERY_TIME).

Outlook Spy returns the correct value, not sure what I am doing wrong... Any 
suggestions?

url:http://www.ureader.com/gp/1651-1.aspx
date: Tue, 5 Aug 2008 12:09:38 +0800   author:   Kevin Alons

Re: PR_CREATION_TIME & PR_LAST_MODIFICATION_TIME always returned as "now"   
What is the relevant snippet of your code?

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
"Kevin Alons"  wrote in message 
news:662b189bb62543599f74fda65e58a1c4@newspe.com...
> Using MAPI to retrieve these property values for Outlook objects 
> (messages,
> notes, etc) with HrGetOneProp(), but the return value for both is always
> "now"...  Other dates are returned correctly (such as
> PR_MESSAGE_DELIVERY_TIME).
>
> Outlook Spy returns the correct value, not sure what I am doing wrong... 
> Any
> suggestions?
>
> url:http://www.ureader.com/gp/1651-1.aspx
date: Mon, 4 Aug 2008 21:35:29 -0700   author:   Dmitry Streblechenko

Re: PR_CREATION_TIME & PR_LAST_MODIFICATION_TIME always returned as "now"   
Here is the relevant code (pulled from several places in my C++ wrapper of 
MAPI):

  CComPtr<IStorage> m_stg;
  CComPtr<IMessage> m_msg;
  
m_stg = stg; /* where stg is an IStorage* */
  
  HR_(::OpenIMsgOnIStg(NULL, &MAPIAllocateBuffer, &MAPIAllocateMore, 
&MAPIFreeBuffer, alloc, NULL, m_stg, NULL, 0, 0, (LPMESSAGE*)&m_msg));
  
CComPtr<IMAPIProp> m_mapiProp;
m_mapiProp = iMapiProp;

CLPSPropValue val;

// ULONG propTag; // passed in

if (SUCCEEDED(HrGetOneProp(m_mapiProp, propTag, &val)))
{
  switch (PTAG_TYPE(val->ulPropTag))
  {
    case PT_APPTIME:
      return val->Value.at;
    case PT_SYSTIME:
      return FileTimeToDate(val->Value.ft);
    case PT_DOUBLE:
      return val->Value.dbl;
    default:
      return GetMAPIIntProperty(propTag);
  }
}

url:http://ureader.com/msg/1651587.aspx
date: Mon, 25 Aug 2008 22:01:01 +0800   author:   Kevin Alons

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us