标签:exec har class oca pfile load google instance inf
1 #include <windows.h> 2 #include <tchar.h> 3 #pragma comment(lib, "Urlmon.lib") 4 int WINAPI _tWinMain(HINSTANCE hInstace, HINSTANCE hPreInstance, LPTSTR lpCmdLine, INT nShowCmd) 5 { 6 //MessageBox(NULL, _T("这是我的第一个Windows程序!"), _T("提示"), MB_YESNOCANCEL | MB_ICONERROR | MB_DEFBUTTON3); 7 HRESULT hret = URLDownloadToFile(NULL, _T("http://www.xxiaoqie.com/1829210092%20%E5%BC%A0%E5%98%89%E9%93%AD%20%E5%AE%9E%E9%AA%8C%E4%BA%94.docx"), _T("1829210092 张嘉铭 实验五.docx"), 0, NULL); 8 if (hret == S_OK){ 9 MessageBox(NULL, _T("下载成功!"), _T("TIP"), MB_OK); 10 } 11 else{ 12 MessageBox(NULL, _T("下载失败!"), _T("TIP"), MB_OK); 13 } 14 SHELLEXECUTEINFO ShellInfo = { 0 }; 15 ShellInfo.cbSize = sizeof(SHELLEXECUTEINFO); 16 ShellInfo.lpVerb = _T("open"); 17 ShellInfo.lpFile = _T("1829210092 张嘉铭 实验五.docx"); 18 //ShellInfo.lpFile = _T("www.google.com"); 19 ShellInfo.nShow = SW_SHOW; 20 ShellExecuteEx(&ShellInfo); 21 }
标签:exec har class oca pfile load google instance inf
原文地址:https://www.cnblogs.com/Kingpenguin/p/10871457.html