WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

MAPI

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Mapi fails when run as a service

 Keywords: MAPI NT Service 703 

Question:

Trying to use MAPI (wwmap34i.dll, 13.12.2000, v27006) in a service process: MAPI logon fails with WIL code 703. When run interactively, no problem.

Platform: NT 4.0.1381 sp5, Outlook 2000, Exchange Server 5.5.

Any ideas why?

Answer:

Apparently the existing MAPI Extender functions are not designed to be able to run as a NT service. I did some further research into running a MAPI client from a NT Service.....

To enable client applications that are written as Windows NT services to operate with MAPI-compliant service providers, MAPI imposes several limitations and requirements. Simple MAPI, CMC,and MAPI clients have the following limitations:

They cannot allow a user interface. {Our Mapi Extender function mlogon allows user interface}

They can only send messages through a tightly coupled message store and transport provider. In addition, MAPI clients can only send and receive messages using the Microsoft Exchange Server or another server-based transport provider. Because of identity and security issues between client applications and the MAPI spooler, most transport providers are not supported in a Windows NT service.

Windows NT service clients written with the MAPI client interface have a few additional requirements:

They must set the MAPI_NO_MAIL flag in the call to MAPILogonEx. Other types of Windows NT service clients need not set a flag for logon because it is automatically set by MAPI. {Our Mapi Extender uses simple MAPILogon not MapiLogonEX}

They must add the service's account to the group of accounts called Administrators on the machine that the service is using. This is necessary for profile access. If the account does not belong to this Administrators group of accounts, the MAPIInitialize function will fail when called. {Currently there is no MAPI Initialize function available in the MAPI Extender}

For more details see Microsofts web site at....

http://msdn.microsoft.com/library/en-us/mapi/html/_mapi1book_windows_nt_service_client_applications.asp?frame=true

You could potentially communicate directly with Mapi dlls, you might search our tech support database for the key word 'MAPI', there is some code that might help get you started....

NOTE: THIS WILL NOT BE EASY

http://msdn.microsoft.com/library/en-us/mapi/html/_mapi1book_mapi_functions_and_related_macros.asp?frame=true


Article ID:   W14770
File Created: 2017:08:29:10:48:28
Last Updated: 2017:08:29:10:48:28