IHxHelpPane::DisplayContents Method

The DisplayContents method displays the Help Pane and renders the top-level of the hierarchical taxonomy (table of contents).

For Windows 10 and subsequent versions of the Windows operating system, this method opens a browser-based online resource instead of the Windows Help content set.

IHxHelpPane::DisplayContents(
   BSTR bstrUrl
);
public void DisplayContents(
   string bstrUrl
);
public overridable sub DisplayContents(
   ByVal bstrUrl As String
)

Parameters

bstrUrl

[in] String that contains the URL to use for synchronization. If the bstrUrl parameter is specified, the table of contents is expanded to the first instance of the corresponding task (topic). If the bstrUrl parameter is null or an empty string, then the top level of the table of contents is displayed. If the passed value is not a valid URI (using the mshelp:// protocol), the proxy object will return E_INVALIDARG.

Return Value

Value Description

S_OK

Successful.

RPC_S_SERVER_UNAVAILABLE

The Help Pane Proxy was pre-empted and the server closed before the call could be completed. This will happen if you call the HelpPane object using the proxy object, and the HelpPane object does not respond.

E_INVALIDARG

The bstrUrl parameter was not an mshelp URI.

Remarks

The bstrUrl parameter is limited to 2083 characters. Leading and trailing spaces are stripped before determining length.

Example

The following example demonstrates calling DisplayContents in a C++ application. This example assumes that a valid instance of the Help Pane has been created.

pHelpPane->DisplayContents(L "mshelp:////myUri");

The following example demonstrates calling DisplayContents in a C# application. This example assumes that a valid instance of the Help Pane has been created.

objHelpPane.DisplayContents(@"mshelp://myUri");

The following example demonstrates calling DisplayContents in a Visual Basic application. This example assumes that a valid instance of the Help Pane has been created.

objHelpPane. DisplayContents("mshelp://myUri")

See Also

Other Resources

Hosting the Help Pane Proxy Object
IHxHelpPane Interface