IWMPNetwork::getProxyExceptionList-Methode
Die getProxyExceptionList-Methode gibt die Proxyausnahmeliste zurück.
Syntax
public System.String getProxyExceptionList(
System.String bstrProtocol
);
Public Function getProxyExceptionList( _
ByVal bstrProtocol As System.String _
) As System.String
Implements IWMPNetwork.getProxyExceptionList
Parameter
-
bstrProtocol [ In]
-
Eine System.String, die der Protokollname ist. Eine Liste der unterstützten Protokolle finden Sie unter Unterstützte Protokolle und Dateitypen.
Rückgabewert
Eine System.String, die eine durch Semikolons getrennte Liste von Hosts ist, für die der Proxyserver umgangen wird. Der Wert ist nur sinnvoll, wenn IWMPNetwork.getProxySettings den Wert 2 zurückgibt (manuelle Einstellungen verwenden).
Bemerkungen
Dies ist eine Liste von Computern, Domänen und/oder Adressen, die den Proxyserver umgehen, wenn der Hostteil der Ziel-URL einem Eintrag in der Liste entspricht.
Das * Zeichen kann als Platzhalterzeichen zum Auflisten von Einträgen verwendet werden. Beispielsweise würde .com mit allen Hosts in der Com-Domäne übereinstimmen, während 67. mit allen Hosts * * im Subnetz der 67-Klasse A übereinstimmen würde.
Diese Methode schlägt fehl, es sei denn, die aufrufende Anwendung wird auf dem lokalen Computer oder Intranet ausgeführt.
Beispiele
Im folgenden Codebeispiel wird getProxyExceptionList verwendet, um anzuzeigen, ob Windows Media Player festgelegt ist, um den Proxyserver für lokale Adressen zu umgehen. Das AxWMPLib.AxWindowsMediaPlayer-Objekt wird durch die Variable player dargestellt.
// 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
Requirements (Anforderungen)
| Anforderung | Wert |
|---|---|
| Version |
Windows Media Player 9-Serie oder höher |
| Namespace |
WMPLib |
| Assembly |
|