Using Win32 functions in Visual FoxPro Image Gallery
Simple MAPI
..msdn
MAPIAddress
MAPIFindNext
MAPIFreeBuffer
MAPILogoff
MAPILogon
MAPIReadMail
MAPIResolveName
MAPISendDocuments
MAPISendMail
Code examples:
How to read email messages using Simple MAPI
Open and close a Simple MAPI Session
Sending email messages with Simple MAPI
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:
How to read email messages using Simple MAPI
Sending email messages with Simple MAPI
Open and close a Simple MAPI Session
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-11-13 18:40:10
Modified: 2007-06-11 22:10:16
Visited in last 7 days: 65
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.227.127.109)
16 sec.Function: 'GdipCreateBitmapFromHICON'
32 sec.Function: 'Beep'
47 sec.Function: 'CeRegDeleteKey'
1.02 min.Function: 'EnumDeviceDrivers'
1.27 min.Function: 'CeFindFirstDatabaseEx'
1.52 min.Function: 'GetProcessHeaps'
1.77 min.Function: 'CryptExportKey'
2 min.Function: 'TextOut'
2.27 min.Function: 'SetFileAttributes'
2.55 min.Function: 'CeRegQueryInfoKey'
Google
Advertise here!