Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMPNetwork.setProxyExceptionList (VB and C#)
The setProxyExceptionList method specifies 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.
pbstrExceptionList
A System.String that is a semicolon-delimited list of hosts for which the proxy server is bypassed. Leading and trailing spaces should not be present.
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 has no effect unless the value retrieved from IWMPNetwork.getProxySettings is 2 (use manual settings).
This method fails unless the calling application is running on the local computer or intranet.
Example Code
The following code example uses setProxyExceptionList to specify a list of hosts for which the proxy server is bypassed when using the MMS protocol. The new list is retrieved from a text box when a button is clicked. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.
Public Sub setExList_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles setExList.Click
' Test whether proxy settings are manual.
If (player.network.getProxySettings("MMS") = 2) Then
' Store the user's new exception list.
Dim proxyxlist As String = exListText.Text
' Set the exception list.
player.network.setProxyExceptionList("MMS", proxyxlist)
Else
' Warn that the proxy settings must be set to 2 (manual).
System.Windows.Forms.MessageBox.Show("Proxy settings must be manual!")
End If
End Sub
FakePre-022cf4458e584964bd6f807067c750f2-2ecececfb07e421cabec17276983ca49
private void setExList_Click(object sender, System.EventArgs e)
{
// Test whether proxy settings are manual.
if (player.network.getProxySettings("MMS") == 2)
{
// Store the user's new exception list.
string proxyxlist = exListText.Text;
// Set the exception list.
player.network.setProxyExceptionList("MMS", proxyxlist);
}
else
{
// Warn that the proxy settings must be set to 2 (manual).
System.Windows.Forms.MessageBox.Show("Proxy settings must be manual!");
}
}
Requirements
Version: Windows Media Player 9 Series or later
Namespace: WMPLib
Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)
See Also
- IWMPNetwork Interface (VB and C#)
- IWMPNetwork.getProxyExceptionList (VB and C#)
- IWMPNetwork.getProxySettings (VB and C#)
| Previous | Next |