Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
CryptoAPI: Collection of Providers class
How to display Windows On-Screen Keyboard
Obtaining addresses for the adapters on the local computer (Win XP/2003/Vista)
Winsock: retrieving information from a host database for a given host name
How to display a dialog box with which the user can add a data source (DSN)
How to retrieve information about a cache entry (Internet Explorer)
How to suspend or hibernate your system
Comparing file times
How to find when the application started
Smart Card Database Query Functions
Attaching menu to a top-level form
Confining Windows calculator inside the VFP main window
Dial the Net Automatically
Displaying Windows shell folders in TreeView control with Visual FoxPro FLL
GDI+: cropping images
Getting a bit more than the _CLIPTEXT offers
How to print picture stored in enhanced-format metafile (*.emf)
Obtaining provider name for a specific type of network
Reading keys in the specified section of the Win.ini file
Retrieving graphic capabilities of default printer
Retrieving the command line for the VFP session
Copying strings through the global memory block
GDI+: rotating images using matrix transformations
How to display the Print property sheet
Displaying the drive type value

User rating: 9/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
Before you begin:
See also:

  • Basic Volume information
  • Setting the volume label
  • Disk in drive A:
  • Obtaining physical parameters for a drive: sectors, clusters, cylinders...
  •  
    #DEFINE DRIVE_UNKNOWN     0
    #DEFINE DRIVE_NO_ROOT_DIR 1
    #DEFINE DRIVE_REMOVABLE   2
    #DEFINE DRIVE_FIXED       3
    #DEFINE DRIVE_REMOTE      4
    #DEFINE DRIVE_CDROM       5
    #DEFINE DRIVE_RAMDISK     6
     
    DECLARE INTEGER GetDriveType IN kernel32 STRING nDrive
     
    DECLARE INTEGER RealDriveType IN shell32;
        INTEGER iDrive, INTEGER fOKToHitNet
     
    LOCAL nIndex, nType
     
    FOR nIndex=Asc("A") TO Asc("Z")
     
        * both functions return identical results
        nType = RealDriveType(nIndex-65, 0)
    *    nType = GetDriveType(Chr(nIndex) + ":")
     
        DO CASE
        CASE nType = DRIVE_REMOVABLE
            ? Chr(nIndex)+":", "removable"
        CASE nType = DRIVE_FIXED
            ? Chr(nIndex)+":", "fixed"
        CASE nType = DRIVE_REMOTE
            ? Chr(nIndex)+":", "remote"
        CASE nType = DRIVE_CDROM
            ? Chr(nIndex)+":", "CDROM"
        CASE nType = DRIVE_RAMDISK
            ? Chr(nIndex)+":", "RAM"
        ENDCASE
    ENDFOR
     
     
     

    User rating: 9/10 (1 votes)
    Rate this code sample:
    • ~
    856 bytes  
    Created: 2001-07-12 12:00:00  
    Modified: 2005-03-07 13:16:59  
    Visits in 7 days: 52  
    Listed functions:
    GetDriveType
    RealDriveType
    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 (184.72.91.94)
    21.25 min.Function: 'WriteFile'
    21.3 min.Example: 'Using MessageBeep'
    5.96 hrs.Function: '_lclose'
     Example: 'Adding and deleting Scheduled Tasks using NetScheduleJob API functions'
    Google
    Advertise here!