#LFs are not sent in the progress line so the previous functions don't work. I did a new version that handles #CRLF and #CR. Why do you need ProgramRunning(), CloseProgram()?Btw, with the PB functions empty lines are lost.
edit: code removed use previous include
Bug? - ReadProgramString() and unicode
Re: Bug? - ReadProgramString() and unicode
Last edited by Justin on Tue Apr 27, 2010 9:21 pm, edited 1 time in total.
Re: Bug? - ReadProgramString() and unicode
I need it because I have to replace all the PureBasic functions I'm using right now to be able to handle a nonunicode executable with my unicode program. KillProgram() would be the last function I need.
Anyway, thanks for your great help so far! You know I'm not the best API programmer.
Anyway, thanks for your great help so far! You know I'm not the best API programmer.

If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Bug? - ReadProgramString() and unicode
The program is running until there is no more data to read then it closes. GetExitCodeProcess() will return always #STILL_ACTIVE if you don't read data. I added proc_TerminateProcess() wich kills the program at any time, it is in the first include i posted, i removed the rest of the code.
Re: Bug? - ReadProgramString() and unicode
I found out that GetExitCodeProcess() works better for me because there are executables that don't give out (error) strings all the time.
What do you mean with it always returns #STILL_ACTIVE? Reading msdn I thought it's a good way to check it.
(Well, I read a post from Freak some days ago where he posted something like waitobject or so would be better. Didn't test it yet.)
What do you mean with it always returns #STILL_ACTIVE? Reading msdn I thought it's a good way to check it.
(Well, I read a post from Freak some days ago where he posted something like waitobject or so would be better. Didn't test it yet.)
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!