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: Fri, 2 May 2008 03:53:56 -0700 (PDT),    group: microsoft.public.platformsdk.mapi        back       


LPSZA or LPSZW   
Hi there,

Is there anyway i can detect if the value is in PT_STRING8 or
PT_UNICODE.
I am loading Unicode PST, and some of the folder has name in chinese
and other language. How can i probe this. Same is for message and its
content.

Thank You
miztaken
date: Fri, 2 May 2008 03:53:56 -0700 (PDT)   author:   unknown

Re: LPSZA or LPSZW   
Check if the STORE_UNICODE_OK bit is set in the PR_STORE_SUPPORT_MASK 
property and explicitly request the Unicode version of the string property 
(PR_DISPLAY_NAME_W) rather than ANSI (PR_DISPLAY_NAME_A)

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
 wrote in message 
news:f1b9e36e-2fce-4d16-b04f-9b53d5f26a31@v26g2000prm.googlegroups.com...
> Hi there,
>
> Is there anyway i can detect if the value is in PT_STRING8 or
> PT_UNICODE.
> I am loading Unicode PST, and some of the folder has name in chinese
> and other language. How can i probe this. Same is for message and its
> content.
>
> Thank You
> miztaken
>
>
>
date: Fri, 2 May 2008 10:21:36 -0700   author:   Dmitry Streblechenko

Re: LPSZA or LPSZW   
However, regardless of what flags you've set or what prop you requested, you 
should always check the type of the property before interpretting the union. 
Use the PROP_TYPE macro on the ulPropTag field of the property.

"Dmitry Streblechenko"  wrote in message 
news:OJNc7jHrIHA.4876@TK2MSFTNGP02.phx.gbl...
> Check if the STORE_UNICODE_OK bit is set in the PR_STORE_SUPPORT_MASK 
> property and explicitly request the Unicode version of the string property 
> (PR_DISPLAY_NAME_W) rather than ANSI (PR_DISPLAY_NAME_A)
>
> -- 
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy  - Outlook, CDO
> and MAPI Developer Tool
> -
>  wrote in message 
> news:f1b9e36e-2fce-4d16-b04f-9b53d5f26a31@v26g2000prm.googlegroups.com...
>> Hi there,
>>
>> Is there anyway i can detect if the value is in PT_STRING8 or
>> PT_UNICODE.
>> I am loading Unicode PST, and some of the folder has name in chinese
>> and other language. How can i probe this. Same is for message and its
>> content.
>>
>> Thank You
>> miztaken
>>
>>
>>
>
>
date: Fri, 2 May 2008 14:05:57 -0400   author:   Stephen Griffin [MSFT]

Re: LPSZA or LPSZW   
Hello,
thanks for an instant reply.
I cannot access the property i am doing like this:

ULONG  ipmroottype;
hr=msg_store->OpenEntry(ipm_eid->Value.bin.cb,(ENTRYID*)ipm_eid-
>Value.bin.lpb,NULL,1,&ipmroottype,(IUnknown**)&ipmroot);
SPropValue *store_mask_value;
SizedSPropTagArray(1,columns)={1,{PR_STORE_SUPPORT_MASK}};
ULONG pcount;
LPSPropValue lpsprop=NULL;
hr=msg_store->GetProps((SPropTagArray*)&columns,
0,&pcount,&store_mask_value);

All i am getting is:
ul 344061
ulproptag 873267203

I dont know what to do with this result and how to interpret.

Also i dont have STORE_UNICODE_OK flag?

Help me
miztaken
date: Sun, 4 May 2008 01:21:32 -0700 (PDT)   author:   unknown

Re: LPSZA or LPSZW   
hi there,
by the way i am binding PST programatically to a profile.
And is it possible that the contents are unicode but the
STORE_UNICODE_OK bit is not set?


Thanks
miztaken
date: Mon, 5 May 2008 02:57:18 -0700 (PDT)   author:   unknown

Re: LPSZA or LPSZW   
Doyou see that property in MFCMAPI or OutlookSpy?

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
 wrote in message 
news:44d41499-61d0-46f6-8e12-cc560e8718c1@q1g2000prf.googlegroups.com...
> Hello,
> thanks for an instant reply.
> I cannot access the property i am doing like this:
>
> ULONG  ipmroottype;
> hr=msg_store->OpenEntry(ipm_eid->Value.bin.cb,(ENTRYID*)ipm_eid-
>>Value.bin.lpb,NULL,1,&ipmroottype,(IUnknown**)&ipmroot);
> SPropValue *store_mask_value;
> SizedSPropTagArray(1,columns)={1,{PR_STORE_SUPPORT_MASK}};
> ULONG pcount;
> LPSPropValue lpsprop=NULL;
> hr=msg_store->GetProps((SPropTagArray*)&columns,
> 0,&pcount,&store_mask_value);
>
> All i am getting is:
> ul 344061
> ulproptag 873267203
>
> I dont know what to do with this result and how to interpret.
>
> Also i dont have STORE_UNICODE_OK flag?
>
> Help me
> miztaken
>
>
date: Mon, 5 May 2008 13:55:17 -0700   author:   Dmitry Streblechenko

