Discussion:
Close exe program
(too old to reply)
Dino Ferraro
2008-10-01 11:57:38 UTC
Permalink
Hello

Im Using SchellExecute to load extern programs from within Dbase.

My problem is that when the Program is executet within Dbase and then close
the executet Program, this program still resides in the Memory/Process of
Windows.
If I load the program various times it stays listed in the prozess in
Windows and then I have the same program load it various times.

How can I programmaticly resolve this.

Thanks

extern cHandle ShellExecute( cHandle, cString, cString, ;
cString, cString, cINT ) SHELL32 ;
from "ShellExecute" + "A"
cPDFPath =
'"'+Trim(_app.PDFpathdata)+'/'+Trim(Form.NameVorname.Value)+'.pdf"'
cFile = 'C:\Program Files\O Imaging
Corporation\ScanToPDF\ScanToPDF.exe'
cString = '/autoscan /terminateaftersave /pdfpath=&cPDFpath'
ShellExecute(_app.framewin.hwnd, 'open', cFile, cString, '',
1)
Greg Hill
2008-10-01 15:44:39 UTC
Permalink
Post by Dino Ferraro
My problem is that when the Program is executet within Dbase and then
close the executet Program, this program still resides in the
Memory/Process of Windows.
If I load the program various times it stays listed in the prozess in
Windows and then I have the same program load it various times.
How can I programmaticly resolve this.
I posted something called killprocess in the binaries group, it was posted
on 2/15/08.

You could use that to kill the process.

Greg Hill
Glenn Johansen
2008-10-01 19:37:34 UTC
Permalink
the handle that you send to shell execute is the handle of the owner of the
new program being run.
so maybe the other programs on staying in memory until you close the dbase
app.
try sending null as the handle, this is allowed.

-glenn
Post by Dino Ferraro
Hello
Im Using SchellExecute to load extern programs from within Dbase.
My problem is that when the Program is executet within Dbase and then
close the executet Program, this program still resides in the
Memory/Process of Windows.
If I load the program various times it stays listed in the prozess in
Windows and then I have the same program load it various times.
How can I programmaticly resolve this.
Thanks
extern cHandle ShellExecute( cHandle, cString, cString, ;
cString, cString, cINT ) SHELL32 ;
from "ShellExecute" + "A"
cPDFPath =
'"'+Trim(_app.PDFpathdata)+'/'+Trim(Form.NameVorname.Value)+'.pdf"'
cFile = 'C:\Program Files\O Imaging
Corporation\ScanToPDF\ScanToPDF.exe'
cString = '/autoscan /terminateaftersave /pdfpath=&cPDFpath'
ShellExecute(_app.framewin.hwnd, 'open', cFile, cString, '',
1)
Loading...