Exception generated from redemption on W2k Server - debug-window-output.txt (0/1)

S

Scott T

Hello all,

I have some code which runs successfully on 2 W2k professional boxes,
running both Office 2000 (SP3) and Office 2002 (SP4). But when the
same code is run on a W2k server (Office 2002 SP4, Exchange 2000) it
generates an exception in the import call. I have downloaded and tried
the latest redemption dll (282) and still the same result. I have also
recompiled exe on the target machine. The W2k pro machine running
office 2002 (SP4) had OFFICE 2000 installed previously and so uses the

#import "\Program Files\Microsoft Office\Office\MSOUTL9.olb"
rename_namespace("Outlook"), named_guids, raw_interfaces_only
using namespace Outlook;

statement rather than the

#import "\Program Files\Microsoft Office\Office10\MSOUTL.olb"
rename_namespace("Outlook"), named_guids, raw_interfaces_only

statement used on the W2k server.

I have remove error checking and code irrelevant to the question .
filename and path are valid.



_ApplicationPtr pApp = NULL;
pApp.CreateInstance(__uuidof(Application));
_NameSpacePtr pNameSpace;
pApp->get_Session(&pNameSpace);
MAPIFolderPtr pFolder;
pNameSpace->GetDefaultFolder(Outlook::blush:lFolderDrafts, &pFolder);
_ItemsPtr pItems;
pFolder->get_Items(&pItems);
CComVariant var(6);
IDispatchPtr pDispPtr;
pItems->Add(var, &pDispPtr);

// create Redemption object
ISafeMailItemPtr itemPtr1;
hr = itemPtr1.CreateInstance(__uuidof(SafeMailItem));
itemPtr1->Item = pDispPtr;

CComBSTR fileName(CService::m_WorkingDir);
fileName.Append(_T("*.msg"));

if((hFindFile = FindFirstFile(fileName, &fileData))!=
INVALID_HANDLE_VALUE)
{
CComBSTR msgFileName(CService::m_WorkingDir);
msgFileName.Append((LPCTSTR) fileData.cFileName);
_bstr_t fname(msgFileName);

// load msg file in redemption obj
---> itemPtr1->Import(fname, 3);

Microsoft C++ Exception generated from the Import call
First-chance exception in SMService.exe (KERNEL32.DLL): 0xE06D7363:
Microsoft C++ Exception.

I have attached the output from the debug paine of MSDev 6 restricted
to the exception.


I did try creating an instance MAPIUtils before creating the
ISafeMailItemPtr instance as documented on redemption web site but to
no avail. Could anyone advise me of any possible leads to resolve this
problem as I have no more ideas and I do need to run on W2K Server.
Is it my code, the W2K OS, support applications (office, MAPI) or is
it a redemption issue.

Any help would be much appreciated.

regards and thanks in advance
S.
 
K

Ken Slovak - [MVP - Outlook]

Installing Outlook on an Exchange machine is not a supported configuration.
If you need to run code on the Exchange server you should be using CDO or
some other supported interface.
 
S

Scott T

Thank you Ken
I may have wasted a some time but you saved me wasting a lot more.
Are the supported configurations documented anywhere ?
 
K

Ken Slovak - [MVP - Outlook]

It's never been officially supported but some people have had success with
installing Outlook 2000 on Exchange 5.5. Even with that the order of
installation is important since the MAPI*.DLL files that are installed by
Exchange and by Outlook aren't compatible, and the versions of CDO 1.21
installed are different also. If I have to run code on the server I never
use Outlook code, I use CDO 1.21 code or something else.
 

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

Similar Threads


Top