From: Ste Magi on
Hi all,
I'm developing a pocket pc mail client and I'm trying to understand the
meaning of some MAPI properties.
In particular I've seen looking at an imap4 account that when a message is
downloaded with filter "Header Only", the mail appears with only header and
a sentence in the body "mark here to download the remain part of the message
(27kb)"
In the list of the received mail the same mail is shown with a the size 2/27
kb

I would like to have the same behaviour in my custom mail. I can set a
property PR_MESSAGE_SIZE to set the current size of the mail (in our case 2
kb). I can set some status flags to say the mail is partially downloaded.

What I need is to set some other flags or some other fields that can say the
remaining message size to be downloaded. So I can set the remainig X part
(2/X kb)

Could anyone give me an hint?

Thank you very much
Marco


--



From: Matt on
Marco,

I have to say that all of this is undocumented in the MAPI headers, so
looking there will not be benificial. If you are working with an older
pocket pc, I would suggest getting a database viewer and looking at
each database column until you find the one that show how much of a
message is downloaded. You can either change this in the database,
which is fairly easy, or use that to find the mapi code. I believe
there is a way to generate the MAPI flag for this,but it is not pretty.
I do not think you can do that database changes for new Pocket PCs, WM
5.0, because you won;t have the rights to alter the databases. There
is a work around for this somewhere, I think in one of the new APIs for
the WM 5.0 operating system. I have not worked on this in quite a
while, so I appologize for this being really vague.

MAPI will drive you insane because only about half of the flags are
documented and the other half make things work correctly. Typically if
you search these group you might find something to help you, but
typically you are on your own. If I had not left my last job, I would
be able to help you, but now I do not have that codebase any more.

Good Luck,
matt


Ste Magi wrote:
> Hi all,
> I'm developing a pocket pc mail client and I'm trying to understand the
> meaning of some MAPI properties.
> In particular I've seen looking at an imap4 account that when a message is
> downloaded with filter "Header Only", the mail appears with only header and
> a sentence in the body "mark here to download the remain part of the message
> (27kb)"
> In the list of the received mail the same mail is shown with a the size 2/27
> kb
>
> I would like to have the same behaviour in my custom mail. I can set a
> property PR_MESSAGE_SIZE to set the current size of the mail (in our case 2
> kb). I can set some status flags to say the mail is partially downloaded.
>
> What I need is to set some other flags or some other fields that can say the
> remaining message size to be downloaded. So I can set the remainig X part
> (2/X kb)
>
> Could anyone give me an hint?
>
> Thank you very much
> Marco
>
>
> --

From: Peter Foot [MVP] on
In the CEMAPI.h header there are some additional message status flags:-
#define MSGSTATUS_HEADERONLY 0x00010000

// This flag is set if the item should be partially downloaded.
#define MSGSTATUS_PARTIAL_DOWNLOAD 0x00080000

// This flag is set if the item is only partially downloaded.
#define MSGSTATUS_PARTIAL 0x00100000

Also, while not clearly documented, perhaps this property will give you the
size remaining to be downloaded (or bytes already fetched):-
// Number of bytes to download for a message
#define PR_CE_FETCH_SIZE PROP_TAG (PT_I4, 0x8121)

Peter

--
Peter Foot
Device Application Development MVP
www.peterfoot.net | www.inthehand.com

"Matt" <zimmerma009(a)hotmail.com> wrote in message
news:1163000450.578406.299170(a)b28g2000cwb.googlegroups.com...
> Marco,
>
> I have to say that all of this is undocumented in the MAPI headers, so
> looking there will not be benificial. If you are working with an older
> pocket pc, I would suggest getting a database viewer and looking at
> each database column until you find the one that show how much of a
> message is downloaded. You can either change this in the database,
> which is fairly easy, or use that to find the mapi code. I believe
> there is a way to generate the MAPI flag for this,but it is not pretty.
> I do not think you can do that database changes for new Pocket PCs, WM
> 5.0, because you won;t have the rights to alter the databases. There
> is a work around for this somewhere, I think in one of the new APIs for
> the WM 5.0 operating system. I have not worked on this in quite a
> while, so I appologize for this being really vague.
>
> MAPI will drive you insane because only about half of the flags are
> documented and the other half make things work correctly. Typically if
> you search these group you might find something to help you, but
> typically you are on your own. If I had not left my last job, I would
> be able to help you, but now I do not have that codebase any more.
>
> Good Luck,
> matt
>
>
> Ste Magi wrote:
>> Hi all,
>> I'm developing a pocket pc mail client and I'm trying to understand the
>> meaning of some MAPI properties.
>> In particular I've seen looking at an imap4 account that when a message
>> is
>> downloaded with filter "Header Only", the mail appears with only header
>> and
>> a sentence in the body "mark here to download the remain part of the
>> message
>> (27kb)"
>> In the list of the received mail the same mail is shown with a the size
>> 2/27
>> kb
>>
>> I would like to have the same behaviour in my custom mail. I can set a
>> property PR_MESSAGE_SIZE to set the current size of the mail (in our case
>> 2
>> kb). I can set some status flags to say the mail is partially downloaded.
>>
>> What I need is to set some other flags or some other fields that can say
>> the
>> remaining message size to be downloaded. So I can set the remainig X part
>> (2/X kb)
>>
>> Could anyone give me an hint?
>>
>> Thank you very much
>> Marco
>>
>>
>> --
>

From: Ste Magi on
Hi all,
thanks for your response!
Peter, I have already looked at these properties but the MSGSTATUS_* are
good to sign the message and to say its status. I'm able to set and get
these values. They are responsible to change the icon of the message.
Using the msgstatus flags, now I am able to change the icon and set the size
and name of the attachments in the mail

