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 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
Terminating all running applications from a VFP program
TerminateProcess
..msdn    Add comment     W32 Constants      Translate this page
The TerminateProcess function terminates the specified process and all of its threads.
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)
Terminating all running applications from a VFP program
Start an executable from VFP application by using the CreateProcess
Declaration:
BOOL TerminateProcess(
  HANDLE hProcess, // handle to the process
  UINT uExitCode   // exit code for the process
);
FoxPro declaration:
DECLARE INTEGER TerminateProcess IN kernel32;
    INTEGER hProcess,;
    INTEGER uExitCode
Parameters:
hProcess
[in] Handle to the process to terminate.

uExitCode
[in] Specifies the exit code for the process and for all threads terminated as a result of this call.
Return value:
If the function succeeds, the return value is nonzero.
Word Index links for the TerminateProcess :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-09-18 12:00:00
Modified: 2002-01-10 18:44:55
Visited in last 7 days: 60
User Contributed Notes:
69.85.193.46 | 2006-09-27 15:57:16
This function doesn't seem to work using a handle from the Process Information structure in CreateProcess if the process called is explorer.exe. Any suggestions on how to close an explorer window opened with createprocess?
A.M. | 2006-09-30 21:38:50
This code closes all Explorer windows:

obj = CREATEOBJECT("Shell.Application")
? obj.Windows.Count
FOR EACH win IN obj.Windows
   win.Quit
NEXT

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.198.134.32)
5 sec.All Functions
9 sec.Function: 'SCardListInterfaces'
Function group: 'Authentication'
14 sec.Links
19 sec.Function: 'CeCreateDatabase'
Function group: 'Remote Application Programming (RAPI)'
23 sec.Function: 'CopyFile'
Function group: 'File Management'
26 sec.Function: 'ntohl'
Function group: 'Windows Sockets 2 (Winsock)'
30 sec.Function: 'closesocket'
Function group: 'Windows Sockets 2 (Winsock)'
34 sec.Function: 'waveInOpen'
Function group: 'Windows Multimedia'
41 sec.
Function group: 'Process and Thread'
45 sec.
Function group: 'Desktop Window Manager (DWM)'
Google
Advertise here!