Hi everyone!,
I trying to append chars readed from http response which is writen with wininit module into QString. but the QString is stays 0 byte length.
I can't use QHttp class, because it has problem with POST request under wince.
http://trolltech.com/developer/task-...5&method=entry
here is sample of code:
char szBuffer[4096];
DWORD dwNumberOfBytesRead = 0;
while ( InternetReadFile(hResourceHandle, szBuffer, sizeof(szBuffer),
&dwNumberOfBytesRead) &&
dwNumberOfBytesRead )
{
str.append(szBuffer);
}
qDebug() << str;
QString str;
char szBuffer[4096];
DWORD dwNumberOfBytesRead = 0;
while ( InternetReadFile(hResourceHandle, szBuffer, sizeof(szBuffer),
&dwNumberOfBytesRead) &&
dwNumberOfBytesRead )
{
str.append(szBuffer);
}
qDebug() << str;
To copy to clipboard, switch view to plain text mode
qDebug prints nothing and str.length() == 0, but dwNumberOfBytesRead > 0
Thanks for any help!
Bookmarks