IHxHelpPane::DisplaySearchResults Method

The DisplaySearchResults method displays the Help Pane, performs a query based on the passed value, and displays the results.

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::DisplaySearchResults(
   BSTR bstrSearchQuery
);
public void DisplaySearchResults(
   string bstrSearchQuery
);
public overridable sub DisplaySearchResults(
   ByVal bstrSearchQuery As String
)

Parameters

bstrSearchQuery

[in] String that contains the applicable query.

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 bstrSearchQuery parameter was NULL, contained an empty string, or exceeded the maximum length.

Remarks

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

Example

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

hr = pHelpPane->DisplaySearchResults(L"Windows");

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

objHelpPane.DisplaySearchResults("Windows");

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

objHelpPane.DisplaySearchResults("Windows")

See Also

Other Resources

Hosting the Help Pane Proxy Object
IHxHelpPane Interface