Re: LPSZA or LPSZW   
This is has nothing to do with the actual contents but rather with the 
*ability* of the store to store PT_UNICODE properties natively.

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
 wrote in message 
news:cdf522f6-a213-4ec8-b2a6-0701febf3c83@d19g2000prm.googlegroups.com...
> hi there,
> by the way i am binding PST programatically to a profile.
> And is it possible that the contents are unicode but the
> STORE_UNICODE_OK bit is not set?
>
>
> Thanks
> miztaken
date: Mon, 5 May 2008 13:56:35 -0700   author:   Dmitry Streblechenko

Re: LPSZA or LPSZW   
Hi Dmitry,
When i checked the property from MFCMAPI.
PR_STORE_SUPPORT_MASK has a value 344061, exactly what i received
earlier.

Also those folders with chinese names are are displayed as ????? in
MFCMAPI UI as well.
I know that i can fetch the value from _W property but i want to make
the fetch programmatical.

like

if(isUnicode)
  get _W
else
  get _A

how can i do this?

Thank you
miztaken
date: Mon, 5 May 2008 23:36:59 -0700 (PDT)   author:   unknown

Re: LPSZA or LPSZW   
Ok, so you receive that value in  in the SPropValue.Value.l?
Use bitwise "or" to check if the STORE_UNICODE_OK bit (= 0x40000) is set.

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
 wrote in message 
news:10e152fd-242e-4f0d-9547-c2b83ab3d9bb@w8g2000prd.googlegroups.com...
> Hi Dmitry,
> When i checked the property from MFCMAPI.
> PR_STORE_SUPPORT_MASK has a value 344061, exactly what i received
> earlier.
>
> Also those folders with chinese names are are displayed as ????? in
> MFCMAPI UI as well.
> I know that i can fetch the value from _W property but i want to make
> the fetch programmatical.
>
> like
>
> if(isUnicode)
>  get _W
> else
>  get _A
>
> how can i do this?
>
> Thank you
> miztaken
>
>
>
date: Tue, 6 May 2008 10:52:39 -0700   author:   Dmitry Streblechenko

Re: LPSZA or LPSZW   
Thanks Dmitry,
I am getting the desired result.
Can we probe if the PST and its Folders and Messages porperties are
unicode or not while creating CreateMsgService()
i.e. by using "MSUPST MS" or "MSPST MS".
How to know if a PST is ANSI or UNICODE, if this can be known earlier
then we can explicitly extract either _W or _A for all the properties
and we can save time as well?

How can this be done?

Thank You
miztaken
date: Wed, 7 May 2008 00:13:42 -0700 (PDT)   author:   unknown

Re: LPSZA or LPSZW   
If you specify "MSUPST MS" and the file does not exist, it will be in the 
Unicode format.
If the file already exists, it will be in the original format, whatever that 
is.
I really do not think setting a flag (Unicode vs ANSI) at the tim thePST 
file is created rather than reading PR_STORE_SUPPORT_MASK once when the 
store is opened is going to save you any time.

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
 wrote in message 
news:90adb252-fd7b-437e-86fb-4f7137ac8103@q24g2000prf.googlegroups.com...
> Thanks Dmitry,
> I am getting the desired result.
> Can we probe if the PST and its Folders and Messages porperties are
> unicode or not while creating CreateMsgService()
> i.e. by using "MSUPST MS" or "MSPST MS".
> How to know if a PST is ANSI or UNICODE, if this can be known earlier
> then we can explicitly extract either _W or _A for all the properties
> and we can save time as well?
>
> How can this be done?
>
> Thank You
> miztaken
>
>
>
date: Wed, 7 May 2008 10:43:06 -0700   author:   Dmitry Streblechenko

Re: LPSZA or LPSZW   
Thanks Dmitry, for all your support.


miztaken
date: Wed, 7 May 2008 21:51:39 -0700 (PDT)   author:   unknown

Re: LPSZA or LPSZW   
Hi Dmitry.
Even if the PR_STORE_SUPPORT_MASK is set for unicode.
In some PSTs i have original desired value in lpszA rather than in
lpszW.
How is this possible?
what is LPSZ used for ?
date: Fri, 30 May 2008 00:24:02 -0700 (PDT)   author:   miztaken

Google
 
Web ureader.com


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