Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need To Close An Application
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00691241
Message ID:
00691471
Views:
15
Paul gave me the same code. It still had no effect. Here's the code I used:
lparameters tcwindow
#define PROCESS_TERMINATE 0x1
local lnhwnd, lnprocID, lnhproc

declare integer GetLastError in win32api
declare integer FindWindow in user32 string, string
declare integer GetWindowThreadProcessId in user32 integer, integer@
declare integer OpenProcess in kernel32 integer, integer, integer
declare integer TerminateProcess in kernel32 integer, integer

tcwindow = "Spot Media Tracking System"

lnhwnd = FindWindow(0,tcwindow)

if lnhwnd <> 0 then
	lnprocID = 1
	GetWindowThreadProcessId(lnhwnd, @lnprocID)
	lnhproc = OpenProcess(PROCESS_TERMINATE,0,lnprocID)
	if lnhproc <> 0 then
		lnretval = TerminateProcess(lnhproc,99)
		if lnretval = 0 then
			? GetLastError()
		endif
	endif
endif
return
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform