123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- // scbc.tools.cpp : 定义 DLL 应用程序的导出函数。
- //
- #include "stdafx.h"
- #include "scbc.tools.h"
- #include "CurlClient.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #endif
- // 唯一的应用程序对象
- CWinApp theApp;
- using namespace std;
- int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
- {
- int nRetCode = 0;
- // 初始化 MFC 并在失败时显示错误
- if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
- {
- // TODO: 更改错误代码以符合您的需要
- _tprintf(_T("错误: MFC 初始化失败\n"));
- nRetCode = 1;
- }
- else
- {
- // TODO: 在此处为应用程序的行为编写代码。
- std::string data;
- CCurlClient curl;
- curl.Initialize();
- if ( curl.DownloadEx("https://dldir1.qq.com/weixin/Windows/WeChatSetup.exe", "D:\\WeChatSetup.exe", 5000) )
- printf("下载成功\n");
- else
- printf("下载失败\n");
- system("pause");
- }
- return nRetCode;
- }
|