Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 02-21-2012, 18:08
Kerlingen Kerlingen is offline
VIP
 
Join Date: Feb 2011
Posts: 342
Rept. Given: 0
Rept. Rcvd 278 Times in 100 Posts
Thanks Given: 0
Thanks Rcvd at 361 Times in 112 Posts
Kerlingen Reputation: 200-299 Kerlingen Reputation: 200-299 Kerlingen Reputation: 200-299
The thread is not old to me, the problem still exists.

Thank you for the code you posted, but it doesn't work either.
"ReadFile(stdin)" will not return anything until the output buffer is full.
"FlushFileBuffers(stdin)" will not change anything about this behaviour.

And your code contains a small error: "while(c[0])" will generate an endless loop, since c[0] will contain the last char which was read, which won't be "0" (false condition) when reaching EndOfFile or closing the handle.

@redbull:
While CloseHandle(stdout) might work, it would close the handle, making any further output impossible. "prog1.exe" is also running at higher privileges than "tee.exe", so even if I wanted to close the handle, I wouldn't have permission to do so.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ARMADILLO] 1 serial & 1 key - need input Maltese General Discussion 2 02-18-2005 00:58


All times are GMT +8. The time now is 20:11.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )