Neil Hodgson wrote:

  There is some code in SciTE that runs tools and grabs their output
in win32/SciTEWin.cxx SciTEWin::ExecuteOne. As the input should be a
pipe, you should be able to call PeekNamedPipe on it to see if there
are any bytes to read.
Hello Neil,

I've been playing with a test program I found on the 'net.

stdin does seem to be a pipe, but both PeekNamedPipe() and GetNamedPipeHandleState() do not seem to return different information whether the command line is:
   dir *.cxx /s | s -
or
   findstr neverfound | s -

PeekNamedPipe() returns zero for the byref parameters:
   number of bytes read
   total number of bytes available
   unread bytes in this message

And GetNamedPipeHandleState() returns
zero for pipe state (which may indicate PIPE_TYPE_BYTE, PIPE_READMODE_BYTE, PIPE_WAIT, and PIPE_CLIENT_END)
   one for number of current pipe instances

The sample program is not actually reading from stdin, merely examining it. I'll see if I can either get more info by reading with it and having a timer activate, or maybe I can get the preferred performance by using API calls in place of stdio calls.
April

--
Paranoia is life in greater detail

_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to