Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Displaying printer-properties Property Sheet for the specified printer
Reading and setting Environment variables
Retrieving country-specific dialing information from the Windows Telephony list of countries
The DetectAutoProxyUrl function identifies the auto-config script location
How to control Adobe Reader 9.0 (SDI mode) from VFP application
Setting the date and time that a file was created
Using named pipes for interprocess communication
Winsock: resolving an address to a host name
Yet another modal dialog: now HTML-based
Converting a hexadecimal string to an integer
Drawing standard Windows icons
How to download this reference`s archive through WinInet functions using InternetOpenUrl
How to find which fonts Windows uses for drawing captions, menus and message boxes
How to make the caption of a VFP application flashing in the Windows task bar
Locking the workstation
Moving shortcut to a specified position on the Windows Desktop
Winsock: reading and setting socket options
Converting an integer value to a hexadecimal string
Enumerating printer drivers installed
Finding out if the current user is the Guest account
GDI+: sending image of FoxPro form to printer
How to browse and connect to printers on a network (WinNT)
Reading security permissions for NTFS files and folders
Reading VFP settings from the Windows Registry
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: 90  
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 (54.234.126.92)
4.76 hrs.Example: 'How to view system icons for the classes installed on the local machine'
4.88 hrs.Example: 'Mapping and disconnecting network drives'
7.81 hrs.
15.19 hrs.Function: 'PostQuitMessage'
Function group: 'Message and Message Queue'
19.99 hrs.Function: 'waveOutGetNumDevs'
 Example: 'Retrieving graphic capabilities of default printer'
20.58 hrs.Function: 'GetFullPathName'
Function group: 'File Management'
20.59 hrs.Function: 'GetWindowRect'
21.04 hrs.Example: 'Placing On-screen Alert on top of all windows'
21.05 hrs.Example: 'Building a tree of subdirectories for a given path using FindFile functions'
Google
Advertise here!