Export (0) Print
Expand All

IShellWindows::Register method

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

pid [in]

Type: IDispatch*

The window's IDispatch interface.

hwnd [in]

Type: long

A handle that specifies the window to register.

swClass [in]

Type: int

A member of ShellWindowTypeConstants that specifies the type of window.

plCookie [out]

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

Product

Internet Explorer 5

Header

Exdisp.h

IDL

Exdisp.idl

DLL

Shdocvw.dll (version 5.00.2014.0216 or later)

See also

IShellWindows
IShellWindows::RegisterPending
IShellWindows::Revoke

 

 

Community Additions

ADD
Show:
© 2014 Microsoft