Using CreateProcess

BlitzPlus Forums/BlitzPlus Programming/Using CreateProcess

schilcote(Posted 2010) [#1]
I'm trying to write a program that interfaces with a command-line program. It isn't working, and I think I'm going to rewrite it from scratch. Does anyone have some code that works that I can look at?

EDIT:

My main problem is that when I read past the end of the output that the program has given, my program crashes. I don't know what to do about it...


Sauer(Posted 2010) [#2]
Can you post some code? Your post is rather vague.


Stamm(Posted 2010) [#3]
i think i understood your problem
try something like
if not eof(stream) DoStuff()

btw have you any idea why CreateProcess doesnt work my ide doesnt highlight it and tells me "function 'CreateProcess' not found"
i running latest b+


blackgecko(Posted 2010) [#4]
"latest" means V1.47?
Click on "Help" and "About BlitzPlus" to check the version number.


Stamm(Posted 2010) [#5]
seems i don't have latest version
it tells me ver 1.11
will download it right now


schilcote(Posted 2010) [#6]
Eof() on a createprocess stream returns whether the process has terminated or not, doesn't it? My problem is there's no way to tell where the end of the text coming from the process is, and reading beyond it causes a crash...