Mark Hammond wrote: >> can anybody tell me the meaning of the binary string >> representation of a >> PR_ENTRYID, as obtained by calling GetProps() on a mail item? > > Its a binary value that is unique for the item (but only unique within the > store - PR_STORE_ENTRYID will tell you the store ID) > >> I get e.g. the following IDs: >> >> 000000003C437E32AFD11C49ABB743DDE9EDFE6BE4652000 >> 000000003C437E32AFD11C49ABB743DDE9EDFE6B24602000 >> 000000003C437E32AFD11C49ABB743DDE9EDFE6B845F2000 >> 000000003C437E32AFD11C49ABB743DDE9EDFE6B44612000 >> 000000003C437E32AFD11C49ABB743DDE9EDFE6BA4672000 >> 000000003C437E32AFD11C49ABB743DDE9EDFE6B64652000 >> ^^^^^^ > > You are getting them via the client libraries, which has already encoded the > binary data as hex for you. If you were to get the property directly from > "extended mapi", you would get a string holding binary data.
I forgot to mention that. I used the extended mapi and converted it using HexFromBin. >> >> In case there isn't any meaning: >> I noticed that most of the data is equal for all messages of one mail >> folder. >> Only the characters marked above (3 bytes) are unique per >> item. Is it always >> like that? >> The reason I'm asking is, that I'd like to have a numeric >> representation of >> those IDs. So, do you think int('0x'+id[40:46],16) would be ok? > > The values above already *are* a hexadecimal value - you can't safely change > any part of it. I do not want to change it. I hoped that the extracted part might be enough to identify a message within one message store. >>>> int("000000003C437E32AFD11C49ABB743DDE9EDFE6B64652000", 16) > 344044589573578334092534486689392272954676813824L > > Its a very large number to be sure, that that it the "numeric ID". Indeed big. For my purpose I need an int though, not a long int. That's the reason why I tried to extract a smaller part. But if you don't consider it safe I will use a mapping dict to convert between the EIDs and my own ids. Thanks, Christian _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32