That's really interesting skn3[ac] !
Now, if we could put an handy button on the Bmax IDE, whith a caption like 'Make DLL', which would make all that stuff automatically...
Anyway, regarding CreateProcess, since it returns a stream, you can try this to wait the process end:
From the help B+ file:
CreateProcess launches a 'console based' app and returns a handle to a stream representing its input/output.
If the app is expecting input, you can write to the stream to automatically enter lines of input using WriteLine.
If the app is generating output, you can read back from the stream to receive the lines using ReadLine.
*Note* This only works with console based apps that using stdin/stdout. Windows apps typically generate no output.
Blitz Print/Input are supposed to use stdin/stdout, but that feature is not quite working properly yet.
This, for example, works fine (BlitzPlus):
Sergio.
Now, if we could put an handy button on the Bmax IDE, whith a caption like 'Make DLL', which would make all that stuff automatically...
Anyway, regarding CreateProcess, since it returns a stream, you can try this to wait the process end:
process_stream = createprocess("whatever.exe") while not eof process_stream wend
From the help B+ file:
CreateProcess launches a 'console based' app and returns a handle to a stream representing its input/output.
If the app is expecting input, you can write to the stream to automatically enter lines of input using WriteLine.
If the app is generating output, you can read back from the stream to receive the lines using ReadLine.
*Note* This only works with console based apps that using stdin/stdout. Windows apps typically generate no output.
Blitz Print/Input are supposed to use stdin/stdout, but that feature is not quite working properly yet.
This, for example, works fine (BlitzPlus):
process$ = "calc.exe" s = CreateProcess (process) While Not Eof(s) If MilliSecs() - t >= 1000 Then DebugLog.Print "process " + process + " running" t = MilliSecs() EndIf Wend DebugLog.Print "process " + process + " terminated" WaitKey End
Sergio.