Método IWMPNetwork::getProxyExceptionList

[La característica asociada a esta página, Reproductor multimedia de Windows SDK, es una característica heredada. Se ha reemplazado por MediaPlayer. MediaPlayer se ha optimizado para Windows 10 y Windows 11. Microsoft recomienda encarecidamente que el nuevo código use MediaPlayer en lugar de Reproductor multimedia de Windows SDK, siempre que sea posible. Microsoft sugiere que el código existente que usa las API heredadas se reescriba para usar las nuevas API si es posible.

El método getProxyExceptionList devuelve la lista de excepciones de proxy.

Sintaxis

public System.String getProxyExceptionList(
  System.String bstrProtocol
);

Public Function getProxyExceptionList( _
  ByVal bstrProtocol As System.String _
) As System.String
Implements IWMPNetwork.getProxyExceptionList

Parámetros

bstrProtocol [in]

System.String que es el nombre del protocolo. Para obtener una lista de los protocolos admitidos, consulte Protocolos admitidos y tipos de archivo.

Valor devuelto

System.String que es una lista delimitada por punto y coma de hosts para los que se omite el servidor proxy. El valor solo es significativo cuando IWMPNetwork.getProxySettings devuelve un valor de 2 (use la configuración manual).

Observaciones

Se trata de una lista de equipos, dominios o direcciones que omitirán el servidor proxy cuando la parte host de la dirección URL de destino coincida con una entrada de la lista.

El carácter * se puede usar como carácter comodín para enumerar entradas. Por ejemplo, *.com coincidiría con todos los hosts del dominio com, mientras que 67.* coincidiría con todos los hosts de la subred A de la clase 67.

Este método produce un error a menos que la aplicación que realiza la llamada se ejecute en el equipo local o en la intranet.

Ejemplos

En el ejemplo de código siguiente se usa getProxyExceptionList para mostrar si Reproductor multimedia de Windows está establecido para omitir el servidor proxy para las direcciones locales. El objeto AxWMPLib.AxWindowsMediaPlayer se representa mediante la variable denominada player.

// String values to hold the results of calls to getProxyExceptionList. 
string proxyExceptionListHTTP = "";
string proxyExceptionListMMS = "";

// Test whether the HTTP proxy settings are manual.
if (player.network.getProxySettings("HTTP") == 2)
{
    proxyExceptionListHTTP = player.network.getProxyExceptionList("HTTP");
}

// Test whether the MMS proxy settings are manual.
if (player.network.getProxySettings("MMS") == 2)
{
    proxyExceptionListMMS = player.network.getProxyExceptionList("MMS");
}

// Store the proxy exception lists in a string array and display them
// using a multi-line text box. Unavailable exception lists will display
// as "undefined".
proxyExList[0] = ("The current HTTP proxy exception list: " + proxyExceptionListHTTP);
proxyExList[1] = ("The current MMS proxy exception list: " + proxyExceptionListMMS);
proxyExceptionListText.Lines = proxyExList;

' String values to hold the results of calls to getProxyExceptionList. 
Dim proxyExceptionListHTTP As String = ""
Dim proxyExceptionListMMS As String = ""

' Test whether the HTTP proxy settings are manual.
If (player.network.getProxySettings("HTTP") = 2) Then

    proxyExceptionListHTTP = player.network.getProxyExceptionList("HTTP")

End If

' Test whether the MMS proxy settings are manual.
If (player.network.getProxySettings("MMS") = 2) Then

    proxyExceptionListMMS = player.network.getProxyExceptionList("MMS")

End If

' Store the proxy exception lists in a string array and display them
' using a multi-line text box. Unavailable exception lists will display
' as "undefined".
proxyExList(0) = ("The current HTTP proxy exception list: " + proxyExceptionListHTTP)
proxyExList(1) = ("The current MMS proxy exception list: " + proxyExceptionListMMS)
proxyExceptionList.Lines = proxyExList

Requisitos

Requisito Value
Versión
Reproductor multimedia de Windows serie 9 o posterior
Espacio de nombres
WMPLib
Ensamblado
Interop.WMPLib.dll (Interop.WMPLib.dll.dll)

Consulte también

Interfaz IWMPNetwork (VB y C#)

IWMPNetwork.getProxySettings (VB y C#)

IWMPNetwork.setProxyExceptionList (VB y C#)