Discussing the nuts and bolts of software development

Thursday, July 24, 2008

 

Outlook Entry IDs Made Easy

When developing for Outlook you will quickly realize that there's more than one way of doing things. For example, take a look at the number of APIs for interacting with Outlook:That doesn't even include the six libraries included in the Outlook 2003 Integration API or the excellent 3rd-party Redemption library. I'm positive there are others. Usually you won't use all these APIs in the same project. However, if you want to do anything significant in Outlook, you'll need to use the OOM and MAPI libraries.

It's important to understand the relationship between MAPI and the OOM:When you work with these APIs, you'll hit on the problem of linking them together. Outlook Entry IDs are a good example. Entry IDs uniquely identify most objects in the OOM and MAPI. Being very flexible, Entry IDs can take many shape or form and can cause headaches when you try to handle them.

At its simplest, an Entry ID is a variable length byte buffer, sometimes represented with a simple byte array. In MAPI, most Entry IDs are represented by the ENTRYID structure:

mapidefs.h

typedef struct { 
BYTE abFlags[4];
BYTE ab[MAPI_DIM];
} ENTRYID, FAR *LPENTRYID;
This structure usually comes wrapped in the SBinary structure.

mapidefs.h

typedef struct _SBinary { 
ULONG cb;
LPBYTE lpb;
} SBinary, FAR *LPSBinary;
In the Outlook Object Model things take a turn for the worst:Is your head spinning? Mine was.

I solved the problem by creating a class (yet another format!) to facilitate manipulation of all these formats:
class EntryId
{
public:
EntryId(EntryId const& entryId);

// All explicit so that it's always clear what we are doing.
explicit EntryId(BSTR const* str, bool hexEncoded = true);
explicit EntryId(SBinary const* binary);
explicit EntryId(SAFEARRAY const* array);
explicit EntryId(unsigned long count, unsigned char const* bytes);

// Again, no implicit conversion
CComBSTR toString(bool hexEncoded = true) const;
CComSafeArray toSafeArray() const;
std::vector toByteArray() const;
// ... add more as you need them

// TODO: Add more custom helper functions.
bool isLongTermId() const;

// TODO: Add comparison operators for convenience and ordered
// container support (such as std::map keys). When comparing
// Entry Ids, remember you need to use the
// IMAPISupport::CompareEntryIDs method.

private:
std::vector<unsigned char> m_buffer;
}
Now whenever I get an Entry ID in any format, the first thing I do is convert it to an EntryId instance. This adds many convenient functionalities:

Labels: , ,


Comments:
You should definitely check https://essaydragon.com/blog/good-topic-sentences out before writing topic sentences. It will be useful for you in any case
 
Deadline is something which needs to be followed by one and all irrespective of the position they are working in. But the writers working in buy assignment do not follow this at all. Read myassignmenthelp review before opting for their services so that you get to know the real feedback of the students. The australian help review say that they provide average service in which the students are not always satisfied. The essayroo display the fact that the service provider gives poor quality papers to the students. The students have found that their papers are full of errors and they do not have proper mechanisms for proofreading of the papers. The big assignments review show that they are really unprofessional people who do not know how to behave with the students. One of the most important qualities of the assignment writing services is that it should engage in free revisions and paper editing (if required). edubirdie review shows that the support team doesn’t give enough revision options to the students. Scan essayshark review before choosing their services in order that you get to grasp the feedback of the scholars. The ukessays say that they supply average service during which the scholars don't seem to be forever happy. the scholars feel that the service supplier has ton a lot of to supply to them and that they don't realize the services satisfactory. I hope that will help the students to identify better writing services and help them in making their assignments.
 
Thanks for sharing this type of interesting information. I have bookmarked it to read again. Exclusive Paper.com offers various service that makes the lives of students relatively easy. So, if you need excel assignment homework just sent us a short request "do my excel assignment", feel free to request our team. As we are working on your task, we guarantee that you will receive the best service.
 
