Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Converting twips to pixels and vice versa
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
Displaying all TCP connections for the local system
Enumerating the subkeys for a given registry key
Obtaining MAC address through Address Resolution Protocol (ARP) request
Reading and setting the priority class values for the current process and thread
Setting the mouse capture to the specified window
Using GetBinaryType (WinNT only) to determine the type of an executable file
Using the RestartDialog function -- restarting Windows
GDI+: Using Scale and Shear transformations
How to save registry key including its subkeys and values to a file
How to view system icons for the classes installed on the local machine
Obtaining addresses for the adapters on the local computer (Win XP/2003/Vista)
Retrieving information about the main VFP window
Winsock: how to retrieve the protocol information corresponding to a protocol number
Winsock: retrieving information about available transport protocols
Accessing the list of Windows Recent Documents
Drawing a rectangle using Windows regular edges and borders
Enumerating MIDI output devices
How to generate GUID values
How to retrieve the size of a remote file (FTP)
Obtaining heap handles and enumerating memory blocks for the current VFP session (WinNT only)
Playing WAV sounds simultaneously
Retrieving a universal form for the drive-based path for a network resource
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: 84  
    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.37), 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.147.221)
    6 sec.Function: 'NetWkstaUserEnum'
    Function group: 'Network Management'
    12 sec.Function: 'CeRapiGetError'
    Function group: 'Remote Application Programming (RAPI)'
    17 sec.Example: 'Testing serial ports'
    24 sec.Function: 'NetScheduleJobDel'
    Function group: 'Network Management'
    29 sec.Example: 'Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)'
    34 sec.Example: 'Shortcut Menu Class'
    42 sec.
    Function group: 'Filled Shape'
    50 sec.Example: 'Accessing Adobe Reader 7.0 main menu from VFP application'
    57 sec.Function: 'NetUserGetLocalGroups'
    Function group: 'Network Management'
    1.05 min.Function: 'MAPIFindNext'
    Function group: 'Simple MAPI'
    Google
    Advertise here!