Im using the win32 function ReadFile:
CHAR lpBuffer[256]; DWORD nBytesRead; DWORD nCharsWritten; ReadFile(hPipeRead,lpBuffer,sizeof(lpBuffer), &nBytesRead,NULL) || !nBytesRead) now im catcing the response from stdout in to lpBuffer with this i like to convert it to std string , the problem is when i do simple :
std::string szReturnlpBuffer(lpBuffer); the value of the szReturnlpBuffer contains alot of garbege carecthers after the real string: its looks like this the szReturnlpBuffer value :
"Im stdout from the Qt applicationÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ"
what im doing wrong here ?