Subj : Serial port query To : Vitus Jensen From : Darin McBride Date : Fri Aug 11 2000 01:29 pm Hello Vitus! Replying to a message of Vitus Jensen to Darin McBride: VJ>>> Get OS2UNDOC from hobbes and have a look at the DosQuerySysState VJ>>> API. It will return infos about all open files of a single or all VJ>>> processes. There are problems when using it at certain fixpak VJ>>> levels (older Warp 3 fixpaks). DM>> Of course! I forgot all about that. I already use that call for a DM>> number of things, so one more is no biggie. :-) Unfortunately, I DM>> can't figure out how to trace back from the file to the process(es). VJ> Use the brute force method? See below. [...] VJ> There is this lees-than-optimal solution but why not use it: VJ> get a list of all running processes via DosQuerySysState VJ> for every process ID VJ> get a list of all open files via DosQuerySysState VJ> for every open file VJ> check whether filename = COMx VJ> if identical VJ> dump process info (DosQuerySysState) VJ> I don't think it would be too slow to be usable. Of course - didn't think of that. However, I've found what may work a bit better, if I can decipher everything. The Warp4.5 toolkit *has* DosQuerySysState somewhat documented, and some of its structures are a bit bigger than what OS2UNDOC has. Unfortunately, I don't have that toolkit at home... :-/ Darin --- * Origin: Tanktalus' Tower BBS (1:250/102) .