Help! Help! Here is a issue about InternetReadFile function from Windows XP SP2 to XP SP3. RRS feed

  • Question

  •  The following code works fine in Windows xp sp2.

     TCHAR szBuffer[MAX_PATH+1];  // The value for MAX_PATH is 260
      CComBSTR sResponse;
      DWORD dwRead = 0;

      while (InternetReadFile(hOpen, szBuffer, MAX_PATH, &dwRead))
           if (dwRead == 0)

    But after upgrade XP SP2 to SP3, it will cause some issues about InternetReadFile function:
          If the length for data from the handle is bigger than/equal to MAX_PATH, InternetReadFile can get the data. 
          If the length for data is less than MAX_PATH, it will be no respone. It will stop here,can not get the data from the handle.

    This issue is only in some Windows XP SP3 OS(upgraded from XP SP2). What causes it? Is it up to OS setting?

    Tuesday, July 8, 2008 8:33 AM


  • 1) ask this question in a windows SDK forum. This is a C++ language forum
    2) Do not begin your thread titles with 'Help!, Help!' or 'Urgent' or 'Important!' or something similar. It is annoying and actually reduces your chances of getting a useful answer.
    • Marked as answer by Yan-Fei Wei Thursday, July 10, 2008 5:46 AM
    Tuesday, July 8, 2008 10:51 AM