Share via


Windows Media Player 11 SDK IWMPNetwork.getProxyExceptionList (VB and C#) 

Windows Media Player SDK banner art

Previous Next

IWMPNetwork.getProxyExceptionList (VB and C#)

The getProxyExceptionList method returns the proxy exception list.

  

Parameters

bstrProtocol

A System.String that is the protocol name. For a list of supported protocols, see Supported Protocols and File Types.

Return Value

A System.String that is a semicolon-delimited list of hosts for which the proxy server is bypassed. The value is meaningful only when IWMPNetwork.getProxySettings returns a value of 2 (use manual settings).

Remarks

This is a list of computers, domains, and/or addresses that will bypass the proxy server when the host portion of the target URL matches an entry in the list.

The * character can be used as a wildcard character for listing entries. For example, *.com would match all hosts in the com domain, while 67.* would match all hosts in the 67 class A subnet.

This method fails unless the calling application is running on the local computer or intranet.

Example Code

The following code example uses getProxyExceptionList to display whether Windows Media Player is set to bypass the proxy server for local addresses. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.

  
' 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

FakePre-1c6008ece2d6478da09fbc5fb14c5edf-78f4403286504f3b8e1174f7f1b1a542

// 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;

Requirements

Version: Windows Media Player 9 Series or later

Namespace: WMPLib

Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)

See Also

Previous Next