IWMPNetwork::getProxyBypassForLocal-Methode
Die getProxyBypassForLocal-Methode gibt einen Wert zurück, der angibt, ob der Proxyserver umgangen wird, wenn sich der Ursprungsserver in einem lokalen Netzwerk befindet.
Syntax
public System.Boolean getProxyBypassForLocal(
System.String bstrProtocol
);
Public Function getProxyBypassForLocal( _
ByVal bstrProtocol As System.String _
) As System.Boolean
Implements IWMPNetwork.getProxyBypassForLocal
Parameter
-
bstrProtocol
-
Eine System.String,die der Protokollname ist.
Rückgabewert
Ein System.Boolean-Wert, der angibt, ob der Proxyserver umgangen wird. Der Wert ist nur sinnvoll, wenn IWMPNetwork.getProxySettings den Wert 2 zurückgibt (manuelle Einstellungen verwenden).
Hinweise
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 getProxyBypassForLocal verwendet, um anzuzeigen, ob Windows Media Player so festgelegt ist, dass der Proxyserver für lokale Adressen umgangen wird. Das AxWMPLib.AxWindowsMediaPlayer-Objekt wird durch die Variable player dargestellt.
' Boolean values to hold the results of calls to getProxyBypassForLocal.
Dim proxyBypassForLocalHTTP As Boolean = False
Dim proxyBypassForLocalMMS As Boolean = False
' Test whether the HTTP proxy settings are manual.
If (player.network.getProxySettings("HTTP") = 2) Then
proxyBypassForLocalHTTP = player.network.getProxyBypassForLocal("HTTP")
End If
' Test whether the MMS proxy settings are manual.
If (player.network.getProxySettings("MMS") = 2) Then
proxyBypassForLocalMMS = player.network.getProxyBypassForLocal("MMS")
End If
' Store the proxy bypass for local values in a string array and display them
' using a multi-line text box. Unavailable proxy bypass for local values will display
' as "undefined".
proxyInfo(0) = ("The current HTTP proxy bypass for local value: " + proxyBypassForLocalHTTP.ToString())
proxyInfo(1) = ("The current MMS proxy bypass for local value: " + proxyBypassForLocalMMS.ToString())
proxyBypassText.Lines = proxyInfo
// Boolean values to hold the results of calls to getProxyBypassForLocal.
bool proxyBypassForLocalHTTP = false;
bool proxyBypassForLocalMMS = false;
// Test whether the HTTP proxy settings are manual.
if (player.network.getProxySettings("HTTP") == 2)
{
proxyBypassForLocalHTTP = player.network.getProxyBypassForLocal("HTTP");
}
// Test whether the MMS proxy settings are manual.
if (player.network.getProxySettings("MMS") == 2)
{
proxyBypassForLocalMMS = player.network.getProxyBypassForLocal("MMS");
}
// Store the proxy bypass for local values in a string array and display them
// using a multi-line text box. Unavailable proxy bypass for local values will display
// as "undefined".
proxyInfo[0] = ("The current HTTP proxy bypass for local value: " + proxyBypassForLocalHTTP.ToString());
proxyInfo[1] = ("The current MMS proxy bypass for local value: " + proxyBypassForLocalMMS.ToString());
proxyBypassText.Lines = proxyInfo;
Anforderungen
| Anforderung | Wert |
|---|---|
| Version |
Windows Media Player 9er Serie oder höher |
| Namespace |
WMPLib |
| Assembly |
|