473,695 Members | 2,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Impossible to capture stdOut??

Has anybody encountered console exe's that are impossible to get stdOut
from? Does anybody know if there are different(other then string text)
ways that console exe files send out their outputs??

Feb 15 '06 #1
4 3253
Some old apps used to write directly to the display buffer, bypassing all
stdio function calls. Also some apps write to stderr device, which by
default was/is the same as stdout.

But this is all nerdy, very old-style programming... Are you talking about
an old application (ie, DOS), or something newer?
Feb 15 '06 #2
The DOS application is from the mid 90's, so it's pretty old. I have
tried to capture the stdOut using system diagnostics and process
handeling. I can capture stdOuts like the result of using ping.exe etc.
but when I try using the old DOS exe I get nothing out. I would really
appreciate if somebody could help me with this problem.

Feb 16 '06 #3
Also when i try to write the stdOut from the exe to a text file in the
cmd console with >outfile.txt all i get is an empty file :(

Feb 16 '06 #4
Then I'd say the app is writing directly to the memory buffer, in which case
you are screwed :-(...

Unless windows has some new APIs for consoles to grab screenshots, you are
going to have to think up of some alternate way of getting the output.

I think writing directly to the video buffer was even a compiler option for
several compilers in the past. This was very often done for speed reasons,
writing directly to the display memory resulted in huge app speed
improvements over using the bios stdio functions.
Feb 16 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: vj | last post by:
I need to capture the error code put out by an executable which I run from my program using rc = system(command); I get the stdout into rc. But how do I get to stderr ? ( command does cerr << errorcode; as part of its execution) Can this be done without creating a file ?
by: Peter A. Schott | last post by:
Not sure what I should do here. I know that DOS/CMD can capture the output of EXE files in Win32. I know that os.popen() has been recommended for this, but the couple of times I've tried, it didn't seem to work well. I haven't had a lot of need to do this recently, but we're trying to automate some processes right now that require us to trap the output of a command line and react accordingly. Any suggestions on the best method for...
by: Santtu Nyrhinen | last post by:
Hi, Let say that I have a function like void writeHello() { printf("Hello"); } Now I need to make an automated test fot that function. The test function returns 1 for successful and 0 for unsuccessful test. int Test_writeHello() {
by: ChaosKCW | last post by:
Hi Has anyone caputerd the output from the std ftp lib? It seems a bit annoying that everything is printed to stdout. It means incorporating this into any real program is a problem. It would have been much better if they used the std logging module and hooked up a console logger for the feault ftp application. Alas it isnt that way. Capturing stdout like this??? :
by: jfigueiras | last post by:
Hi all! I have a problem with the module subprocess! The problem is that the external software that I am running under subprocess.Popen opens stdin, stdout, stderr, and other file descriptors to write and read in the hard drive. I know how to capture stdin, stdout and stderr, what I cannot do is to capture the other file-descriptors. Is there any way to wrap those non-standard file descriptors and make them write and read from a...
by: Gerard Flanagan | last post by:
Hello, I have a third party shell script which updates multiple environment values, and I want to investigate (and ultimately capture to python) the environment state after the script has run. But running the script as a child process only sets values for that process, which are lost after execution. So I thought I could simply tack on an 'env' command line to the script input lines as shown below. However, using subprocess.Popen gives...
by: jdbartlett | last post by:
I'm trying to capture output from a command line utility (XMLSec), but only get an empty result. If I call the script from the command line, I see XMLSec's output, but I can't seem to capture it! My PHP installation is working correctly and captures other command line output just fine, XMLSec is the only exception I've found. I've also tried a couple of other systems to confirm this behavior. Capture methods I've tried include:
by: rogerlew | last post by:
How can I capture Numpy errors and warnings (to a log file for instance)? I tried redirecting stdout and stderr with: import sys sys.stdout=sys.stderr=open('log.log','wb') but Numpy warnings are not caught and are passed to the shell. I am using 2.4.4 and numpy on a windows XP box. Thanks, Roger
by: Jim Langston | last post by:
I had asked this in comp.lang.c++ with out any answers that would actually work, so I'm hoping someone here may know a way. I am calling C library functions that want to output to stdout. I need to capture this to memory for use internally inside the program without modifying the library calls that actually do the output. This is for the GraphViz libraries and it is the output of dot that I'm actually trying to capture. I have...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.