Network.getProxyExceptionList 方法

[与此页面关联的功能(Windows 媒体播放器 SDK)是旧版功能。 它已被 MediaPlayer 取代。 MediaPlayer 已针对Windows 10和Windows 11进行了优化。 如果可能,Microsoft 强烈建议新代码使用 MediaPlayer 而不是 Windows 媒体播放器 SDK。 如果可能,Microsoft 建议重写使用旧 API 的现有代码以使用新 API。]

getProxyExceptionList 方法检索代理异常列表。

语法

strRetVal = Network.getProxyExceptionList(
  protocol
)

parameters

协议 [in]

指定协议名称的字符串。 有关受支持协议的列表,请参阅 支持的协议和文件类型

返回值

此方法返回一个 String 类型的值,该值指定绕过代理服务器的主机的分号分隔列表。 仅当 getProxySettings 返回两个值 (使用手动设置) 时,返回的值才有意义。

备注

这是一个计算机、域和/或地址的列表,当目标 URL 的主机部分与列表中的条目匹配时,这些计算机、域和/或地址将绕过代理服务器。

* 字符可用作列出条目的通配符。 例如,*.com 将匹配 com 域中的所有主机,而 67.* 将匹配 67 A 类子网中的所有主机。

除非调用应用程序在本地计算机或 Intranet 上运行,否则此方法将失败。

Windows 媒体播放器 10 移动版:不支持此方法。

示例

以下 JScript 示例使用 网络getProxyExceptionList ,用于显示 MMS 和 HTTP 协议的绕过代理的列表。 创建的 Player 对象 ID 为“Player”。

// Test whether the HTTP proxy settings are manual.
if (Player.network.getProxySettings("HTTP") == 2)

   // Get the proxy exception list for HTTP.
   var proxyExceptionListHTTP = Player.network.getProxyExceptionList("HTTP");

// Test whether the MMS proxy settings are manual.
if (Player.network.getProxySettings("MMS") == 2)

   // Get the proxy exception list for MMS.
   var proxyExceptionListMMS = Player.network.getProxyExceptionList("MMS");

// Display the proxy exception lists in the browser client area.
// Unavailable proxy exception lists will display as "undefined".
document.write("The current HTTP proxy exception list: " + proxyExceptionListHTTP);
document.write("<BR>");
document.write("The current MMS proxy exception list: " + proxyExceptionListMMS);

要求

要求
版本
Windows 媒体播放器版本 7.0 或更高版本。
DLL
Wmp.dll

另请参阅

网络对象

Network.getProxySettings