Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Current keyboard type
How to display Windows On-Screen Keyboard
How to make the caption of a VFP application flashing in the Windows task bar
Quering a waveform-audio input device
Setting the date and time that a file was created
Using MessageBeep
Winsock: resolving an address to a host name
Attaching menu to a top-level form
GDI+: saving image of FoxPro form to graphics file (BMP, GIF, JPG, PNG, TIF)
How to read email messages using Simple MAPI
Listing child windows for the Windows desktop
Simple Window Viewer
The DetectAutoProxyUrl function identifies the auto-config script location
Enumerating print processors and supporting data types installed on the specified server
GDI+: Drawing a Pie Chart
Opening the Page Setup dialog box to specify the attributes of a printed page
Printing text on the client area of the main VFP window
Quering waveform-audio output devices
System Image List Viewer
Using GetBinaryType (WinNT only) to determine the type of an executable file
Using Path functions from Shell Lightweight Utility APIs (shlapi.dll)
Another way to go online (it is not about choosing an ISP)
Displaying dimmed window behind VFP top-level form
Drawing cursors for the classes defined by the system (preregistered): BUTTON, EDIT, LISTBOX etc.
Using the GetLogicalDriveStrings

User rating: 8/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
Versions:
click to open
 
DECLARE INTEGER GetDriveType IN kernel32 STRING nDrive
 
DECLARE INTEGER GetLogicalDriveStrings IN kernel32;
    INTEGER nBufferLength, STRING @lpBuffer
 
LOCAL cBuffer, nBufsize, cName, ch
cBuffer = REPLICATE(CHR(0), 250)
 
nBufsize = GetLogicalDriveStrings(Len(cBuffer), @cBuffer)
cBuffer = PADR(cBuffer, nBufsize)
? cBuffer
 
cName = ""
FOR nBufsize=1 TO Len(cBuffer)
    ch = SUBSTR(cBuffer, nBufsize,1)
    IF ch = Chr(0)
        ? cName, GetDriveType(cName)
        cName = ""
    ELSE
        cName = cName + ch
    ENDIF
ENDFOR
 
 
 

User rating: 8/10 (1 votes)
Rate this code sample:
  • ~
525 bytes  
Created: 2001-07-12 12:00:00  
Modified: 2005-12-12 11:26:38  
Visits in 7 days: 64  
Listed functions:
GetDriveType
GetLogicalDriveStrings
Printer friendly API declarations
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.67.55)
3 sec.Function: 'waveInClose'
Function group: 'Windows Multimedia'
6.74 hrs.Function: 'CoTaskMemFree'
Function group: 'COM'
15.83 hrs.Function: 'SQLFreeHandle'
 Example: 'How to obtain the number of rows affected by remote UPDATE, INSERT or DELETE statement'
19.29 hrs.Example: 'Current keyboard type'
19.86 hrs.Function: 'InternetTimeToSystemTime'
Function group: 'Internet Functions (WinInet)'
21.36 hrs.Examples
 Function: 'waveInGetNumDevs'
 Example: 'Testing an ODBC connection for supporting specific functionality'
21.48 hrs.Function: 'GetMenuItemCount'
Function group: 'Menu'
Google
Advertise here!