Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
The DetectAutoProxyUrl function identifies the auto-config script location
Using the GetTempFileName
Using the MessageBox Win32 function
Comparing dimensions of the VFP main window with _SCREEN properties
Creating a directory on the FTP
Obtaining I/O counts for the current process
Enumerating ODBC Data Sources available on the local computer
Enumerating Volumes and Volume Mounting Points (NTFS)
How to perform Base64 encoding/decoding using Cryptography API Functions
Obtaining heap handles and enumerating memory blocks for the current VFP session (WinNT only)
Pocket PC: Folder Viewer
Retrieving Network Provider information
Using InternetGoOnline function
Wininet last error description
Enumerating MIDI output devices
Enumerating Processes -- Win9*
Get the power status of your laptop computer
Locking the workstation
Reading parameters of streams in AVI file
Retrieving current settings for an ODBC connection
Starting a dialog box for connecting to network resources and passing input parameters
Storing registration key in the resources of an executable file
Using an Event Object. Part A: running an application that creates an Event object
Converting characters in a URL into corresponding escape sequences and backwards
Wininet last error description

User rating: 10/10 (1 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
 
#DEFINE ERROR_INSUFFICIENT_BUFFER   122
 
    DECLARE SHORT InternetGetLastResponseInfo IN wininet;
        INTEGER @ lpdwError,;
        STRING  @ lpszBuffer,;
        INTEGER @ lpdwBufferLength
 
    DECLARE INTEGER GetLastError IN kernel32 
 
    LOCAL lpdwError, lpdwBufferLength, lpszBuffer, lnResult
 
    lpdwError = 0
    lpdwBufferLength = 250
    lpszBuffer = SPACE(lpdwBufferLength)
 
    lnResult = InternetGetLastResponseInfo (@lpdwError,;
            @lpszBuffer, @lpdwBufferLength)
 
    IF lnResult = 0 And GetLastError() = ERROR_INSUFFICIENT_BUFFER
        lpszBuffer = SPACE(lpdwBufferLength)
        lnResult = InternetGetLastResponseInfo (@lpdwError,;
                @lpszBuffer, @lpdwBufferLength)
    ENDIF
 
    IF lnResult = 1
        ? "Error:", lpdwError
        ? "Message:", LEFT(lpszBuffer, lpdwBufferLength)
    ELSE
        ? "No response is available"
    ENDIF
RETURN
 
 

User rating: 10/10 (1 votes)
Rate this code sample:
  • ~
822 bytes  
Created: 2001-08-17 12:00:00  
Modified: 2001-09-28 16:45:32  
Visits in 7 days: 73  
Listed functions:
GetLastError
InternetGetLastResponseInfo
Printer friendly API declarations
My comment:
This procedure retrieves the last Microsoftฎ Win32ฎ Internet function error description or server response on the thread calling it.

Do not expect any valid response of this function unless you have a connection to a server.

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.16.108.167)
3 sec.Function: 'LsaClose'
6 sec.Function: 'CopyMemory'
Function group: 'Memory Management'
Google
Advertise here!