Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Setting the volume label
Creating a unique filename based on existing filename
Creating a window using CreateWindowEx function
Enumerating ports that are available for printing on a specified server
How to download a file from HTTP server using URL Monikers functions
How to draw custom Window Caption on FoxPro form
Loading a string resource from an executable file
Starting an external application in VFP using WinExec
Using Change Notification Objects to monitor changes to the printer or print server
Using FrameRgn for displaying system colors
A class that encrypts and decrypts files using Cryptography API Functions
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
Exporting DLL icon resources as .ICO files
How to delete all print jobs for a printer
Pocket PC: custom RAPI class for operating with the System Registry
Storing registration key in the resources of an executable file
Creating a mailslot
Displaying the associated icons and descriptions for files and folders
Form Magnifier
How to enumerate cookies and URL History entries in the cache of the local computer
How to enumerate, add and delete shares on the local computer (WinNT/XP)
Reading security permissions for NTFS files and folders
Scanning the hierarchy of child windows down from the main VFP window
Using the Semaphore object
Setting the volume label

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:
See also:

  • Displaying the drive type value
  • Basic Volume information
  • Disk in drive A:
  • Obtaining physical parameters for a drive: sectors, clusters, cylinders...
  • DECLARE INTEGER GetLastError IN kernel32
    
    DECLARE INTEGER SetVolumeLabel IN kernel32;
        STRING lpRootPathName, STRING lpVolumeName
    
    IF SetVolumeLabel ("A:\", "VolumeA") = 0
        *    3 = The system cannot find the path specified
        *    5 = Access is denied
        *   21 = The device is not ready
        *  123 = ERROR_INVALID_NAME
        * 1235 = The request was aborted
        ? "Error code:", GetLastError()
    ENDIF
    
    
    

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    402 bytes  
    Created: 2001-09-18 12:00:00  
    Modified: 2005-03-07 13:18:46  
    Visits in 7 days: 78  
    Listed functions:
    GetLastError
    SetVolumeLabel
    Printer friendly API declarations
    My comment:
    In some cases you have unspecified error 0, e.g. if the floppy is write-protected.
    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-2018 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.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (54.227.17.101)
    11 sec.Function: 'InetIsOffline'
    Function group: 'Shell Functions'
    20 sec.Example: 'Obtaining names and positions for shortcuts located on the Windows Desktop'
    33 sec.Function: 'getsockopt'
    Function group: 'Windows Sockets 2 (Winsock)'
    43 sec.Function: 'GdipCloneBitmapArea'
    Function group: 'GDI+ Bitmap'
    51 sec.Function: 'LockResource'
    Function group: 'Resource'
    1.17 min.Function: 'CeEnumDBVolumes'
    Function group: 'Remote Application Programming (RAPI)'
    1.32 min.Example: 'GDI+: converting text strings to images and saving in a graphics file'
    1.48 min.Function: 'CeWriteFile'
    Function group: 'Remote Application Programming (RAPI)'
    1.67 min.Function: 'waveOutSetVolume'
    Function group: 'Windows Multimedia'
    1.85 min.Function: 'waveOutGetDevCaps'
    Function group: 'Windows Multimedia'
    Google
    Advertise here!