Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Retrieving size of a remote file
Setting the mouse capture to the specified window
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
Retrieving list of files on the FTP directory
Retrieving long values associated with the class of the VFP window
Using Font and Text functions
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
CryptoAPI: retrieving list of providers
Displaying printer-properties Property Sheet for the specified printer
Enumerating the subkeys for a given registry key
GDI+: Scrolling through large image using the mouse
How to hide your program from the Close Program dialog (Win9* only)
How to initiate System shutdown
How to retrieve number of objects in the Recycle Bin
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
FindText -- the hopeless and useless Common Dialog
GDI+ fun: roach-infested desktop
How to empty the Recycle Bin
How to find the application associated with a file name
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: 50  
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 (107.21.156.140)
4 sec.
Function group: 'Memory Management'
13.48 min.Example: 'How to get Special Folders paths'
1.34 hrs.
Function group: 'Terminal Services'
 Example: 'Obtaining addresses for the adapters on the local computer (Win XP/2003/Vista)'
Google
Advertise here!