1. MAPILogonEx and NT Service
Hi All,
My task is to log on to MAPI within NT service and still be able to send/receive mail using non Microsoft Exchange Server transports (like Internet Mail, MS Mail & so on)
1. My MAPI application is written as a NT service. I work with NT 4.0 SP4, Exchange Server 5.5 and Outlook 98.
I have no problems when it's running as application (not as service).
2. When I logon to MAPI with Exchange Server Transport installed, it is OK.
3. When I logon to MAPI from service when Outlook 98 is running, it is OK too (user is logged on and Outloook is running - i.e. MAPI spooler is running too).
4. When I am trying to logon to MAPI from service without Exchange Server transport installed in profile - the service hangs in MAPILogonEx function and MAPI spooler doesn't run. I don't add to dwFlag MAPI_NO_MAIL because I want send and receive any messages.
My version of Mapi32.dll is 5.5.2174.0.
I have read all related articles from MAPI developers forum and didn't find an answer that help me solve my problem.
Any help is greatly appreciated,
Ilia
VariCom Technologies Ltd.
My code is following:
ULONG dwFlag = 0;
if ( m_bService )
{
dwFlag = MAPI_NT_SERVICE;
dwFlag |= MAPI_MULTITHREAD_NOTIFICATIONS;
MAPIINIT_0 MAPIINIT= { 0, dwFlag};
if( MAPIInitialize ( &MAPIINIT) )
{
return;
String Profile = theApp . GetProfileName ();
if( Profile . IsEmpty () )
{
if( ! GetDefaultProfileName ( Profile ) )
{
return -1;
lstrcpy ( theApp . GetProfileName (), Profile ) ;
dwFlag = MAPI_EXTENDED | MAPI_LOGON_UI | MAPI_EXPLICIT_PROFILE | MAPI_NEW_SESSION;
if ( m_bService )
{
dwFlag = MAPI_NT_SERVICE | MAPI_USE_DEFAULT | MAPI_NEW_SESSION | MAPI_EXTENDED;
if( MAPILogonEx(NULL, theApp . GetProfileName (),NULL,dwFlag,& pMapiSession) != S_OK)
{
return -1;
2. urgent: outgoing email probs
3. listing and possibly reading a users mail without logging on as the user
4. OWA Configuration
5. delete user mailbox without deleting user account
6. Exchange2000 restore does not start
7. Interactive script agent, how?
8. pop 3 connection from MS internet mail client
9. Build interactive toons online 2646
10. EAA Interactive error #430
11. Exchange Archiving Agent Interactive Client
12. Interactive Profiles
13. HELP: How to MAPILogonEx to a specific profile without UI to HrOpenExchangePrivateStore from a remote Exchange 2000 Server?