 |
MAPILogon ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The MAPILogon function begins a Simple MAPI session, loading the default message store and address book providers. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
ULONG FAR PASCAL MAPILogon(
ULONG ulUIParam,
LPTSTR lpszProfileName,
LPTSTR lpszPassword,
FLAGS flFlags,
ULONG ulReserved,
LPLHANDLE lplhSession
)
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER MAPILogon IN mapi32;
INTEGER ulUIParam,;
STRING lpszProfileName,;
STRING lpszPassword,;
INTEGER flFlags,;
INTEGER ulReserved,;
INTEGER @lplhSession
|
 |
 |
 |
| Parameters: |
 |
ulUIParam
[in] Parent window handle or zero, indicating that if a dialog box is displayed, it is application modal.
lpszProfileName
[in] Pointer to a null-terminated profile name string, limited to 256 characters or less. This is the profile to use when logging on.
lpszPassword
[in] Pointer to a null-terminated credential string, limited to 256 characters or less.
flFlags
[in] Bitmask of option flags.
ulReserved
Reserved; must be zero.
lplhSession
[out] Simple MAPI session handle. |
 |
 |
| Return value: |
 |
| Returns SUCCESS_SUCCESS (0) in case if the call succeeded and a Simple MAPI session was established; or one of the predefined MAPI_E_* values otherwise. |
 |
 |
| Usage: |
 |
hSession = 0
nResult = MAPILogon(0, "", "",;
BITOR(MAPI_LOGON_UI, MAPI_NEW_SESSION),;
0, @hSession)
* ...
= MAPILogoff(m.hSession, 0,0,0)
|
 |
 |
| My comment: |
 |
In my testing this function used to change active directory to the one of the Outlook Express -- default MAPI provider on my computer.
MSDN: Determine that Simple MAPI is available by checking the [MAIL] section in the computer"s WIN.INI file for the MAPI entry. This entry will have a value of 1 if Simple MAPI is installed, or 0 if uninstalled.
Check example in this reference: Reading keys in the specified section of the Win.ini file -- this is how to test Simple MAPI availabliilty on the local computer. |
 |
 |
| Word Index links for the MAPILogon : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-11-13 18:40:10 | | Modified: | 2007-06-11 22:10:16 | Visited in last 7 days: 31 |