Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Reading data from INI files
Reading virtual key status values and key names
Retrieving configuration information for the specified server (Win98/Me)
Retrieving the name of the primary domain controller (PDC) and join status information (NT/2000/XP)
Simulating DOEVENTS
Using Multimedia Command Strings to play MIDI files
Winsock: initializing the service in the VFP application
Enumerating MIDI output devices
Obtaining the bounding rectangle for the specified device context
Pocket PC: creating new database in the Object Store and copying Contacts Database records into it
Saving available locale records into a cursor
Accessing a CD device (cdaudio) with Multimedia Command Strings
Current directory of the application
GDI+: converting text strings to images and saving in a graphics file
Managing Cookies
Copying files as a transacted operation (Vista)
How to hide your program from the Close Program dialog (Win9* only)
Retrieving the IP-to-physical address mapping table
Current System information
GDI+: loading image file, drawing on it, saving the result to another file
Retrieving the rectangle area where the mouse cursor is confined
Retrieving window and menu help context identifiers
Using LoadLibrary
Reading Internet Query options
Returning some basic information for the specified INF file

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
 
#DEFINE INFINFO_INF_SPEC_IS_HINF        1
#DEFINE INFINFO_INF_NAME_IS_ABSOLUTE    2
#DEFINE INFINFO_DEFAULT_SEARCH          3
#DEFINE INFINFO_REVERSE_DEFAULT_SEARCH  4
#DEFINE INFINFO_INF_PATH_LIST_SEARCH    5
 
#DEFINE INF_STYLE_NONE     0
#DEFINE INF_STYLE_OLDNT    1
#DEFINE INF_STYLE_WIN4     2
 
*| typedef struct _SP_INF_INFORMATION {
*|   DWORD InfStyle;     //the style of the INF file
*|   DWORD InfCount;     //number of constituent INF files
*|   BYTE  VersionData[ANYSIZE_ARRAY];
*|                       //array to store the INF information
*| } SP_INF_INFORMATION, *PSP_INF_INFORMATION;
 
 
    DECLARE SHORT SetupGetInfInformation IN Setupapi;
        STRING    InfSpec,;
        INTEGER   SearchControl,;
        STRING  @ ReturnBuffer,;
        INTEGER   ReturnBufferSize,;
        INTEGER @ RequiredSize
 
    * put valid INF file name here
    lcFilename = "c:\a\Homepage.inf"
 
    ReturnBuffer = SPACE(250)
    RequiredSize = 0
 
    = SetupGetInfInformation ( lcFilename,;
        INFINFO_INF_NAME_IS_ABSOLUTE,;
        @ReturnBuffer, Len(ReturnBuffer),;
        @RequiredSize)
 
    ReturnBuffer = LEFT(ReturnBuffer, RequiredSize)
 
    ? "INF Style:",;
        getInfStyle (buf2dword (SUBSTR(ReturnBuffer, 1,4)))
    ? "Number of INF files:", buf2dword (SUBSTR(ReturnBuffer, 5,4))
    ? "Version Data:", SUBSTR(ReturnBuffer, 9)
 
* end of main
 
 
FUNCTION  getInfStyle (lnStyle)
    DO CASE
    CASE lnStyle = INF_STYLE_NONE
        RETURN "Unrecognized"
    CASE lnStyle = INF_STYLE_OLDNT
        RETURN "Old WinNT"
    CASE lnStyle = INF_STYLE_WIN4
        RETURN "Win4"
    ENDCASE
RETURN "#unknown INF style#"
 
FUNCTION  buf2dword (lcBuffer)  
RETURN;  
    Asc(SUBSTR(lcBuffer, 1,1)) + ;  
    Asc(SUBSTR(lcBuffer, 2,1)) * 256 +;  
    Asc(SUBSTR(lcBuffer, 3,1)) * 65536 +;  
    Asc(SUBSTR(lcBuffer, 4,1)) * 16777216  
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1772 bytes  
Created: 2001-08-27 12:00:00  
Modified: 2001-09-28 16:45:36  
Visits in 7 days: 77  
Listed functions:
SetupGetInfInformation
Printer friendly API declarations
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.42.16)
8.14 hrs.
Function group: 'Multiple Display Monitors'
9.4 hrs.Function: 'GetUrlCacheEntryInfo'
Function group: 'Internet Functions (WinInet)'
 Function: 'TerminateProcess'
13 hrs.Function: 'GetSystemMenu'
Function group: 'Menu'
 Function: 'GetClientRect'
Function group: 'Window'
 Function: 'ReleaseDC'
1 day(s)Function: 'GetMonitorContrast'
Function group: 'Monitor Configuration (Vista)'
 Function: 'SQLGetConnectAttr'
Function group: 'ODBC API'
 Example: 'Custom GDI+ class'
 Example: 'How to create transparent areas inside a form -- punching holes in the form'
Google
Advertise here!