pedromrs
4th February 2003, 14:55
Hi,

Is it possible to get a Bwclient (Windows NT) system process ID in some way?

I have this problem with a function server that never closes the option window after execution from an Ole application. Ottstpoledaemon isn't clean for some reason.
So I'm trying to kill "bw.exe" at the end using API Windows functions. That is easy, but I can have several ole applicattions running in paralell (means several instances of bw) so I need to know exactly the process Id. Unless there is a way to kill ottstpoledaemon without hanging the ole application. :cool:

I'm thinking of a really ugly solution if the above isn't possible. I can send the calling application process ID through the Ole interface and then create a main window with that ID in the title. This is because I can have access to a process main window title through Windows API. But this would be my last case cenario.
:rolleyes:.

PS: I have tried several approaches to get ottstpoledaemon clean in a normal fashion to no success. We have other ole/AFS servers closing without problems. I have traced the problem to a tdpur4120m000/tdpur4131s000 interface code section; the code is correct and executes cleanly but for some reason it makes the ottstpoledaemon process hang at the end.

Thanks in advance,

norwim
4th February 2003, 16:10
Hi,

AFAIR there was something like MKS ToolKit for NT.
This software allows you to use lots of unix-like commands including "ps", which seems to be exactly what you need.
There is a similar package called cygwin which is free (IIRC MKS Toolkit was veeery expensive), but I don't know whether cygwin will give you control over all processes as well.

HTH

Norbert

pedromrs
4th February 2003, 16:27
Thanks Norbert,

I have access to all the processes in the system through code but I need to associate a bw process to an application process. Because I can have multiple application ole processes I have to know exactly which bw process maps to each application.

OmeLuuk
4th February 2003, 17:36
I think you should use the bshcmd binary to kill bshell processes. Here you will need the pid of the ntbshell... Running bshells do have a file bshell.[pid] in the %BSE%\tmp directory.