Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Enumerating connections made to a shared resource for the local computer (WinNT only)
Converting command-line string to a set of Unicode argument strings (WinNT only)
Extended MessageBox Class
Form Magnifier
Retrieving information about the main VFP window
Setting the volume label
Storing the environment strings in cursor
Windows Shell Icons displayed and exported to ICO files (Vista)
A client for testing non-blocking Winsock server
Browsing Windows Known Folders (Special Folders)
Power capabilities of the system: battery, UPS, sleep and hibernation modes, processor throttling
Retrieving configuration information for the specified server (Win2000/XP)
Starting external program from VFP and waiting for its termination
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)
Drawing Windows frame controls using the DrawFrameControl function
How to retrieve network parameters for the local computer (including Host name, Domain name, and DNS Server)
How to empty the Recycle Bin
Reading and setting the priority class values for the current process and thread
Retrieving configuration information for the specified workstation (Win2000/XP)
Retrieving Printer Device Context using PrintDlg function
Shortcut Menu Class
Using the heap of the calling process to allocate memory blocks
Enumerating files opened on the network

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:
Usage:
LOCAL oFiles As TOpenFiles, oFile As TOpenFile
oFiles = CREATEOBJECT("TOpenFiles", "SOME_SERVER")

CREATE CURSOR csFiles (fileid I, permissions I, numlocks I,;
        username C(32), pathname C(250))

FOR EACH oFile IN oFiles
        WITH oFile
                INSERT INTO csFiles (fileid, permissions, numlocks,;
                        username, pathname);
                VALUES (.fileid, .permissions, .numlocks,;
                        FromUnicode(.username),;
                        FromUnicode(.pathname))
        ENDWITH
NEXT

SELECT csFiles
GO TOP
BROWSE NORMAL NOWAIT

See also:
  • FileSystemWatcher ActiveX Control for Visual FoxPro
  • Monitoring changes in a directory

  • Enumerating global and local group accounts on a server
  • Obtaining names of local and global groups for current user
  • How to enumerate, add and delete shares on the local computer
  • Enumerating sessions established on a server

  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    3020 bytes  
    Created: 2001-08-26 12:00:00  
    Modified: 2011-02-16 13:29:32  
    Visits in 7 days: 91  
    Listed functions:
    GlobalSize
    NetApiBufferFree
    NetFileEnum
    Printer friendly API declarations
    My comment:
    May.24, 2007: rewritten from scratch

    Only members of the Administrators or Server Operators local group can successfully execute the NetFileEnum function.

    Here is an example of data this code sample returns:


    The number of file locks in FILE_INFO_3 structure does not relate to whether a VFP table or database open in exclusive or shared mode. This structure member shows zero.

    For RPC communication, the Server service opens a named pipe SRVSVC.

    * * *
    Read RLOCK topic on VFP Wiki for explanation of how VFP locks table records.
    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 (107.22.127.92)
    8.83 hrs.Function: 'GetUserName'
    Function group: 'System Information'
     Function: 'HeapValidate'
    Function group: 'Memory Management'
    9.64 hrs.Function: 'GetTextFace'
     Example: 'Starting an external application in VFP using WinExec'
    13.61 hrs.Example: 'Connecting a local device to a network resource'
     Example: 'Using Font and Text functions'
     Example: 'Setting properties of the window: caption and user-defined value'
    16.4 hrs.Example: 'How to ping a remote site using ICMP API calls'
     Example: 'Using File Mapping for enumerating files opened by Visual FoxPro'
    17.33 hrs.Function: 'GetFileTitle'
    Function group: 'Common Dialog Box'
    Google
    Advertise here!