External function, closing program PB 6.5

Can someone point me to a more graceful way of closing a program than
using the terminateprocess( ) api?

Here's my situation:  Program A closes Program B, but B is killed
without firing the closequery or close events.  The external function
which closes B is defined as follows:

Function Boolean TerminateProcess(ulong Handle, ulong ExitCode) LIBRARY
"KERNEL32.DLL"

I found reference to a windows message in a VB book called WM_CLOSE
which appears to be what I am looking for.  But I don't know if and how
it can be applied in PB.  Recommendations on documentation in this area
would be appreciated also.
Thanks,

--vh

0
Vance
12/15/1999 6:36:23 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

1 Replies
445 Views

Similar Articles

[PageSpeed] 1
Get it on Google Play
Get it on Apple App Store

yes,wm_close = 16
use the send().

Vance Hill wrote:

> Can someone point me to a more graceful way of closing a program than
> using the terminateprocess( ) api?
>
> Here's my situation:  Program A closes Program B, but B is killed
> without firing the closequery or close events.  The external function
> which closes B is defined as follows:
>
> Function Boolean TerminateProcess(ulong Handle, ulong ExitCode) LIBRARY
> "KERNEL32.DLL"
>
> I found reference to a windows message in a VB book called WM_CLOSE
> which appears to be what I am looking for.  But I don't know if and how
> it can be applied in PB.  Recommendations on documentation in this area
> would be appreciated also.
> Thanks,
>
> --vh

0
Ken
12/15/1999 6:41:51 PM
Reply: