Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Obtaining provider name for a specific type of network
GDI+: custom Clock Control
Using GetSysColor
How to retrieve the size of a remote file (FTP)
Saying "Hello World!" with VFP and WinAPI
Testing if a connection to an Url can be established
GDI+: how to make VFP controls visually shake and shudder
Initiating Inet connection using a modem
Locking the workstation
Number of clipboard formats available
Simple MAPI: how to pick an email recipient from Outlook Express address book
GDI+: creating scaled copy of image file
Reading security permissions for NTFS files and folders
GDI+: Drawing a Pie Chart
GDI+: reading and writing metadata in JPEG and TIFF files
How to extract frames from AVI files
System and Local Time values
Using the GetLogicalDriveStrings
Enumerating print processors and supporting data types installed on the specified server
Using shared memory to exchange data between applications (processes)
How to find when the application started
Retrieving list of all active RAS connections
Retrieving Network Provider information
Switching between keyboard layouts
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: 85  
    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 (
    6 sec.Function: 'IsZoomed'
    9 sec.Example: 'The original LoadPicture() function in VFP returns valid handles to bitmaps, icons, cursors, and metafiles'
    13 sec.Function: 'NetUserGetGroups'
    Function group: 'Network Management'
    15 sec.Function: 'IpRenewAddress'
    Function group: 'IP Helper'
    17 sec.Example: 'How to retrieve adapter information for the local computer (including MAC address)'
    22 sec.Example: 'Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)'
    24 sec.Function: 'SearchPath'
    Function group: 'File Management'
    26 sec.Function: 'InternetCrackUrl'
    Function group: 'Internet Functions (WinInet)'
    31 sec.Example: 'A client for testing non-blocking Winsock server'
    38 sec.Example: 'Opening access to the Microsoft Internet functions for the application'
    Advertise here!