I have two programs: program A (in FORTRAN) and program B (in C++). They are connected through anonymous pipe with each other. Program B should read binary data directly from console of program A but for some reason I can not do that:
Note: V_hChildStd_OUT_Rd is a handle to the output of program A.
If I pass one, two or three digit(s) integer number (say 1 or 10 or 100) the program works and I can get the number in File_Data array. But for higher integer numbers and all double numbers File_Data gives meaning less value. Note that for all numbers my bSuccess is TRUE! which means it can read the file. Can you please help me to solve the problem. Thanks!
Do you expect the data to be in string format or binary format? I think your debugger is showing you the binary representation of a double, which is nothing like the human-readable string format.
@ modoran: That is a good point. I tried to use PeekNamedPipe() to get the number of bytes. It gives me exactly the same size as GetFileSize() which is interesting. But still I can not read the binary data!