jumping to documentation in VC++

Started by
0 comments, last by mike74 4 months, 3 weeks ago

I wrote this code to download a web page in VC++:

#include <windows.h>
#include <urlmon.h>
#include <iostream>

#pragma comment(lib, "urlmon.lib")

int main()
{
HRESULT hr;
LPCSTR url = "https://www.example.com";
LPCSTR filename = "example.html";

system("cd");

hr = URLDownloadToFile(NULL, url, filename, 0, NULL);
if (hr == S_OK)
{
 std::cout << "File downloaded successfully!" << std::endl;
}
else
{
 std::cout << "File download failed." << std::endl;
}

char cmd[80];
sprintf_s(cmd, 80, "type %s", filename);
system(cmd);

return 0;
}

I wanted to see the documentation for the system function, so I put the keyboard cursor on it and pressed F1.

For some reason, it opened a web page with documentation for this:

DTSFileSystemAttributes Enum

Anyone know what I'm doing wrong?

Thank you.

Mike C.http://www.coolgroups.com/zoomer/http://www.coolgroups.com/ez/

This topic is closed to new replies.

Advertisement