简体   繁体   English

WinHttpRequest.5.1 是 Windows 11 的好 API 还是需要 Iexplorer?

[英]Is WinHttpRequest.5.1 a good API for Windows 11 or does it require Iexplorer?

I am using this code to load files during setup, is WinHttpRequest.5.1 a good API for Windows 11 or does this API have some dependensies to Internet Explorer?我在设置过程中使用此代码加载文件,WinHttpRequest.5.1 是 Windows 11 的良好 API 还是此 API 对 Internet Explorer 有一些依赖?

function DownloadFile(const AURL: string; var AResponse: string): Boolean;
var
  WinHttpRequest: Variant;
begin
  Result := True;
  try
    WinHttpRequest := CreateOleObject('WinHttp.WinHttpRequest.5.1');
    WinHttpRequest.Open('GET', AURL, False);
    WinHttpRequest.Send;
    AResponse := WinHttpRequest.ResponseText;
  except
    Result := False;
    AResponse := GetExceptionMessage;
  end;
end;

I do not think that WinHttpRequest has dependency on Internet Explorer.我不认为WinHttpRequest依赖于 Internet Explorer。 And even if it did depend on some internals of IE, I'm sure Microsoft would keep those internals to keep the WinHttpRequest working.即使它确实依赖于 IE 的某些内部结构,我相信微软会保留这些内部结构以保持WinHttpRequest正常工作。

In any case, WinHttpRequest still works on Windows 11.无论如何, WinHttpRequest仍然适用于 Windows 11。

From the document https://docs.microsoft.com/en-us/windows/win32/winhttp/winhttp-versions :从文档https://docs.microsoft.com/en-us/windows/win32/winhttp/winhttp-versions

WinHTTP Versions WinHTTP 版本

01/07/2021 2021 年 1 月 7 日

Users of Microsoft Windows HTTP Services (WinHTTP) should use the latest version of the technology, version 5.1. Microsoft Windows HTTP 服务 (WinHTTP) 的用户应使用该技术的最新版本 5.1。 Version 5.0 is no longer supported.不再支持 5.0 版。

Version 5.1 5.1 版

WinHTTP 5.1 offers improvements over version 5.0; WinHTTP 5.1 提供了对 5.0 版的改进; for more information about new features, see What's New in WinHTTP 5.1 .有关新功能的更多信息,请参阅WinHTTP 5.1 中的新增功能。

With version 5.1, WinHTTP is an operating-system component of the following operating systems:对于 5.1 版,WinHTTP是以下操作系统的操作系统组件

  • Windows 2000, Service Pack 3 and later (except Datacenter Server) Windows 2000,Service Pack 3 及更高版本(数据中心服务器除外)
  • Windows XP with Service Pack 1 (SP1) and later Windows Server 2003 with Service Pack 1 (SP1) and later Windows XP 带 Service Pack 1 (SP1) 及更高版本 Windows Server 2003 带 Service Pack 1 (SP1) 及更高版本

... ...

Given that it says "Windows 2000...and later" it seems clear that this is a component you can reliably use in Win11.鉴于它说“Windows 2000 ...及更高版本”,显然这是一个您可以在 Win11 中可靠使用的组件。 And it has nothing to do with IE.和IE无关。 (*) (*)


(*) It sounds like according to this page at one time IE may have been a dependency: " Redistributable: WinHTTP 5.0 and Internet Explorer 5.01 or later on Windows XP and Windows 2000. " (*) 根据此页面,有时 IE 可能是一个依赖项:“可再发行:Windows XP 和 Windows 2000 上的 WinHTTP 5.0 和 Internet Explorer 5.01 或更高版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 .NET 框架检测 Windows 11 或 Windows API - Detect Windows 11 with .NET Framework or Windows API Windows 10/11:为什么 API GetMonitorInfo 返回错误的工作区坐标? - Windows 10/11: Why does the API GetMonitorInfo returns wrong work area coordinates? 使用CMake 2.8.11.2编译osgQt(Windows7 MSVS11 Qt 5.1 OSG 3.2.0) - Compiling osgQt (Windows7 MSVS11 Qt 5.1 OSG 3.2.0) with CMake 2.8.11.2 为什么Windows要求导入DLL数据? - Why does Windows require DLL data to be imported? Internet Explorer 11在Windows 7和Windows 8.1之间有何不同? - How does Internet Explorer 11 differ between Windows 7 and Windows 8.1? Windows 是否需要对用户模式驱动程序进行签名? - Does windows require a user-mode driver to be signed? 什么是在 Windows 上启动的好的“NOP”可执行文件,它是内置的并且什么都不做? - What is a good "NOP" executable to start on Windows that is built-in and does nothing? 在 Windows 11 上安装 tensorflow 对象检测 API,卡在安装 pycocotools - Installing tensorflow object detection API on Windows 11, stuck on installation of pycocotools flexbox无法在Safari 5.1 Windows中运行 - flexbox not working in safari 5.1 windows MAUI:OpenAppPackageFileAsync 不想在 windows 11 上打开我的文件 - MAUI: OpenAppPackageFileAsync does not want to open my files on windows 11
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM