Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Enumerating data formats currently available on the clipboard
Custom GDI+ class
Mapping and disconnecting network drives
Winsock: sending email messages (SMTP, port 25)
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Converting Unicode data from the Clipboard to a character string using a given code page
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
How to display the Properties dialog box for a file (ShellExecuteEx)
Disk in drive A:
Enumerating network resources
Detecting changes in connections to removable drives (VFP9)
How to download a file from the FTP server using FtpGetFile
Splash Screen for the VFP application
Using Font and Text functions
Using EnumPrinters function to enumerate locally installed printers
How to play AVI file on the _screen
Retrieving the name of the network resource associated with a local device
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Creating a console window for Visual FoxPro application
Creating irregularly shaped FoxPro form using transparency color key
How to put a horizontal text scrolling on the form (a news line)
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: 100  
    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 (54.234.180.187)
    5.34 hrs.Example: 'Using named pipes for interprocess communication'
     Example: 'How to view icons stored in executable files (Icon Viewer) - II'
    8.72 hrs.Function: 'StrDup'
     Example: 'Customizing the frame of top-level form: removing the standard frame (VFP9, Vista)'
    10.68 hrs.Function: 'CeOpenDatabase'
    Function group: 'Remote Application Programming (RAPI)'
     Function: 'SQLFetch'
    Function group: 'ODBC API'
    12.51 hrs.Function: 'LsaFreeMemory'
     Function: 'StrFromTimeInterval'
    20.33 hrs.Example: 'Retrieving the name of the primary domain controller (PDC) and join status information (NT/2000/XP)'
     Example: 'Disk in drive A:'
    Google
    Advertise here!