Problem while loading MPAI exported PST file

S

Stephen Griffin [MSFT]

With the emsmdb provider at least, that flag will short circuit most of the
loading/functionality of the transport provider. So it still plays a role
even without a spooler.

Dmitry Streblechenko said:
Interesting... Steve, if you are reading this, does MDB_NO_MAIL still do
anything in Outlook 2002/2003/2007? I thought with the removal of the
spooler in Outlook 2002, that flag does absolutely now.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi Dmitry,
It's working now. The problem got resolved when I removed the
"MDB_NO_MAIL" flag used to open the newly configured message store. I
doesn't know whether this is the reason for the above said error but
the PST file opens without any probelm.
Thanks for all help you provided with quick and elaborate responses.

Regards,
Sridhar D

Hi,
I haven't try it. I willl update you soon .
Regards,
Sridhar D

Dmitry Streblechenko wrote:
And you get the same problem when calling Namespace.AddStore in the
Outlook
Object Model, right?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi Dmitry,
I tried your suggestions. The script shows the message store name
as
"Test Store"and as explained previous posts it resets to its default
size.When I tried with Outlook exported file, it worked smartely
opening all the exported folders.
I have no clue why my files resets .Any idea about , what I may
have missed in the file export part? .

Regards,
Sridhar D

Dmitry Streblechenko wrote:
Are you running the script in Outlook 2000? Namespace.MAPIOBJECT
property
was added in Outlook 2002.
You can replace thaat line with
Session.Logon "Name Of The Profile"

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi Dmitry,

I followed your step 2 to Load the PST file exported by my MAPI
application. But Script Editor fails with following error.
--------------------------------------------------------8<-------------------------------------------------------------
"Error executing script:
Micrsoft VBScript runtime Error
Object doesn't support this property or method:
Application.Session.MAPIOBJECT
Line 2 , Column 1"
-------------------------------------------------------->8--------------------------------------------------------------

Is anything I had missed. I had installed Redemption object as
you
told in your earlier post.
Thanks for your time,

Regards,
Sridhar D

(e-mail address removed) wrote:
Hi,
Thanks, I will just try it out and update you with good
result.

Meanwhile some clarification on my previous post.

I just opened the PST file after fixing my "E_ACCESSDENIED"
error,
using Outlook, which loaded the message(Mailbox) store name
correctly.
When I clicked traverse my newly added Mailbox, it just resets
to 32
KB showing only "Deleted Items". The post that I told Outlook
opened
successfully after just seeing my mailbox name when I opened the
File
created with "E_ACCESSDENIED". I thought that it will be ok when
I
clear access problems.

Awaiting your response with great enthusiasm.

And again thanks for your great help.

Regards,
Sridhar D

Dmitry Streblechenko wrote:
Hmmm... I can only think of checking two more things:

1. Open the PST file using the Outlook Object Model
(Namespace.AdStore).

2. Try to use the following Redemption code (you can download
Redemption
from the URL below) that does very clo se to what you are
trying to
do). Try
to run the following script from OutlookSpy (click "Script
Editor",
paste
the script, click Run)

set Session = CreateObject(".RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set Store =
Session.Stores.AddPSTStore("C:\MAPI\TempProfile.pst", 1,
"Test
Store")
MsgBox Store.Name


Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi ,
Outlook opens it , without any problem.
Regards,
Sridhar D

Dmitry Streblechenko wrote:
Can Outlook open that PST file Ok (File | Open | Outlook
Data
File)?
As ofr the errors, are you sure you opened *both* the store
and
the
folder
with r/w access?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi,
No. It resets even export process went without any
interruption.
I will try to explain what I had done to export PST
file.

After configuring service, I opened root folder of the
configured
message store . I just called copyFolder/CopyMessage on
opened
root
folder of the message store recursively.
All Folders created/copied where present in Root folder
of new
storage
when listed later. After copying I just release both
store and
delete
the Message service created. When I reload this file it
just
start
as
new service.

I will try the above with calling
IMAPIProp::SaveChanges().

Meanwhile , I tried to copy all my Private Folder to
the "Top
of
Information store" of new store, which failed with
"MAPI_W_PARTIAL_COMPLETION" without creating Folder. The
CopyMessage
concept failed in createFolder call with "E_ACCESSDENIED"
though I
opened the new store "Top of Information store" with
MAPI_BEST_ACCESS .

Regards,
Sridhar D.




Dmitry Streblechenko wrote:
So it appears that the PST file itself is corrupt,
right? How
do
you
create
it? Does your app terminate gracefully after creating
that PST
file?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi,

When I loaded the Outlook exported file through my
program ,
it
works as expected listing correct mail box. But when I
tried
to
load
my
PST file which was exported using MAPI from the
Outlook , it
only
list
"Personal Folders" message store (which is default
folder
created
based
on STATUS_DEFAULT_STORE attribute).

Hence can I assume that there is no error at
restore
part.

I'm not sure , what might cause this problem. Is
there
anything
should I concentrate such as the steps I should follow
while
exporting
file, committing (if any finalizing steps to be
performed
to)
PST
file
while exporting, so that it loads without any problem.

Thanks in advance,

Regards,
Sridhar D

Dmitry Streblechenko wrote:
2. That's not what I meant - I was trying to say that
you
must
call
GetMsgServiceTable *before* calling CreateMsgService
and
then
call
GetMsgServiceTable *again* and compare the list of
services
to
know
the
id
of the service you just added. If you only gete one
service,
then
you
should
be Ok. But that would not work for an existing
profile that
has
other
services already.

The only other thing I can think of is the call to
ConfigureMsgService -
aren't you supposed to pass &propValue rather than
propValue?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi Dmitry,
Please see my replies below, If I had
misunderstood
your
suggestions, Please elaborate me.
1)Yes. I retrive rowset by applying restriction
name =
"MSPST
MS".
I tried List the all services, only one service
listed
even
without
applying any restriction.
2)How can retrive the service ids without the
serviceTable
which
is obtained from GetMsgServiceTable call.
Is there any way I can retrive the service Id
(properties
of
service table ) without calling GetMsgServiceTable
as you
told to
list
service ID before/after GetMsgServiceTable .

