Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Pocket PC: creating backup for the System Registry
Reading header information from AVI file
Retrieving information about all users currently logged on to the workstation (WinNT only)
Running a regular FoxPro form while main VFP window is minimized
Winsock: how to retrieve a service information corresponding to a port
Converting an HTTP time/date string to a SYSTEMTIME structure
Converting characters in a URL into corresponding escape sequences and backwards
Converting path to original case
GDI+: printing image file
How to release and renew a lease on an IP address previously obtained through Dynamic Host Configuration Protocol (DHCP)
How to retrieve configuration data for a specified printer stored in the registry (PrinterDriverData key)
Pocket PC: custom RAPI class for operating with files and folders on mobile device
Retrieving the command line for the VFP session
Returning some basic information for the specified INF file
Storing screen shot of a form to enhanced metafile (*.emf)
Terminating all running applications from a VFP program
Using Common Controls: the Header Control
Yet another modal dialog: now HTML-based
Adding printer to the list of supported printers for the specified server
Changing pitch and speed of a wave file
Drawing Windows frame controls using the DrawFrameControl function
GDI+: rotating images using matrix transformations
GetFocus returns a HWND value
How to make the caption of a VFP application flashing in the Windows task bar
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: 29  
    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.166.111.111)
    40 sec.Example: 'Displaying system dialog that selects a folder'
    1.62 min.Example: 'How to change display settings: screen resolution, screen refresh rate'
    2.88 min.
    Function group: 'Device Context'
    4.58 min.Function: 'inet_addr'
    Function group: 'Windows Sockets 2 (Winsock)'
    3 day(s)Function: 'WSACloseEvent'
    Function group: 'Windows Sockets 2 (Winsock)'
     Example: 'How to retrieve the number of print jobs queued for the printer'
     Function: 'NetShareAdd'
    Function group: 'Network Management'
     Function: 'NetWkstaGetInfo'
    Function group: 'Network Management'
     Function: 'IsZoomed'
    6 day(s)Example: 'Monitoring changes occurring within a directory'
    Google
    Advertise here!