Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Exporting DLL icon resources as .ICO files
GetProcessVersion points at target OS
How to display the port-configuration dialog box for a port on the specified server
How to play a waveform sound (a WAV file in particular)
How to print FoxPro form -- II
Printing text with the Escape function
Retrieveing information about the active window (even if it is not owned by the calling process)
Retrieving the priority class for the current process
Enumerating Processes -- Win9*
GDI+: Creating thumbnails to preview images in a directory
How to access a file using not its name but an alias (hard link)
Using Common Controls: the Header Control
Using shared memory to exchange data between applications (processes)
How to display picture stored in enhanced-format metafile (*.emf)
How to enumerate terminal servers within the specified Windows domain
How to find when the application started
WAV file player
Deleting files into the Recycle Bin
Displaying Windows shell folders in TreeView control with Visual FoxPro FLL
Encapsulating access to the Windows Services in a class
How to obtain Content-Type value for a file type from the System Registry
Initiating Inet connection using a modem
GDI+: cropping images
Get the power status of your laptop computer
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: 93  
    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.198.148.191)
    2 sec.Function: 'DrawAnimatedRects'
    4 sec.Function: 'GetWindowRect'
    Function group: 'Window'
    5 sec.Example: 'Downloading files from the FTP server using InternetReadFile'
    7 sec.Example: 'PocketPC: custom RAPI class for executing routines on remote Windows CE device'
    14 sec.Example: 'Attaching menu to a top-level form'
    3 day(s)Function: 'JetCloseDatabase'
     
    Function group: 'Shell Lightweight Utility APIs -- misc. functions'
     Function: 'RtlDecompressBuffer'
     Example: 'Peer-to-peer LAN messenger built with Mailslot API functions'
     Function: 'inet_ntoa'
    Function group: 'Windows Sockets 2 (Winsock)'
    Google
    Advertise here!