Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Custom GDI+ class
Converting Unicode data from the Clipboard to a character string using a given code page
Custom FTP Class for Visual FoxPro application
Custom HttpRequest class (WinINet)
Displaying bitmap using the AlphaBlend function
Splash Screen for the VFP application
Establishing connection using the SQLDriverConnect
Displaying animated images on FoxPro form with BitBlt and StretchBlt functions
How to put a vertical text scrolling on the form (a movie cast)
How to make a VFP form fading out when released (GDI+ version)
Using FlashWindowEx to flash the taskbar button of the VFP application
How to make a VFP form fading out when released (GDI version)
How to create non-blocking Winsock server
Winsock: sending email messages (SMTP, port 25)
Using WM_COPYDATA for interprocess communication (VFP9)
Creating a mailslot
Peer-to-peer LAN messenger built with Mailslot API functions
Detecting changes in connections to removable drives (VFP9)
Class for sound recording
How to print a bitmap file
Sending a standard message with one or more attached files using default email client
Open and close a Simple MAPI Session

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
 
DO declare
 
#DEFINE MAPI_LOGON_UI 1
#DEFINE MAPI_NEW_SESSION 2
#DEFINE MAPI_FORCE_DOWNLOAD 0x1000
#DEFINE MAPI_PASSWORD_UI 0x20000
 
#DEFINE SUCCESS_SUCCESS 0
#DEFINE MAPI_E_USER_ABORT 1
#DEFINE MAPI_E_FAILURE 2
#DEFINE MAPI_E_LOGIN_FAILURE 3
#DEFINE MAPI_E_INSUFFICIENT_MEMORY 5
#DEFINE MAPI_E_TOO_MANY_SESSIONS 8
 
    LOCAL lnResult, hSession, lcStoredPath
    lcStoredPath = SYS(5) + SYS(2003)
    hSession = 0
 
    lnResult = MAPILogon(0, "", "",;
        BITOR(MAPI_LOGON_UI, MAPI_NEW_SESSION),;
        0, @hSession)
 
    IF lnResult = SUCCESS_SUCCESS
        ? "MAPI Session handle:", hSession
        = MAPILogoff(hSession, 0,0,0)
    ELSE
        ? "Not logged:", lnResult
    ENDIF
 
    SET DEFAULT TO (m.lcStoredPath)
 
PROCEDURE declare
    DECLARE INTEGER MAPILogon IN mapi32;
        INTEGER ulUIParam, STRING lpszProfileName,;
        STRING lpszPassword, INTEGER flFlags,;
        INTEGER ulReserved, INTEGER @lplhSession
 
    DECLARE INTEGER MAPILogoff IN mapi32;
        INTEGER lhSession, INTEGER ulUIParam,;
        INTEGER flFlags, INTEGER ulReserved
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1022 bytes  
Created: 2001-11-13 18:38:48  
Modified: 2006-05-30 22:53:29  
Visits in 7 days: 53  
Listed functions:
MAPILogoff
MAPILogon
Printer friendly API declarations
My comment:
Notice the saving and restoring of active directory.
Word Index links for this example:
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 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.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (184.73.74.47)
5.87 hrs.Example: 'Printing Image File, programmatically set print page orientation to landscape'
12.4 hrs.Function: 'WSARecv'
Function group: 'Windows Sockets 2 (Winsock)'
12.41 hrs.Function: 'listen'
Google
Advertise here!