IShellWindows::Register method (exdisp.h)
Registers an open window as a Shell window; the window is specified by handle.
Syntax
HRESULT Register(
[in] IDispatch *pid,
[in] long hwnd,
[in] int swClass,
[out] long *plCookie
);
Parameters
[in] pid
Type: IDispatch*
The window's IDispatch interface.
[in] hwnd
Type: long
A handle that specifies the window to register.
[in] swClass
Type: int
A member of ShellWindowTypeConstants that specifies the type of window.
[out] plCookie
Type: long*
The window's cookie.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
In the context of the Shell windows collection, a cookie is a token that uniquely identifies a registered Shell window.
Use this method to register an open window; if the window is pending open, use IShellWindows::RegisterPending instead.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | exdisp.h |
DLL | Shdocvw.dll (version 5.00.2014.0216 or later) |