NPSearchDialog function (npapi.h)
Enables network vendors to supply their own form of browsing and search, beyond the hierarchical view presented in the Connection dialog box. If a network provider supports this function, the Connection dialog box will enable the Search button when the selected item belongs to that provider. If the user hits the Search button, the Connection dialog box calls NPSearchDialog to handle the user request.
Syntax
DWORD NPSearchDialog(
[in] HWND hwndParent,
[in] LPNETRESOURCEW lpNetResource,
[out] LPVOID lpBuffer,
[out] DWORD cbBuffer,
[in] LPDWORD lpnFlags
);
Parameters
[in] hwndParent
Handle of the window to be used as the parent window of the dialog box.
[in] lpNetResource
Pointer to the currently selected item in the Network Connections dialog box. A provider may choose to ignore this field.
[out] lpBuffer
Pointer to a buffer that will receive the result of the search.
[out] cbBuffer
DWORD that will specify the size of the buffer passed in.
[in] lpnFlags
Pointer to a DWORD of flags that the provider can set to force certain actions after the dialog box is dismissed. The only flag supported is WNSRCH_REFRESH_FIRST_LEVEL, which forces MPR to collapse then expand and refresh the first level below this provider after the dialog box is dismissed.
Return value
If the function succeeds and the user has clicked OK, NPSearchDialog should return WN_SUCCESS. Otherwise, it should return an error value, which can be one of the following. All other errors should be handled or reported directly by the provider's dialog box.
Return code | Description |
---|---|
|
The user canceled the operation. |
|
The input buffer is too small. |
Remarks
If the provider does not support enumeration, then the action associated with double-clicking the provider's entry will be to invoke its Search dialog box.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | npapi.h |