• Sign in
 
  •  
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...

  • Blog Home
  • About
  • Email Blog Author
  • Share this
  • RSS for posts
  • Atom
  • RSS for comments
  • CDO (25)
  • Code Snippet (43)
  • Custom Providers (17)
  • Debugging (7)
  • DevMsgTeam (303)
  • Documentation (111)
  • DST (8)
  • EWS (7)
  • Exchange (110)
  • Gotchas (98)
  • Hotfix (28)
  • MAPI (241)
  • MAPI Download (55)
  • MFCMAPI (102)
  • MSDN (59)
  • Non Dev (11)
  • OOM (17)
  • Outlook (171)
  • Outlook 2007 Auxiliary Reference (45)
  • Outlook Integration API (12)
  • Protocol Docs (20)
  • PST/OST (23)
  • Referrals (8)
  • Vista (12)
  • WrapPST (18)
Links:
  • Download MFCMAPI
  • MFCMAPI on Facebook
  • Troubleshooting Outlook Crashes
  • Office Update Center
  • Developer Messaging Team Blog
This site is provided "AS IS" with no warranties, and confers no rights. Use of included code samples are subject to the terms specified in the Terms of Use.
Archives
  • May 2013 (5)
  • April 2013 (1)
  • March 2013 (2)
  • February 2013 (2)
  • January 2013 (2)
  • December 2012 (4)
  • November 2012 (2)
  • October 2012 (2)
  • September 2012 (1)
  • August 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (3)
  • March 2012 (3)
  • February 2012 (3)
  • January 2012 (1)
  • December 2011 (3)
  • November 2011 (1)
  • October 2011 (3)
  • September 2011 (1)
  • August 2011 (1)
  • July 2011 (4)
  • June 2011 (3)
  • May 2011 (3)
  • April 2011 (3)
  • March 2011 (5)
  • February 2011 (1)
  • January 2011 (2)
  • December 2010 (1)
  • November 2010 (4)
  • October 2010 (1)
  • September 2010 (3)
  • August 2010 (5)
  • July 2010 (3)
  • June 2010 (3)
  • May 2010 (1)
  • April 2010 (3)
  • March 2010 (3)
  • February 2010 (3)
  • January 2010 (2)
  • December 2009 (3)
  • November 2009 (5)
  • October 2009 (4)
  • September 2009 (5)
  • August 2009 (5)
  • July 2009 (11)
  • June 2009 (6)
  • May 2009 (5)
  • April 2009 (3)
  • March 2009 (18)
  • February 2009 (10)
  • January 2009 (3)
  • December 2008 (2)
  • November 2008 (2)
  • October 2008 (5)
  • September 2008 (4)
  • August 2008 (10)
  • July 2008 (6)
  • June 2008 (8)
  • May 2008 (2)
  • April 2008 (4)
  • March 2008 (2)
  • February 2008 (2)
  • January 2008 (5)
  • December 2007 (3)
  • November 2007 (2)
  • October 2007 (3)
  • September 2007 (1)
  • August 2007 (4)
  • July 2007 (5)
  • June 2007 (3)
  • May 2007 (4)
  • April 2007 (1)
  • March 2007 (6)
  • February 2007 (3)
  • January 2007 (2)
  • December 2006 (4)
  • November 2006 (3)
  • October 2006 (1)
  • August 2006 (1)
  • June 2006 (5)
  • May 2006 (5)
  • December 2005 (1)
  • November 2005 (4)
  • October 2005 (2)
  • September 2005 (1)
  • April 2005 (3)
  • December 2004 (2)
  • September 2004 (2)
  • August 2004 (3)
  • July 2004 (3)

Updated MSLMS Sample Posted

MSDN Blogs > SGriffin's MAPI Internals > Updated MSLMS Sample Posted

Updated MSLMS Sample Posted

Stephen Griffin - MSFT
30 Sep 2004 2:18 PM
  • Comments 10

A while back, I posted an article about the fixes Jason and I had to make to the MSLMS sample message store to get it to load under Outlook 2003. Since then, I've received numerous requests that I post the changes. I wasn't ignoring the requests - I've just been busy adding features to MFCMAPI (more on that later).

