Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Retrieving names for the registered clipboard formats
Testing if a connection to an Url can be established
Uploading file to the FTP server using InternetWriteFile
URL: splitting into its component parts
Using custom Simple MapiSendMail class
Using the GetTempFileName
Verifying a file using the Authenticode policy provider
Winsock: retrieving information from a host database for a given host name
Enumerating MIDI output devices
Finding parameters for the region specified
How to run FoxPro application under different user name (impersonating user)
Initiating Inet connection using a modem
Obtaining names of local and global groups for current user (WinNT/XP/2K)
Reading and setting system access privileges for the current process
Reading parameters of streams in AVI file
Reading STARTUPINFO structure for the current VFP session
Retrieving list of available disk drives
Retrieving top-child window for the VFP form
Saving available locale records into a cursor
Setting and retrieving the double-click time for the mouse
Setting default printer
Terminating all running applications from a VFP program
Winsock: retrieving information about available transport protocols
Winsock: retrieving the standard host name and IP address for the local machine
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:
      Password:
     
     
      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: 45  
    Listed functions:
    CloseHandle
    CreateProcessAsUser
    CreateProcessWithLogonW
    GetLastError
    GetVersionEx
    LogonUser
    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  
    FreeTranslation.com 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 (54.90.138.104)
    12 sec.Function: 'RealGetWindowClass'
    Function group: 'Window'
    34 sec.Function: 'ReadProcessMemory'
    40 sec.Function: 'CeDeleteFile'
    Function group: 'Remote Application Programming (RAPI)'
    46 sec.Function: 'GetDefaultPrinter'
    Function group: 'Printing and Print Spooler'
    52 sec.Function: 'InternetDial'
    Function group: 'Internet Functions (WinInet)'
    1.08 min.Example: 'Using Video Capture: enumerating installed capture drivers'
    1.27 min.
    Function group: 'Shell Functions'
    1.63 min.Function: 'waveInStart'
    Function group: 'Windows Multimedia'
    2.03 min.Function: 'EnumPorts'
    2.43 min.Example: 'Placing a button on the VFP form as a new child window'
    Google
    Advertise here!