Re: pipe problem
Ulrich Eckhardt wrote:
one2001boy@yahoo.com wrote:
Windows GUI applications can't receive piped input.
Sure they can. The difference between a GUI and a CLI based application is
only how they use their stdio streams.
I assume that you mean windows GUI application recieve piped input using
createprocess().
Generally, the documentation at msdn.microsoft.com is available. Other than
that, can you create a minimal code example that demonstrates the issue?
int main()
{
....
while (fgets(psBuffer, BUFFER_SIZE, stdin) != NULL) {
PostString(hwndText, psBuffer);
}
....}
void
PostString(HWND hwnd, char *pc)
{
while(*pc) {
PostMessage(hwnd, WM_CHAR, (unsigned char) *pc, 1L);
pc++;
}
}
I have done more research,
I noticed that I have enough memory and disk space, and it get the
problem of ERROR_NOT_ENOUGH_QUOTA for the function of PostMessage()
after processing 4k of stdin piped data ( I have 14K of stdin data to
process)
thanks.