├── README.md └── WinHTTP ├── WinHTTP.sln └── WinHTTP ├── ReadMe.txt ├── TLBufferVector.cpp ├── TLBufferVector.h ├── TLDownloadTask.cpp ├── TLDownloadTask.h ├── TLWebDef.h ├── TLWinHttpDownloader.cpp ├── TLWinHttpDownloader.h ├── WinHTTP.cpp ├── WinHTTP.vcxproj ├── WinHTTP.vcxproj.filters ├── WinHTTP.vcxproj.user ├── stdafx.cpp ├── stdafx.h └── targetver.h /README.md: -------------------------------------------------------------------------------- 1 | # WinhttpDownloader 2 | base on winHttp to develep download 3 | -------------------------------------------------------------------------------- /WinHTTP/WinHTTP.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinHTTP", "WinHTTP\WinHTTP.vcxproj", "{6612D366-46E5-4CC8-801C-8011E089F4BE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {6612D366-46E5-4CC8-801C-8011E089F4BE}.Debug|x64.ActiveCfg = Debug|x64 17 | {6612D366-46E5-4CC8-801C-8011E089F4BE}.Debug|x64.Build.0 = Debug|x64 18 | {6612D366-46E5-4CC8-801C-8011E089F4BE}.Debug|x86.ActiveCfg = Debug|Win32 19 | {6612D366-46E5-4CC8-801C-8011E089F4BE}.Debug|x86.Build.0 = Debug|Win32 20 | {6612D366-46E5-4CC8-801C-8011E089F4BE}.Release|x64.ActiveCfg = Release|x64 21 | {6612D366-46E5-4CC8-801C-8011E089F4BE}.Release|x64.Build.0 = Release|x64 22 | {6612D366-46E5-4CC8-801C-8011E089F4BE}.Release|x86.ActiveCfg = Release|Win32 23 | {6612D366-46E5-4CC8-801C-8011E089F4BE}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | 控制台应用程序:WinHTTP 项目概述 3 | ======================================================================== 4 | 5 | 应用程序向导已为您创建了此 WinHTTP 应用程序。 6 | 7 | 本文件概要介绍组成 WinHTTP 应用程序的每个文件的内容。 8 | 9 | 10 | WinHTTP.vcxproj 11 | 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 12 | 13 | WinHTTP.vcxproj.filters 14 | 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 15 | 16 | WinHTTP.cpp 17 | 这是主应用程序源文件。 18 | 19 | ///////////////////////////////////////////////////////////////////////////// 20 | 其他标准文件: 21 | 22 | StdAfx.h, StdAfx.cpp 23 | 这些文件用于生成名为 WinHTTP.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | 其他注释: 27 | 28 | 应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/TLBufferVector.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TLBufferVector.h" 3 | 4 | 5 | -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/TLBufferVector.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Micats/WinhttpDownloader/1758e5cf9f9672260a4b8e8f07cb5c9036415e38/WinHTTP/WinHTTP/TLBufferVector.h -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/TLDownloadTask.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Micats/WinhttpDownloader/1758e5cf9f9672260a4b8e8f07cb5c9036415e38/WinHTTP/WinHTTP/TLDownloadTask.cpp -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/TLDownloadTask.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Micats/WinhttpDownloader/1758e5cf9f9672260a4b8e8f07cb5c9036415e38/WinHTTP/WinHTTP/TLDownloadTask.h -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/TLWebDef.h: -------------------------------------------------------------------------------- 1 | #ifndef UPDATER_WEB_TLWEBDEF_H 2 | #define UPDATER_WEB_TLWEBDEF_H 3 | #include 4 | 5 | 6 | #define WM_UPDATER_PROGRESS_VALUE (WM_USER + 530) 7 | #define WM_UPDATER_PROGRESS_STEP (WM_USER + 1027) 8 | #define WM_UPDATER_UPDATE_VERSION (WM_USER + 999) 9 | 10 | typedef struct tagTLProgressData { 11 | CString m_strProgress; 12 | BOOL m_bFinished; 13 | BOOL m_bEnableCancel; 14 | tagTLProgressData(CString strProgress, BOOL bFinished, BOOL bEnableCancel); 15 | } TLProgressData; 16 | 17 | extern const LPCTSTR UPDATE_AGENT; 18 | 19 | typedef enum tagTLEUpdateError { 20 | THE_SUCCEED = 0, 21 | THE_VERSION_LATEST = 1, 22 | THE_IN_PROGRESS, 23 | THE_USER_CANCELED1, 24 | THE_USER_CANCELED2, 25 | THE_USER_CANCELED3, 26 | THE_REQUEST_CONFIG, 27 | THE_GET_DOWNLOAD_URL, 28 | THE_REDIRECT, 29 | THE_CREATE_SOCKET, 30 | THE_GET_HOST_BY_NAME, 31 | THE_CONNECT_SOCKET, 32 | THE_SET_SOCK_OPT1, 33 | THE_SET_SOCK_OPT2, 34 | THE_SEND_HTTP_HEADER, 35 | THE_INVALID_RECV_END, 36 | THE_NO_CONTENT_LENGTH, 37 | THE_NO_REDIRECT_LOCATION, 38 | THE_REDIRECT_INVALID_FORMAT, 39 | THE_INVALID_STATUS_CODE, 40 | THE_RECV_FAIL, 41 | THE_CREATE_FILE, 42 | THE_WRITE_FILE, 43 | THE_MD5_CHECK_FAIL, 44 | THE_USER_CANCEL_INSTALL, 45 | THE_RUN_INSTALLER, 46 | THE_GET_INSTALL_DIR, 47 | THE_RUN_PROGRAM, 48 | _C_ERROR_COUNT 49 | } TLEUpdateError; 50 | 51 | void SendPingback(LPCTSTR szPingback); 52 | 53 | void SendStartupPingaback(); 54 | void SendEndPingback(int nRet); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/TLWinHttpDownloader.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Micats/WinhttpDownloader/1758e5cf9f9672260a4b8e8f07cb5c9036415e38/WinHTTP/WinHTTP/TLWinHttpDownloader.cpp -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/TLWinHttpDownloader.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Micats/WinhttpDownloader/1758e5cf9f9672260a4b8e8f07cb5c9036415e38/WinHTTP/WinHTTP/TLWinHttpDownloader.h -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/WinHTTP.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Micats/WinhttpDownloader/1758e5cf9f9672260a4b8e8f07cb5c9036415e38/WinHTTP/WinHTTP/WinHTTP.cpp -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/WinHTTP.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {6612D366-46E5-4CC8-801C-8011E089F4BE} 23 | Win32Proj 24 | WinHTTP 25 | 8.1 26 | 27 | 28 | 29 | Application 30 | true 31 | v140 32 | Unicode 33 | Dynamic 34 | 35 | 36 | Application 37 | false 38 | v140 39 | true 40 | Unicode 41 | 42 | 43 | Application 44 | true 45 | v140 46 | Unicode 47 | 48 | 49 | Application 50 | false 51 | v140 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | true 75 | 76 | 77 | true 78 | 79 | 80 | false 81 | 82 | 83 | false 84 | 85 | 86 | 87 | Use 88 | Level3 89 | Disabled 90 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 91 | false 92 | 93 | 94 | Console 95 | true 96 | 97 | 98 | 99 | 100 | Use 101 | Level3 102 | Disabled 103 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 104 | true 105 | 106 | 107 | Console 108 | true 109 | 110 | 111 | 112 | 113 | Level3 114 | Use 115 | MaxSpeed 116 | true 117 | true 118 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 119 | true 120 | 121 | 122 | Console 123 | true 124 | true 125 | true 126 | 127 | 128 | 129 | 130 | Level3 131 | Use 132 | MaxSpeed 133 | true 134 | true 135 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 136 | true 137 | 138 | 139 | Console 140 | true 141 | true 142 | true 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | Create 160 | Create 161 | Create 162 | Create 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/WinHTTP.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 头文件 23 | 24 | 25 | 头文件 26 | 27 | 28 | 头文件 29 | 30 | 31 | 头文件 32 | 33 | 34 | 头文件 35 | 36 | 37 | 头文件 38 | 39 | 40 | 41 | 42 | 源文件 43 | 44 | 45 | 源文件 46 | 47 | 48 | 源文件 49 | 50 | 51 | 源文件 52 | 53 | 54 | 源文件 55 | 56 | 57 | -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/WinHTTP.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Micats/WinhttpDownloader/1758e5cf9f9672260a4b8e8f07cb5c9036415e38/WinHTTP/WinHTTP/stdafx.cpp -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Micats/WinhttpDownloader/1758e5cf9f9672260a4b8e8f07cb5c9036415e38/WinHTTP/WinHTTP/stdafx.h -------------------------------------------------------------------------------- /WinHTTP/WinHTTP/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Micats/WinhttpDownloader/1758e5cf9f9672260a4b8e8f07cb5c9036415e38/WinHTTP/WinHTTP/targetver.h --------------------------------------------------------------------------------