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 issue

wininet issue

Scheduled Pinned Locked Moved C / C++ / MFC
comtoolshelptutorialquestion
1 Posts 1 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.
  • L Offline
    L Offline
    Lucky the code machine
    wrote on last edited by
    #1

    I am using the following code example (found on code project), but the page returned in page1 is www.codeproject.com/info/search.aspx and not www.codeproject.com/info/search.aspx?artkw=wininet. #include "afxinet.h" CInternetSession sess; CHttpConnection* pHttpConnection1 = sess.GetHttpConnection(_T("www.codeproject.com")); CHttpFile* pFile1 = pHttpConnection1->OpenRequest(_T("POST"), _T("/info/search.aspx")); CString header1 = _T("Content-Type: application/x-www-form-urlencoded"); CString mdata1 = _T("artkw=wininet"); pFile1->SendRequest(header1, header1.GetLength(), (LPVOID)(LPCTSTR)mdata1, mdata1.GetLength()); DWORD dwRet1; CString page1; pFile1->QueryInfoStatusCode(dwRet1); if (dwRet1 == HTTP_STATUS_OK){ char buf12[999999]; pFile1->Read(buf12, 999999); page1 = buf12; } I found this code here: http://www.codeproject.com/script/Forums/View.aspx?fid=1647&msg=1603553[^] What am I doing wrong? :sigh:

    Lucky

    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