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 make application automatically close all documents it opened
How to prevent users from accessing the Windows Desktop and from switching to other applications
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Start an executable from VFP application by using the CreateProcess
Starting external program from VFP and waiting for its termination
CreateProcess
..msdn    Add comment     W32 Constants      Translate this page
The CreateProcess function creates a new process and its primary thread. The new process runs the specified executable file.

The CreateProcess function is used to run a new program. The WinExec and LoadModule functions are still available, but they are implemented as calls to CreateProcess
Code examples:
How to prevent users from accessing the Windows Desktop and from switching to other applications
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
How to make application automatically close all documents it opened
Starting external program from VFP and waiting for its termination
Start an executable from VFP application by using the CreateProcess
Declaration:
BOOL CreateProcess(
  LPCTSTR lpApplicationName,           // name of executable module
  LPTSTR lpCommandLine,                // command line string
  LPSECURITY_ATTRIBUTES lpProcessAttr, // SD
  LPSECURITY_ATTRIBUTES lpThreadAttr,  // SD
  BOOL bInheritHandles,                // handle inheritance option
  DWORD dwCreationFlags,               // creation flags
  LPVOID lpEnvironment,                // new environment block
  LPCTSTR lpCurrentDirectory,          // current directory name
  LPSTARTUPINFO lpStartupInfo,         // startup information
  LPPROCESS_INFORMATION lpProcessInfo  // process information
);
FoxPro declaration:
DECLARE INTEGER CreateProcess IN kernel32;
    STRING   lpApplicationName,;
    STRING   lpCommandLine,;
    INTEGER  lpProcessAttributes,;
    INTEGER  lpThreadAttributes,;
    INTEGER  bInheritHandles,;
    INTEGER  dwCreationFlags,;
    INTEGER  lpEnvironment,;
    STRING   lpCurrentDirectory,;
    STRING   lpStartupInfo,;
    STRING @ lpProcessInformation

Parameters:
Return value:
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call
Usage:
cProcInfo = Repli(Chr(0), 16)
cStartInfo = PADR(Chr(START_INFO_SIZE),;
    START_INFO_SIZE, Chr(0))

= CreateProcess(cApp, NULL, 0,0,0,;
    0, 0, SYS(5)+SYS(2003),;
    @cStartInfo, @cProcInfo)
My comment:
See also: ShellExecute, WinExec
Word Index links for the CreateProcess :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-12 12:00:00
Modified: 2007-06-11 16:14:13
Visited in last 7 days: 219
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.92.141.211)
11 sec.Function: 'CeRegQueryInfoKey'
26 sec.Function: 'SetupCloseInfFile'
38 sec.Function: 'ClearEventLog'
52 sec.Function: 'GetObjectType'
1.08 min.Function: 'CopyMemory'
1.27 min.Function: 'GdipSetSmoothingMode'
1.43 min.Function: 'GetCurrentHwProfile'
1.63 min.Function: 'MQPurgeQueue'
1.83 min.
Function group: 'GDI+ Bitmap'
2.05 min.Function: 'IsZoomed'
Google
Advertise here!