Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Retrieving names for the registered clipboard formats
Time in milliseconds represented as string (e.g. 1 hour 24 min 36 sec)
Using MessageBeep
Using the FindMediaType function
Winsock: retrieving information from a host database for a given host name
Accessing the list of Windows Recent Documents
Comparing dimensions of the VFP main window with _SCREEN properties
GDI+: creating scaled copy of image file
How to download this reference`s archive through WinInet functions using InternetOpenUrl
How to make the caption of a VFP application flashing in the Windows task bar
How to start the screen saver and how to find whether the screen saver is active
Minimizing all running applications
Obtaining I/O counts for the current process
One more way to retrieve environment strings
Opening the Page Setup dialog box to specify the attributes of a printed page
Reading Internet Query options
Reading the state of mouse buttons within DO WHILE loop
Retrieveing general information about the driver and data source associated with an ODBC connection
Retrieving the command line for the VFP session
Using an Event Object. Part A: running an application that creates an Event object
Using GetFileSize
Using the ChooseColor function
Validating the heap of the calling process
Validating URLs using moniker functions
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: 58  
    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-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.35), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (54.204.83.136)
    8 sec.Example: 'How to create non-blocking Winsock server'
    Language: 'C++'
    16 sec.Example: 'Displaying bitmap using the AlphaBlend function'
    24 sec.Example: 'Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)'
    32 sec.Function: 'CryptCreateHash'
    40 sec.Function: 'CreateWindowEx'
    48 sec.
    Function group: 'GDI+ Bitmap'
    56 sec.Example: 'Retrieving the state of your Internet connection'
    1.08 min.Function: 'DrawIcon'
    1.22 min.Example: 'Enumerating the subkeys of a user-specific key'
    1.35 min.Function: 'MAPISendMail'
    Google
    Advertise here!