Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Using mailslots to send messages on the network
Yet another modal dialog: now HTML-based
Converting a decimal string to an integer
GDI+: printing image file
How to display a Task Dialog (Vista)
How to enumerate sessions and processes on a specified terminal server
Retrieving list of files on the FTP directory
Retrieving long values associated with the class of the VFP window
Using Font and Text functions
CryptoAPI: retrieving list of providers
Enumerating the subkeys for a given registry key
How to hide your program from the Close Program dialog (Win9* only)
How to initiate System shutdown
Reading and setting system access privileges for the current process
Setting properties of the window: caption and user-defined value
Writing entries to custom Event Log
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
FindText -- the hopeless and useless Common Dialog
GDI+ fun: roach-infested desktop
GDI+: Scrolling through large image using the mouse
How to empty the Recycle Bin
How to retrieve number of objects in the Recycle Bin
Reading and setting Environment variables
Changing file attributes
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: 74  
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 (107.20.7.65)
4 sec.Example: 'Using the CreateFile'
Google
Advertise here!