In WinInet, what is objectname, the second argument to CHttpConnection::OpenRequest()

In WinInet, what should I use for objectname, the second argument to CHttpConnection::OpenRequest() ?
I am using this function to get a pointer to a CHttpFile file, in order to get data from a web site.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This is the part of the URL that follows the third slash. Take for example the current URL:

Open in new window

The Protocol (http), server ( will be used in your first call when you create the CHttpConnection object. Then you call the OpenRequest pass "questions/28711676/In-WinInet-what-is-objectname-the-second-argument-to-CHttpConnection-OpenRequest.html" as the second argument

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Here is a small chunk of code to get you started. I am using InternetCrackUrl function to split the URL in pieces:
CString urlfull(_T(""));
  URL_COMPONENTS url = {0};
  CString host;
  CString path;

  // zero out url structure and set options
  memset(&url, 0, sizeof(url));
  url.dwStructSize = sizeof(url);
  url.dwHostNameLength = 1;
  url.dwUserNameLength = 1;
  url.dwPasswordLength = 1;
  url.dwUrlPathLength = 1;

  // crack the url (break it into its main parts)
  if(::InternetCrackUrl(urlfull, 0, 0, &url))
    if (url.dwHostNameLength > 0) host.SetString(url.lpszHostName, url.dwHostNameLength);
    if (url.dwUrlPathLength > 0)  path.SetString(url.lpszUrlPath, url.dwUrlPathLength);

    CHttpSession httpSession(_T("testApp"),1,PRE_CONFIG_INTERNET_ACCESS);

    CHttpConnection* pHttpConnection = NULL;
    pHttpConnection = httpSession.GetHttpConnection(host);
pHttpConnection->OpenRequest(_T("GET"), path);

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.