PC MAPI: Suppressing the Default Logon Dialog Box

Q135704


The information in this article applies to:


SUMMARY

When you use the MSMAPI.VBX control to logon Mail for PC Networks, you can suppress the default logon dialog box by setting the following:

However, when the password property is null, the following error will occur:
2003 (Login Failure)


MORE INFORMATION

Make sure that the entries for the user's name and password are present in the MSMAIL.INI.

NOTE: The Password entry does not need any characters after it.

[Microsoft Mail]
Login=username
Password=
The code below duplicates the situation when the error occurs with the Admin mailbox and a blank password.

   myform.MapiSess.UserName = "admin"
   myform.MapiSess.Password = ""
   myform.MapiSess.NewSession = True
   myform.MapiSess.LogonUI = False
   myform.MapiSess.Action = SESSION_SIGNON 
Unfortunately, a null password can be used only if there is an existing session or the LogonUI property is set to True. If there is an existing session, you can pass nulls for both the name and password, and you will be returned a handle to the existing session. If there is no existing session, and you set LogonUI property to true, MAPILogon will generate the standard Sign-In dialog box.

Additional query words: 3.00 3.20 Visual Basic blank MAPI_LOGON_UI

Keywords :
Issue type :
Technology : kbMailSearch kbZNotKeyword3 kbMailPCN320 kbMailPCN300


Last Reviewed: October 28, 1999
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.