Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Accessing LSA Policy object (Local Security Authority)
Converting twips to pixels and vice versa
Creating a unique filename based on existing filename
Displaying standard progress dialog box when copying files
GDI+: creating scaled copy of image file
MapiSendMail class for Visual FoxPro application
Retrieving geometrical parameters of the system desktop window
Using FillMemory
Converting an HTTP time/date string to a SYSTEMTIME structure
Converting command-line string to a set of Unicode argument strings
DiskFreeSpace class
Displaying OS Memory Status
Drawing cursors for the classes defined by the system (preregistered): BUTTON, EDIT, LISTBOX etc.
How to make the caption of a VFP application flashing in the Windows task bar
How to obtain Content-Type value for a file type from the System Registry
Quering a waveform-audio input device
Retrieving information about the main VFP window
Retrieving the interface–to–IP address mapping table
Using the ChooseColor function
Another way to go online (it is not about choosing an ISP)
How to access a file using not its name but an alias (hard link)
Locking mouse and keyboard input for the VFP application
MSMQ: how to open a queue
Obtaining addresses for the adapters on the local computer (Win XP/2003/Vista)
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: 66  
    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-2017 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.36), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (
    10 sec.Function: 'CreateWindowEx'
    22 sec.Function: 'GlobalAlloc'
    Function group: 'Memory Management'
    32 sec.Example: 'How to retrieve the number of objects stored in the Recycle Bin'
    43 sec.Function: 'CeRapiGetError'
    Function group: 'Remote Application Programming (RAPI)'
    54 sec.Function: 'NetShareAdd'
    Function group: 'Network Management'
    1.05 min.Function: 'GetWindowLong'
    Function group: 'Window Class'
    1.23 min.Example: 'Using WM_COPYDATA for interprocess communication (VFP9)'
    1.42 min.Example: 'Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)'
    1.58 min.Example: 'Accessing Adobe Reader 7.0 main menu from VFP application'
    1.77 min.Function: 'NetUserGetLocalGroups'
    Function group: 'Network Management'
    Advertise here!