ICONICO

Discussion Forum

Post Reply in Mailbox SDK

Post Reply To "Getting started, opening a PST"
Hey, I am trying to open a PST using Mailbox SDK. This the code i am running:

MC.LibWrap.SetDebugMode(true);
MC.LibWrap.ShowDebugConsole(true);

var res = MC.LibWrap.OpenMailbox(file.PhysicalPath);
Thread.Sleep(2000);
res = MC.LibWrap.OpenMailbox(file.PhysicalPath);

if (res != 0)
{
throw new Exception(string.Format("Failed to open mailbox: {0}", MC.Errors.ToString(res)));
}

My computer has Office 2003 and MAPI installed. Running this code causes the exception to be thrown. The debugger output looks like this:

2/11/2009 11:42:57 AM OpenMailbox, FileName = "C:\Documents and Settings\aneum
ann\Desktop\Document Type\010 PST\GAND.PST"
2/11/2009 11:42:57 AM Initializate MAPI
2/11/2009 11:42:57 AM Config library path: C:\Program Files\Common Files\SYSTE
M\MSMAPI\1033\msmapi32.dll
2/11/2009 11:42:57 AM MSMAPI32Dll handle: 905379840
2/11/2009 11:42:57 AM MSMAPI32Dll intilization OK
2/11/2009 11:42:57 AM MAPI library handle: 905379840
2/11/2009 11:42:57 AM Open MS Outlook Message storage at: C:\Documents and Set
tings\user\Desktop\Document Type\010 PST\GAND.PST
2/11/2009 11:42:57 AM Initialize result #-2147417850
2/11/2009 11:42:57 AM Profiles result #-2147219963
2/11/2009 11:42:57 AM Profiles is NULL, service not availabel
2/11/2009 11:42:57 AM MS Outlook, message storage closed, all interfaces disco
nnected and memory freed
2/11/2009 11:42:57 AM OpenMailBox result: MS Outlook interface cannot open sel
ected file (OMS_MAPINOTOPENSTORAGE).
2/11/2009 11:42:59 AM OpenMailbox, FileName = "C:\Documents and Settings\aneum
ann\Desktop\Document Type\010 PST\GAND.PST"
2/11/2009 11:42:59 AM Initializate MAPI
2/11/2009 11:42:59 AM Config library path: C:\Program Files\Common Files\SYSTE
M\MSMAPI\1033\msmapi32.dll
2/11/2009 11:42:59 AM MAPI library handle: 905379840
2/11/2009 11:42:59 AM Open MS Outlook Message storage at: C:\Documents and Set
tings\user\Desktop\Document Type\010 PST\GAND.PST
2/11/2009 11:42:59 AM Initialize result #-2147417850
2/11/2009 11:42:59 AM Profiles result #-2147219963
2/11/2009 11:42:59 AM Profiles is NULL, service not availabel
2/11/2009 11:42:59 AM MS Outlook, message storage closed, all interfaces disco
nnected and memory freed
2/11/2009 11:42:59 AM OpenMailBox result: MS Outlook interface cannot open sel
ected file (OMS_MAPINOTOPENSTORAGE).


How can I get this to work? Is there some kind of initialisation step required to connect to Outlook? I've noticed the OUTLOOK.EXE process does not start when my code runs. Is there some further diagnostics i can perform to help? Thanks!

Subject

First Name

Last Name

Email Address for reply notifications (optional) - your email will not be visible

Re-enter the text shown in the image
Enter the text shown here below  

Your Message

  Cancel

Our Software Stores

IconicoAccurate Design and Development Software

BitsDuJourDiscount Deal Coupons for Windows and Mac Software Apps

Our Software Services

SoftwareMarketingResourceYou Wrote the Code, Now How do you Sell it?

IcoBlogOur Official Blog

© copyright 2004-2020 Iconico, Inc. Code & Design. All Rights Reserved. Terms & Conditions Privacy Policy Terms of Use