IShellWindows::FindWindowSW method
Finds a window in the Shell windows collection and returns the window's handle and IDispatch interface.
Syntax
HRESULT FindWindowSW( [in] VARIANT *pvarLoc, [in] VARIANT *pvarLocRoot, [in] int swClass, [out] long *phwnd, int swfwOptions, [out, retval] IDispatch **ppdispOut );
Parameters
- pvarLoc [in]
-
Type: VARIANT*
A VARIANT of type VT_VARIANT | VT_BYREF. Set the value of pvarLoc to an absolute PIDL (PIDLIST_ABSOLUTE) that specifies the window to find. (See remarks.)
- pvarLocRoot [in]
-
Type: VARIANT*
Must be NULL or of type VT_EMPTY.
- swClass [in]
-
Type: int
One or more ShellWindowTypeConstants flags that specify window types to include in the search.
- phwnd [out]
-
Type: long*
A handle for the window matching the specified search criteria, or NULL if no such window was found.
- swfwOptions
-
Type: int
One or more ShellWindowFindWindowOptions flags that specify search options.
- ppdispOut [out, retval]
-
Type: IDispatch**
A reference to the window's IDispatch interface, or NULL if no such window was found.
Return value
Type: HRESULT
One of the following values, or a standard result code.
| Return code | Description |
|---|---|
|
A window matching the specified search criteria was found. |
|
A window matching the specified search criteria was not found. |
|
A window was found, but a reference to the window's IDispatch interface could not be obtained. Only occurs if the SWFO_NEEDDISPATCH flag is set. |
|
A window was found, but the window is pending open. Only occurs if the SWFO_INCLUDEPENDING flag is set. |
Remarks
If the SWFO_COOKIEPASSED flag is set, pvarLoc is interpreted as a cookie instead of a PIDL.
Requirements
|
Product |
Internet Explorer 5 |
|---|---|
|
Header |
|
|
IDL |
|
|
DLL |
|