I tried the PR_CE_FETCH_SIZE but with no success. I cannot get any value for
that. Also I tried to set this property before create the new email without
success.
Here (http://support.microsoft.com/kb/291794) I downloaded the example and
source of this program that spies the properties, for outlook. I have seen
the property without value (D 0X824C (0X8F05))
{00062014-0000-0000-C000-000000000046} (PT_LONG) (0x824c0003) but it
doesn't work on ppc.
In this there is the value of the total size of the mail to be downloaded.

From the source code of the program I have seen it load all the properties
used by a function IMAPIProp::GetPropList() that is documented for ppc but
not implemented :(

Matt, maybe these latest hints can help you remember anything?? :)

Many thanks again
Marco



--

"Peter Foot [MVP]" <feedback(a)nospam-inthehand.com> ha scritto nel messaggio
news:81E4D428-EDB0-4F4B-B072-77431130ADB5(a)microsoft.com...
> In the CEMAPI.h header there are some additional message status flags:-
> #define MSGSTATUS_HEADERONLY 0x00010000
>
> // This flag is set if the item should be partially downloaded.
> #define MSGSTATUS_PARTIAL_DOWNLOAD 0x00080000
>
> // This flag is set if the item is only partially downloaded.
> #define MSGSTATUS_PARTIAL 0x00100000
>
> Also, while not clearly documented, perhaps this property will give you
> the size remaining to be downloaded (or bytes already fetched):-
> // Number of bytes to download for a message
> #define PR_CE_FETCH_SIZE PROP_TAG (PT_I4, 0x8121)
>
> Peter
>
> --
> Peter Foot
> Device Application Development MVP
> www.peterfoot.net | www.inthehand.com
>
> "Matt" <zimmerma009(a)hotmail.com> wrote in message
> news:1163000450.578406.299170(a)b28g2000cwb.googlegroups.com...
>> Marco,
>>
>> I have to say that all of this is undocumented in the MAPI headers, so
>> looking there will not be benificial. If you are working with an older
>> pocket pc, I would suggest getting a database viewer and looking at
>> each database column until you find the one that show how much of a
>> message is downloaded. You can either change this in the database,
>> which is fairly easy, or use that to find the mapi code. I believe
>> there is a way to generate the MAPI flag for this,but it is not pretty.
>> I do not think you can do that database changes for new Pocket PCs, WM
>> 5.0, because you won;t have the rights to alter the databases. There
>> is a work around for this somewhere, I think in one of the new APIs for
>> the WM 5.0 operating system. I have not worked on this in quite a
>> while, so I appologize for this being really vague.
>>
>> MAPI will drive you insane because only about half of the flags are
>> documented and the other half make things work correctly. Typically if
>> you search these group you might find something to help you, but
>> typically you are on your own. If I had not left my last job, I would
>> be able to help you, but now I do not have that codebase any more.
>>
>> Good Luck,
>> matt
>>
>>
>> Ste Magi wrote:
>>> Hi all,
>>> I'm developing a pocket pc mail client and I'm trying to understand the
>>> meaning of some MAPI properties.
>>> In particular I've seen looking at an imap4 account that when a message
>>> is
>>> downloaded with filter "Header Only", the mail appears with only header
>>> and
>>> a sentence in the body "mark here to download the remain part of the
>>> message
>>> (27kb)"
>>> In the list of the received mail the same mail is shown with a the size
>>> 2/27
>>> kb
>>>
>>> I would like to have the same behaviour in my custom mail. I can set a
>>> property PR_MESSAGE_SIZE to set the current size of the mail (in our
>>> case 2
>>> kb). I can set some status flags to say the mail is partially
>>> downloaded.
>>>
>>> What I need is to set some other flags or some other fields that can say
>>> the
>>> remaining message size to be downloaded. So I can set the remainig X
>>> part
>>> (2/X kb)
>>>
>>> Could anyone give me an hint?
>>>
>>> Thank you very much
>>> Marco
>>>
>>>
>>> --
>>
>


From: GG on

"Ste Magi" <stemagi(a)community.nospam> wrote in message
news:ehOa88ABHHA.3380(a)TK2MSFTNGP04.phx.gbl...
> Hi all,
> thanks for your response!
> Peter, I have already looked at these properties but the MSGSTATUS_* are
> good to sign the message and to say its status. I'm able to set and get
> these values. They are responsible to change the icon of the message.
> Using the msgstatus flags, now I am able to change the icon and set the
> size and name of the attachments in the mail
>
> I tried the PR_CE_FETCH_SIZE but with no success. I cannot get any value
> for that. Also I tried to set this property before create the new email
> without success.
> Here (http://support.microsoft.com/kb/291794) I downloaded the example and
> source of this program that spies the properties, for outlook. I have seen
> the property without value (D 0X824C (0X8F05))
> {00062014-0000-0000-C000-000000000046} (PT_LONG) (0x824c0003) but it
> doesn't work on ppc.
> In this there is the value of the total size of the mail to be downloaded.
>
> From the source code of the program I have seen it load all the properties
> used by a function IMAPIProp::GetPropList() that is documented for ppc but
> not implemented :(
>
> Matt, maybe these latest hints can help you remember anything?? :)
>
> Many thanks again
> Marco
>

The total size of message to be downloaded is in PR_MESSAGE_SIZE_EX, defined
in cemapi.h

HTH,

--
Giuseppe Govi
giuseppe.govi <> syncdata it