ShellUIHelper.AddChannel method
Adds a new channel to the list of channels in the Windows Internet Explorer Favorites menu and to the Channel bar on the desktop.
Note
This method is no longer supported under Windows Vista. Under that operating system, it returns E_NOTIMPL.
Syntax
iRetVal = ShellUIHelper.AddChannel(
sURL
)
Parameters
-
sURL [in]
-
Type: BSTR
A String value that specifies the URL of the CDF file.
Note
The links in the CDF file must use HTTP, HTTPS, or FTP protocols. If the CDF file contains any other protocol, the addition of the channel fails and no dialog box appears.
Examples
The following example shows the proper usage of this method for JScript embedded in HTML and Visual Basic.
JScript:
<html>
<head>
<title></title>
<object id="ShellUIHelper"
classid="CLSID:64AB4BB7-111E-11d1-8F79-00C04FC2FBE1"
width=0
height=0
VIEWASTEXT>
</object>
<script language="JavaScript">
function fnShellUIHelperAddChannelJ()
{
ShellUIHelper.AddChannel("https://www.microsoft.com/windows/cdf/g_stock.cdf");
}
</script>
</head>
<body onload=fnShellUIHelperAddChannelJ()>
</body>
</html>
Visual Basic:
Private Sub fnShellUIHelperAddChannelVB()
Dim objShellUIHelper As ShellUIHelper
Set objShellUIHelper = New ShellUIHelper
objShellUIHelper.AddChannel ("https://www.microsoft.com/windows/cdf/g_stock.cdf")
Set objShellUIHelper = Nothing
End Sub
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
DLL |
|