Category : parameter-passing

I have a function: BOOL ReadWebPage(CONST TCHAR *sURL, TCHAR *sDataRead) { BOOL rv = FALSE TCHAR *sFile = new TCHAR[1024](); StringCchCopy(sFile, 1024, L"c:tempfile.txt"); res = URLDownloadToFileW(NULL, sURL, sFile, 0, NULL); if (res != S_OK) StringCchCopy(sDataRead, 16, L"Error"); else { StringCchCopy(sDataRead, 16, L"File exists on remote server"); rv = TRUE; } delete[] sFile; return rv; } ..

Read more