Metodo IWMPNetwork::getProxyExceptionList
[La funzionalità associata a questa pagina, Lettore multimediale Windows SDK, è una funzionalità legacy. È stato sostituito da MediaPlayer. MediaPlayer è stato ottimizzato per Windows 10 e Windows 11. Microsoft consiglia vivamente che il nuovo codice usi MediaPlayer invece di Lettore multimediale Windows SDK, quando possibile. Microsoft suggerisce che il codice esistente che usa le API legacy venga riscritto per usare le nuove API, se possibile.
Il metodo getProxyExceptionList restituisce l'elenco di eccezioni proxy.
Sintassi
public System.String getProxyExceptionList(
System.String bstrProtocol
);
Public Function getProxyExceptionList( _
ByVal bstrProtocol As System.String _
) As System.String
Implements IWMPNetwork.getProxyExceptionList
Parametri
-
bstrProtocol [in]
-
System.String che rappresenta il nome del protocollo. Per un elenco dei protocolli supportati, vedere Protocolli e tipi di file supportati.
Valore restituito
Oggetto System.String che rappresenta un elenco delimitato da punto e virgola di host per cui il server proxy viene ignorato. Il valore è significativo solo quando IWMPNetwork.getProxySettings restituisce un valore pari a 2 (usare le impostazioni manuali).
Commenti
Questo è un elenco di computer, domini e/o indirizzi che ignorano il server proxy quando la parte host dell'URL di destinazione corrisponde a una voce nell'elenco.
Il carattere * può essere usato come carattere jolly per elencare le voci. Ad esempio, *.com corrisponde a tutti gli host nel dominio com, mentre 67.* corrisponde a tutti gli host nella subnet A della classe 67.
Questo metodo non riesce a meno che l'applicazione chiamante non sia in esecuzione nel computer locale o nella intranet.
Esempio
L'esempio di codice seguente usa getProxyExceptionList per visualizzare se Lettore multimediale Windows è impostato per ignorare il server proxy per gli indirizzi locali. L'oggetto AxWMPLib.AxWindowsMediaPlayer è rappresentato dalla variabile denominata 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
Requisiti
Requisito | Valore |
---|---|
Versione |
Lettore multimediale Windows serie 9 o successive |
Spazio dei nomi |
WMPLib |
Assembly |
|
Vedi anche
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per