Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Enumerating network sessions established on a server
Enumerating Volumes and Volume Mounting Points (NTFS)
GDI+: retrieving list of available image encoders and image decoders
How to obtain Content-Type value for a file type from the System Registry
Pocket PC: Folder Viewer
Retrieving list of all active RAS connections
Simple Window Viewer
Testing an ODBC connection for supporting specific functionality
URL: splitting into its component parts
Creating a device context for the specified printer
Creating a unique filename based on existing filename
Drawing icons associated with the VFP main window
GDI+: converting text strings to images and saving in a graphics file
How to display the port-configuration dialog box for a port on the specified server
How to obtain the number of rows affected by remote UPDATE, INSERT or DELETE statement
How to test file attributes (key method for FileExists and DirectoryExists routines)
Obtaining heap handles and enumerating memory blocks for the current VFP session (WinNT only)
Printing text on the client area of the main VFP window
Retrieving configuration information for the specified server (Win98/Me)
Retrieving information about the main VFP window
Retrieving IP statistics for the computer
StrDup returns a pointer to the duplicate of a source VFP string
Using GetSysColor
Winsock: changing the byte ordering
How to Start a Process as Another User (NT/XP/2K)

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:
The following code offers solution, which is similar to Microsoft Knowledge Base Article - 285879: HOWTO: Start a Process as Another User from Visual Basic.

Other code samples you might be interested in:
  • Running external applications from VFP using WinExec
  • Using ShellExecute for performing operations on files
  • Running external applications from VFP using CreateProcess
  • Running an external program from FoxPro and waiting for its termination
  • Running MSDOS Shell as a child process with redirected input and output

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

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    5486 bytes  
    Created: 2003-10-30 14:35:25  
    Modified: 2011-12-10 09:20:22  
    Visits in 7 days: 31  
    Listed functions:
    Printer friendly API declarations
    My comment:
    To start a process as another user, you can use the LogonUser and CreateProcessAsUser Win32 APIs when running Microsoft Windows NT 4.0, or you can use the CreateProcessWithLogonW Win32 API when running Microsoft Windows 2000/XP or later.
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.

    Copyright 2001-2014 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.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (
    1.87 min.Examples
    Page 3
    12.76 hrs.Function: 'FindText'
    16.37 hrs.Example: 'How to empty the Recycle Bin'
     Example: 'Attaching menu to a top-level form'
    16.39 hrs.Example: 'Changing file attributes'
    22.04 hrs.Example: 'Using the DrawText function'
    23.51 hrs.Function: 'CryptGetKeyParam'
    Function group: 'Cryptography Reference'
    23.54 hrs.Function: 'GetIconInfo'
    3 day(s)Function: 'waveOutOpen'
    Function group: 'Windows Multimedia'
     Function: 'NetApiBufferSize'
    Function group: 'Network Management'
    Advertise here!