Article ID: 128963
Article Last Modified on 10/30/2006
Sub Form_Load ()
' *** ***
' *** Start sample login code ***
' *** ***
rc& = MAPILogon(0&, "", "", 0&, 0&, lhSession&)
If rc& <> SUCCESS_SUCCESS Then
MsgBox "Login Error or session does not exist = " + Str(rc&)
' No session exists so lets pass info to create one
rc& = MAPILogon(0&, "admin", "password", 0&, 0&, lhSession&)
If rc& <> SUCCESS_SUCCESS Then
MsgBox "Failure to login at all"
End
Else
MsgBox "Successfully logged in as admin"
' Send important message
rc& = MAPILogoff(lhSession&, 0&, 0&, 0&)
End
End If
Else
MsgBox "Mail session currently established"
' Send important message
rc& = MAPILogoff(lhSession&, 0&, 0&, 0&)
End If
End
End Sub
'*** end code fragment ***'
Additional query words: 3.00 3.20 MS Mail Technical Reference
Keywords: KB128963