Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Playing WAV sounds simultaneously
Retrieving configuration information for the specified workstation (Win2000/XP)
How to print picture stored in enhanced-format metafile (*.emf)
Retrieving current settings for an ODBC connection
System and Local Time values
Using Extended MessageBox() Class
Winsock: creating a socket that is bound to a specific service provider
GDI+: Drawing a Pie Chart
Printing text on the client area of the main VFP window
Saving HKEY_LOCAL_MACHINE\\Software\\ODBC Registry Entries to an XML file
Starting external program from VFP and waiting for its termination
Accessing LSA Policy object (Local Security Authority)
Browsing Windows Known Folders (Special Folders)
Storing the environment strings in cursor
Using mailslots to send messages on the network
Winsock: how to retrieve a service information corresponding to a port
Pocket PC: base class
Reading metrics for the currently selected font
Storing screen shot of a form to enhanced metafile (*.emf)
The window and its ancestors
Writing to INI file
Enumerating printer drivers installed
GDI+: Creating thumbnails to preview images in a directory
MapiSendMail class for Visual FoxPro application
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: 58  
    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 (54.234.42.16)
    4 sec.Function: 'ControlService'
    6.88 hrs.Example: 'Converting a hexadecimal string to an integer'
    10.81 hrs.Function: 'SHAddToRecentDocs'
     Function: 'CreatePopupMenu'
    14.5 hrs.Function: 'ImpersonateLoggedOnUser'
    14.51 hrs.Example: 'Form Magnifier'
    15.86 hrs.Function: 'LockServiceDatabase'
     Function: 'NetConnectionEnum'
    17.01 hrs.Function: 'SCardGetProviderId'
     Example: 'Dynamic strings implemented through VFP Custom class'
    Google
    Advertise here!