Using Win32 functions in Visual FoxPro Image Gallery
Process and Thread
..msdn
AssignProcessToJobObject
CommandLineToArgvW
CreateJobObject
CreateProcess
CreateProcessAsUser
CreateProcessWithLogonW
ExitProcess
FreeEnvironmentStrings
GetCommandLine
GetCurrentProcess
GetCurrentProcessId
GetCurrentThread
GetCurrentThreadId
GetEnvironmentStrings
GetEnvironmentVariable
GetPriorityClass
GetProcessIoCounters
GetProcessTimes
GetProcessVersion
GetStartupInfo
GetThreadPriority
IsWow64Process
OpenProcess
RegisterServiceProcess
SetEnvironmentVariable
SetPriorityClass
SetThreadPriority
Sleep
TerminateJobObject
TerminateProcess
WinExec
Code examples:
How to Start a Process as Another User (NT/XP/2K)
CreateProcessWithLogonW
..msdn    Add comment     W32 Constants      Translate this page
The CreateProcessWithLogonW function creates a new process and its primary thread. The new process then runs the specified executable file in the security context of the specified credentials (user, domain, and password). It can optionally load the user profile for the specified user.
Code examples:
How to Start a Process as Another User (NT/XP/2K)
Declaration:
BOOL CreateProcessWithLogonW(
  LPCWSTR lpUsername,
  LPCWSTR lpDomain,
  LPCWSTR lpPassword,
  DWORD dwLogonFlags,
  LPCWSTR lpApplicationName,
  LPWSTR lpCommandLine,
  DWORD dwCreationFlags,
  LPVOID lpEnvironment,
  LPCWSTR lpCurrentDirectory,
  LPSTARTUPINFOW lpStartupInfo,
  LPPROCESS_INFORMATION lpProcessInfo
);

FoxPro declaration:
DECLARE INTEGER CreateProcessWithLogonW IN Advapi32;
    STRING    lpUsername,;
    STRING    lpDomain,;
    STRING    lpPassword,;
    INTEGER   dwLogonFlags,;
    STRING    lpAppName,;
    STRING    lpCmdLine,;
    INTEGER   dwCreationFlags,;
    INTEGER   lpEnvir,;
    STRING    lpCurDir,;
    STRING  @ lpStartupInfo,;
    STRING  @ lpProcessInfo

Parameters:
lpUsername
[in] Pointer to a null-terminated string that specifies the name of the user.

lpDomain
[in] Pointer to a null-terminated string that specifies the name of the domain or server whose account database contains the lpUsername account.

lpPassword
[in] Pointer to a null-terminated string that specifies the clear-text password for the lpUsername account.

dwLogonFlags
[in] Logon option.

lpApplicationName
[in] Pointer to a null-terminated string that specifies the module to execute.

lpCommandLine
[in] Pointer to a null-terminated string that specifies the command line to execute.

dwCreationFlags
[in] Flags that control how the process is created.

lpEnvironment
[in] Pointer to an environment block for the new process.

lpCurrentDirectory
[in] Pointer to a null-terminated string that specifies the current drive and directory for the new process.

lpStartupInfo
[in] Pointer to a STARTUPINFO structure that specifies the window station, desktop, standard handles, and appearance of the main window for the new process.

lpProcessInfo
[out] Pointer to a PROCESS_INFORMATION structure that receives identification information for the new process, including a handle to the process.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
The CreateProcessWithLogonW and CreateProcessWithTokenW functions are similar to the CreateProcessAsUser function, except that the caller does not need to call the LogonUser function to authenticate the user and get a token.
Word Index links for the CreateProcessWithLogonW :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2003-10-30 14:46:43
Modified: 2003-10-30 14:51:14
Visited in last 7 days: 32
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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.163.61.66)
15 sec.Function: 'JetInit'
29 sec.Function: 'waveOutWrite'
45 sec.
Function group: 'Console'
1.02 min.Function: 'CeGetLastError'
1.3 min.Function: 'GetSystemWow64Directory'
1.55 min.Function: 'SQLSetEnvAttr'
1.8 min.Examples
Page 3
2.08 min.Function: 'ObtainUserAgentString'
2.35 min.Function: 'IpRenewAddress'
2.63 min.Function: 'waveInOpen'
Google
Advertise here!