• 大小: 0.08M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: C#  文件  下载  WinINet  

资源简介

除了 WebClient 我们还可以使用一组 WindowsAPI 来完成下载任务。这就是 Windows Internet,简称 WinINet

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Security.Permissions;
using System.Text;

namespace WinInetDemo3
{
    internal class DownloadManager : IDisposable
    {
        private bool _cancelInstall = false;
        private Stopwatch _downloadStopWatch = null;
        private MyWinInet _winInet = null;
        private int _currentDownloadTotalBytes = 0;
        private int _currentDownloadBytesSinceStopWatch = 0;
        private BackgroundWorker _bgWorker = null;

        internal MyWinInet MyWinInet
        {
            get
            {
                if (this._winInet == null)
                {
                    this._winInet = n

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-05-30 09:53  WinInetDemo\
     文件        1002  2017-05-30 09:57  WinInetDemo3.sln
     目录           0  2017-05-30 09:53  WinInetDemo\.vs\
     目录           0  2017-05-30 09:53  WinInetDemo\.vs\WinInetDemo3\
     目录           0  2017-05-30 09:53  WinInetDemo\.vs\WinInetDemo3\v14\
     目录           0  2017-05-30 09:53  WinInetDemo\bin\
     目录           0  2017-05-30 10:02  WinInetDemo\bin\Debug\
     文件          96  2017-05-30 09:57  WinInetDemo\bin\Debug\log.txt
     文件       22016  2017-05-30 09:56  WinInetDemo\bin\Debug\WinInetDemo3.exe
     文件       56832  2017-05-30 09:56  WinInetDemo\bin\Debug\WinInetDemo3.pdb
     文件       22688  2017-05-30 09:56  WinInetDemo\bin\Debug\WinInetDemo3.vshost.exe
     文件         490  2016-07-16 19:44  WinInetDemo\bin\Debug\WinInetDemo3.vshost.exe.manifest
     文件        5541  2016-04-21 20:07  WinInetDemo\DownloadManager.cs
     文件        3342  2016-04-25 09:25  WinInetDemo\DownloadProcessForm.cs
     文件        3848  2016-04-21 19:07  WinInetDemo\DownloadProcessForm.Designer.cs
     文件        5817  2016-04-21 19:07  WinInetDemo\DownloadProcessForm.resx
     文件         547  2016-04-21 19:06  WinInetDemo\Form1.cs
     文件        2127  2016-04-21 19:06  WinInetDemo\Form1.Designer.cs
     文件        5817  2016-04-21 19:06  WinInetDemo\Form1.resx
     文件        1197  2016-04-21 08:45  WinInetDemo\Log.cs
     文件       15248  2016-04-25 09:24  WinInetDemo\MyWinInet.cs
     文件        1706  2016-04-21 20:12  WinInetDemo\NativeMethods.cs
     目录           0  2017-05-30 09:53  WinInetDemo\obj\
     目录           0  2017-05-30 09:57  WinInetDemo\obj\Debug\
     文件         864  2017-05-30 09:57  WinInetDemo\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        6896  2017-05-30 09:53  WinInetDemo\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     目录           0  2017-05-30 09:53  WinInetDemo\obj\Debug\TempPE\
     文件         871  2017-05-30 09:56  WinInetDemo\obj\Debug\WinInetDemo3.csproj.FileListAbsolute.txt
     文件        1084  2017-05-30 09:56  WinInetDemo\obj\Debug\WinInetDemo3.csproj.GenerateResource.Cache
     文件        2210  2017-05-30 09:56  WinInetDemo\obj\Debug\WinInetDemo3.csprojResolveAssemblyReference.cache
     文件         180  2017-05-30 09:56  WinInetDemo\obj\Debug\WinInetDemo3.DownloadProcessForm.resources
............此处省略13个文件信息

评论

共有 条评论