That’s really so good to visit this site, the blog has helped me a lot in my thesis, before I was quite worried to clear my concepts, thanks
ParkWhiz For PC
 
Wow!! This really is a nice and awesome piece of information!!
Thanks for sharing this informative post!! Keep such work regularly in future!!
Conversation Secrets
 
“Is it safe to write my research paper?” Our paper writing service is secured with advanced security protocols and is safe. We’ll also create a private account for you to use when tracking, downloading, or ordering future papers. Once we send you the logins, you can change the password to something more secure.
 
I want to say that this post is awesome, nicely written.
 
If you don’t have enough time to write an article - contact us https://qualitycustomessays.com/buy-a-book-report/

 
Hello! Our online college paper writing service is all about professionalism and respect. When you visit our site and make an order online or on the phone, it’s our duty to cater to all your needs and expectations.
 
Hello dear guys, thats post amazing! Our service https://essaysrescue.com/edubirdie-review/ find an available subject-relevant writer. Within 15 minutes, we will introduce you to a qualified expert in your discipline. Tell us ‘write my essay for me’ right now, and a qualified writer will set to work on your assignment in less than 15 minutes.
 
Log on to our website and avail these offers because https://expertpaperwriter.com/homework-market-com-review/ we are a diverse site, offering essays on a variety of subjects. Our writers are competent and skilled to match your writing criteria.
 
Writing a capstone paper is a time-consuming process, and many find it challenging to handle the whole project on their own. No worries! We have experienced writers with relevant qualifications who can master an original capstone buyessay.net paper for you on short notice.
 
This comment has been removed by the author.
 
Nice post, $1 deposit casino Canada
 
The most important factor of starting your online sportsbook is your budget. create sportsbook.
 
Nice information, valuable and excellent design, as share good stuff with good ideas and concepts. You can also refer to the d4 dice roller blog and find the Features of the Online D4 Rice Roller here.

 
Nice information and useable.

 
outlook is very safe, I am preferred to all students and use only Outlook email, I am taking about cheap dissertation writers online, and they provide me my dissertation in their email, and I am highly recommended to all students, who looking for dissertation writers for complete work,
 
It is fundamental to comprehend that Salesforce is in excess of an instant CRM you can use for your business needs. It is a tremendous stage for making your own applications and setting up mixes with various business arrangements, with different capabilities, existing parts, accessible Programming interface, and in general improvement proficiency.

As a cloud-based help, Salesforce highlights six principal parts that can assist you with further developing your deals processes, watch out for middle outcomes, and computerize a ton of the functional cycles>> salesforce development company
 
This blog is really inforamtive and also if you want more information on common label them this soruce is really helpful
 
Simplify Outlook Entry IDs effortlessly with user-friendly techniques. Understanding the structure and decoding Entry IDs facilitates efficient data management. By mastering these methods, users gain ease in tracking and referencing items, streamlining their Outlook experience for enhanced productivity and organization. This blog is a goldmine of information. Your blog packs a punch in just a few sentences. Your words are like gems. Thank you for sharing this! A quick, delightful read that left me inspired.divorce lawyers in virginia
 
Nice!
 

Good informative post. Thanks for sharing this wonderful post. Keep sharing more blogs like this. Keep updating us by sharing more technical informative blogs.dwi vs dui

 
"Unlocking the mysteries of Outlook Entry IDs has never been easier! This comprehensive guide provides a clear and concise roadmap to navigate the intricate world of Entry IDs effortlessly. From demystifying complex codes to simplifying the entire process, this resource is a game-changer for anyone looking to enhance their understanding of Outlook Entry IDs. Kudos to the author for making this intricate subject so accessible and user-friendly. A must-read for Outlook enthusiasts and professionals alike!"

Reckless Driving In New Jersey

 
you are the best writer for all Automobile Paint
 
This blog is very informative and also if you join the flock
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?