Remove the address operator:
bResult = ReadFile(hCom, inBuffer.GetBuffer(1), 1, &nBytesRead, NULL);
Also: Don’t forget the matching call to ReleaseBuffer. And for adding that character
allData += inBuffer;
should be sufficient.
Remove the address operator:
bResult = ReadFile(hCom, inBuffer.GetBuffer(1), 1, &nBytesRead, NULL);
Also: Don’t forget the matching call to ReleaseBuffer. And for adding that character
allData += inBuffer;
should be sufficient.