Meanwhile I tried to list Message stores before
Configuring
service(after I create "MSPST MS" service), to my
surprise a
default
message store "Personal Folders" was listed. I
persumed
that
this
is
due to the PR_RESOURCE_FLAGS which is set
STATUS_DEFAULT_STORE.
I herewith list my properties of "MSPST MS"
service. Is
reseting
my
data in PST file might be due to the
STATUS_DEFAULT_STORE
property?.

[MSPST MS]
Providers=MSPST MSP
PR_SERVICE_DLL_NAME=mspst.dll

PR_SERVICE_INSTALL_ID={6485D262-C2AC-11D1-AD3E-10A0C911C9C0}
PR_SERVICE_SUPPORT_FILES=mspst.dll
PR_SERVICE_ENTRY_NAME=PSTServiceEntry

PR_RESOURCE_FLAGS=SERVICE_NO_PRIMARY_IDENTITY
[MSPST MSP]
34140102=4e495441f9bfb80100aa0037d96e0000
PR_PROVIDER_DLL_NAME=mspst.dll

PR_SERVICE_INSTALL_ID={6485D262-C2AC-11D1-AD3E-10A0C911C9C0}
PR_RESOURCE_TYPE=MAPI_STORE_PROVIDER
PR_RESOURCE_FLAGS=STATUS_DEFAULT_STORE
PR_DISPLAY_NAME=Personal Folders
PR_PROVIDER_DISPLAY=Personal Folders

Regards,
Sridhar D

Dmitry Streblechenko wrote:
What is the implementation of GetMAPITableRowSet?
Do you
just
search
for
a
row with the service name = "MSPST MS". Are you
susre
you
don't
have
any
other PST files in the profile?
Strictly speaking, you will need to retrieve the
list of
the
service
ids
before calling GetMsgServiceTable, call
GetMsgServiceTable,
thene
retrieve
teh list of fservcie ids again. Loop through the
new ids
and
find
the
entry
not in the first list.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi,
Yes, I use fully qualified path. Please see my
code
listed
below
.
Is
there any functionality I have to perform while
exporting
the
PST
file
?.

-----------------------------------------------------------8<----------------------------------------------------------

hr =
mapiAdminProfile->AdminServices((TCHAR*)"Restore
Profile",
NULL,
NULL, 0,&msgSvcAdmin);

hr =
msgSvcAdmin->CreateMsgService((TCHAR*)"MSPST
MS",
(TCHAR*)"SG
PST
File2", NULL,
0);

if (hr == S_OK)
{
//cout<<" Before Creating Message Service \n";
hr = msgSvcAdmin->GetMsgServiceTable(ulFlags,
&msgSvcTable);
if(hr == S_OK)
{
rowSet = NULL;

hr = GetMAPITableRowSet(msgSvcTable, "MSPST MS",
&rowSet);
if (hr == S_OK)
{

propValue[0].ulPropTag = PR_PST_PATH;
propValue[0].Value.lpszA =
(char*)"C:\\MAPI\\TempProfile.pst";
//Full Path

hr = msgSvcAdmin->ConfigureMsgService(
(LPMAPIUID)(rowSet->aRow->lpProps->Value.bin.lpb),0,
0,
1,
propValue);
if(hr == S_OK)
{
//cout<<" ----> S_OK S_OK ConfigureMsgService()
<----
\n";
}
else
{
string tempValue = MAPIErrorString(hr);
cout<<" Failure To Configure Message Store
::"<<tempValue
<<"::
\n";
}

FreeProws(rowSet);
}

}
}

----------------------------------------------------------->8----------------------------------------------------------

Regards,
Sridhar D

Dmitry Streblechenko wrote:
Please show your code. Are you sure you are
using the
fully
qualified
path,
not just a filename?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi all,
I am trying to load a PST file using
Extended
MAPI
by
configuring
"MSPST MS" service.The PST file get resets
(the
file
size
becomes
32
KB) while I configure the service. When I
open the
message
store,
it
just list some default folders without the
data I
exported.
Should I
set additional attributes while configuring
(now I
set
PR_DISPLAY_NAME
and PR_PST_PATH) or use other API to load my
PST
file
without
affecting
it.

Any help on this will be greatly
appreciated.

Thanks for your time.

Regards,
Sridhar D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top