Before I posted the code, I wanted to scrub it once more for obvious defects. We have some tools here which can point out potential bugs in your code, like dereferencing a pointer without first checking that it's not NULL. I was amazed at the volume of errors these scripts found in the sample. Even though most of these errors were trivial to fix, the number of them made for slow goings.

Anyway, here's the updated code. Fair warning: There's no warrenty whatsoever implied in this code. USE THIS CODE AT YOUR OWN RISK!

Todo list:

  • Scrub each individual function for coding errors - make sure all parameters are checked and all variables properly initialized
  • Remove all old tracing code and replace it with something more modern
  • Remove all code wrapped in assert/verify macros and replace with real error handling
  • Remove all gotos
  • Remove dead code
  • Add error handling for all function calls
  • Replace all string handling functions with equivalent StrSafe functions
  • Revisit my fix for the heap management issues

I'll post updates as I make major changes and bug fixes. I may create a workspace for this on gotdotnet if I see enough interest in it. Until I do, send any bug reports to me.

[edit - crediting JasonJoh for the work he did on this]

  • 10 Comments
Outlook, MAPI, Code Snippet, Custom Providers, DevMsgTeam
  • Henry Ghusakovsky
    4 Oct 2004 3:46 AM
    I've found some additional errors in the posted sample.
    And there is a big leak of functionality as a default Store: It can't send mail via spooler. May be it's better to say that spooler suppopt is not completed.
    Another leak is Search Folders.

  • Stephen Griffin
    4 Oct 2004 11:48 AM
    My goal was to get the existing sample working, not to add new features. Search folders was never implemented in MSLMS.

    On sending mail - I don't think MSLMS ever supported being the default store provider - I did some tests enabling it and the first roadblock I hit was when Outlook tries to store special folder entry IDs on the Inbox - CMAPIFolder::SetProps doesn't allow for arbitrary props on folders. That problem is fixable, but leads into a second problem - we can't create a Reminders folder since MSLMS doesn't support search folders.

    I'm not sure I follow the spooler comment - given that the MSLMS sample has never supported being a default store, how would we expect it to 'send mail via the spooler'?
  • Henry Ghusakovsky
    4 Oct 2004 5:05 PM
    I have fixed spooler problems and fixed a number of memory corrupting errors.
    Added another missing property in the Hierarchy tables.
    Allowed setting custom properties for folders.
    Fixed updating Content Tables (there was an error if some open properties present)
    Now it works better in my Outlook XP.
    So i can send you an updated project.
  • Stephen Griffin
    4 Oct 2004 5:12 PM
    Much appreciated - send me a mail via the contact link and we'll coordinate from there.
  • Peter Lepeska
    13 Oct 2004 1:13 PM
    " I have fixed spooler problems and fixed a number of memory corrupting errors. "

    Any chance I can download the latest and greatest of the MSLMS?

    thanks in advance.
  • Stephen Griffin
    13 Oct 2004 1:21 PM
    I had some issues integrating Henry's changes to the existing code - lot's of memory corruption. I don't know yet if it's his changes or the way I integrated them or some combination of the two.

    Rather than rush through it and end up with an unstable build, I'm taking my time with this integration - unfortunately, I'm also very busy with some other projects so it may be a while before I post a new updated sample.
  • Gwyn Cole
    25 Oct 2004 11:27 AM
    Looking forward to the next stable build...
  • mehdi
    4 Jan 2006 9:18 AM
    hi dear Stephen.
    is it possible to compile you'r mslms sample in microsoft visual studio.net.
    i looking for .net samples and i found nothing, for writing store provider.
    is it any resource or sources that lead me.
    thanks
  • Stephen Griffin - MSFT
    6 Jan 2006 10:35 AM
    If by .Net you mean Visual Studio 2003/2005 unmanaged C++, then it should probably work, barring a few minor issues any project would have porting from one compiler to another.

    If by .Net you mean managed code like C# or managed C++, then that would fall into the category of mixing MAPI and managed code, which is a no-no.
  • SGriffin's [MSFT] WebLog
    3 Oct 2006 3:37 PM

    Documentation and sample for a Wrapped PST

Page 1 of 1 (10 items)
  • © 2013 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy & Cookies
  • Report Abuse
  • 5.6.426.415