Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Creating hash values for the list of names
DiskFreeSpace class
GDI+: converting image file to another graphics format
Using Custom FTP class (DEFINE CLASS ftp As Custom)
Accessing a CD device (cdaudio) with Multimedia Command Strings
Accessing the list of Windows Recent Documents
Memory usage info for current VFP session (WinNT only)
Retrieving default spooling directory name
List of addresses in the AutoDial mapping database
Retrieving the priority class for the current process
Extracting the name and extension parts of a path string
GetProcessVersion points at target OS
Retrieving long values associated with the class of the VFP window
Pocket PC: creating new database in the Object Store and copying Contacts Database records into it
Retrieving the IP-to-physical address mapping table
Basic Volume information
Copying files as a transacted operation (Vista)
Reading keys in the specified section of the Win.ini file
Retrieving the name of the primary domain controller (PDC) and join status information (NT/2000/XP)
Using LoadLibrary
Validating the heap of the calling process
WAV file recorder
Creating two-byte hashes for a list of URLs
Enumerating files opened on the network
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: 35  
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 (50.19.155.235)
9.32 min.Function: 'CryptGetProvParam'
Function group: 'Cryptography Reference'
9.37 min.Function: 'PathGetDriveNumber'
Function group: 'Shell Lightweight Utility APIs -- Path Functions'
4.79 hrs.Function: 'CloseHandle'
6.9 hrs.Function: 'InternetGoOnline'
Function group: 'Internet Functions (WinInet)'
 Example: 'Finding the path to the VFP executable running'
8.63 hrs.Example: 'How to control Adobe Reader 9.0 (SDI mode) from VFP application'
9.96 hrs.Example: 'Minimizing all running applications'
9.97 hrs.Function: 'EnumPrinterDrivers'
Function group: 'Printing and Print Spooler'
12.17 hrs.Example: 'Displaying standard progress dialog box when copying files'
 Example: 'Reading entries from Event logs'
Google
Advertise here!