General information
Category:
Windows API functions
Hi All:
I'm trying to close a window/program using Windows API.
I've done the following but to no avail.
Could I be missing something here, or, am I just using
the wrong APIs.
LOCAL lcApplication, lnWndHnd
*--Get the Window/Program HANDLE
DECLARE INTEGER FindWindow IN Win32API;
STRING @lpClassName, ;
STRING @lpWindowName
lcApplication = "MyProg"
nWndHnd = FindWindow(0, @lcApplicationTitle)
*--Close the Window/Program using the nWndHnd obtianed.
DECLARE SHORT CloseHandle IN WIN32API;
INTEGER hHandle
=CloseHandle(nWinHnd)
nWndHdn is numeric using FindWindow (if the program is running,
otherwise nWndHnd = 0).
However, ClsoeHandle does nothing (not even an error message).
Would be greatful is someone can point out what/where I going
wrong.
TIA
Mal
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only