Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Retrieving the System Time adjustment
Simple MAPI: how to pick an email recipient from Outlook Express address book
Accessing a CD device (cdaudio) with Multimedia Command Strings
GetFileOwner - Get the owner of an NTFS file
How to save registry key including its subkeys and values to a file
Obtaining list of tables stored in an ODBC Data Source
Retrieving file information for the VFP executable running
Creating two-byte hashes for a list of URLs
How to play a waveform sound (a WAV file in particular)
How to intercept window messages sent to VFP form
Pocket PC: modifying keys in the System Registry
Starting a dialog box for connecting to network resources and passing input parameters
Copying files as a transacted operation (Vista)
How to enumerate terminal servers within the specified Windows domain
Using Beep and Sleep functions to make the old tin buzz sing (WinNT only?)
Using Multimedia Command Strings to play MIDI files
GDI+: enumerating fonts installed on the system
Determining whether or not the system is connected to the Internet
GDI+: loading image file, drawing on it, saving the result to another file
Converting characters to upper or lower case
CryptoAPI: retrieving list of providers
Listing device drivers in the system: load addresses, names
Terminating all running applications from a VFP program
Extended OS Version info
List of ODBC drivers installed (read from the [ODBC Drivers] section)

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
Before you begin:
[My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]
 
LOCAL cBuffer, nBufsize, ii, ch, cName
nBufsize = 16384
cBuffer = Repli(Chr(0), nBufsize)
 
DECLARE INTEGER SQLGetInstalledDrivers IN odbccp32;
    STRING @lpszBuf, INTEGER cbBufMax, INTEGER @pcbBufOut
 
IF SQLGetInstalledDrivers(@cBuffer, nBufsize, @nBufsize) = 0
    RETURN
ENDIF
 
CREATE CURSOR csResult (drvname C(100))
cBuffer = SUBSTR(cBuffer,1,nBufsize)
cName = ""
 
FOR ii=1 TO nBufsize
    ch = SUBSTR(cBuffer, ii,1)
    IF ch = Chr(0)
        INSERT INTO csResult VALUES (m.cName)
        cName = ""
    ELSE
        cName = cName + ch
    ENDIF
ENDFOR
GO TOP
BROWSE NORMAL NOWAIT
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
579 bytes  
Created: 2003-01-29 11:02:50  
Modified: 2003-01-29 11:03:27  
Visits in 7 days: 28  
Listed functions:
SQLGetInstalledDrivers
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.226.5.29)
1.61 hrs.Example: 'GetFocus returns a HWND value'
1.62 hrs.Example: 'GDI+ fun: roach-infested desktop'
 Example: 'Using the ChooseColor function'
3.01 hrs.Function: 'SetEnvironmentVariable'
Function group: 'Process and Thread'
 Function: 'GetFileVersionInfo'
 Example: 'Obtaining I/O counts for the current process'
6.12 hrs.Function: 'NetWkstaUserEnum'
Function group: 'Network Management'
 Function: 'CreateNamedPipe'
Function group: 'Pipe'
 Example: 'Adding and deleting User Accounts'
14.68 hrs.Function: 'GetKeyboardLayoutName'
Function group: 'Keyboard Input'
Google
Advertise here!