ICONICO

Discussion Thread

Mailbox SDK

Message Thread


Posted in the Mailbox SDK Forum.




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!
by Adam Neumann on Feb 11 2009 1:02pm Reply

Getting started, opening a PST

I have also successfully opened the PST in Email Extractor, and works fine. I enabled the debug log, and everything runs fine. I am using the trial version.
by Adam Neumann on Feb 11 2009 2:24pm Reply

Getting started, opening a PST

This is pretty strange that it works in email extractor and not in MCore.

Please try to open other .PST files, it could be a problem with the particular PST.
by Nico Westerdale on Feb 11 2009 6:28pm Reply

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