Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. wininet

wininet

Scheduled Pinned Locked Moved C / C++ / MFC
html
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jeremysay
    wrote on last edited by
    #1

    hello i'm working with wininet and i want to get the header of http querries. i can get the html source code, but no the header. thx

    M S 2 Replies Last reply
    0
    • J jeremysay

      hello i'm working with wininet and i want to get the header of http querries. i can get the html source code, but no the header. thx

      M Offline
      M Offline
      Mike Nordell
      wrote on last edited by
      #2

      Isn't that how it's supposed to work? If you want the header also, perhaps you should instead use plain sockets.

      1 Reply Last reply
      0
      • J jeremysay

        hello i'm working with wininet and i want to get the header of http querries. i can get the html source code, but no the header. thx

        S Offline
        S Offline
        Sigmund
        wrote on last edited by
        #3

        Try.. BOOL HttpQueryInfo( HINTERNET hRequest, DWORD dwInfoLevel, LPVOID lpvBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex ); and set dwInfoLevel to HTTP_QUERY_RAW_HEADERS or HTTP_QUERY_RAW_HEADERS_CRLF. You can se more on this function in MSDN

        J 1 Reply Last reply
        0
        • S Sigmund

          Try.. BOOL HttpQueryInfo( HINTERNET hRequest, DWORD dwInfoLevel, LPVOID lpvBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex ); and set dwInfoLevel to HTTP_QUERY_RAW_HEADERS or HTTP_QUERY_RAW_HEADERS_CRLF. You can se more on this function in MSDN

          J Offline
          J Offline
          jeremysay
          wrote on last edited by
          #4

          thx, I have already use this function but i have the error 87. you know why

          S 1 Reply Last reply
          0
          • J jeremysay

            thx, I have already use this function but i have the error 87. you know why

            S Offline
            S Offline
            Sigmund
            wrote on last edited by
            #5

            If you get error code 87 (witch is ERROR_INVALID_PARAMETER) when calling GetLastError(), this meen that you pass some invalid argument to this function.

            J 1 Reply Last reply
            0
            • S Sigmund

              If you get error code 87 (witch is ERROR_INVALID_PARAMETER) when calling GetLastError(), this meen that you pass some invalid argument to this function.

              J Offline
              J Offline
              jeremysay
              wrote on last edited by
              #6

              i do this :

              DWORD dwIndex;
              CString str;
              

              !pURLFile->QueryInfo(HTTP_QUERY_RAW_HEADERS,&str,&dwIndex)
              {
              DWORD dwErr = GetLastError();
              CString erreur;
              erreur.Format("%d",dwErr);
              AfxMessageBox(erreur);
              }

              you know where is the problem ??

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups