Επεξεργασία

Κοινή χρήση μέσω


IShellWindows::RegisterPending method (exdisp.h)

Registers a pending window as a Shell window; the window is specified by an absolute PIDL.

Syntax

HRESULT RegisterPending(
        long    lThreadId,
  [in]  VARIANT *pvarloc,
  [in]  VARIANT *pvarlocRoot,
  [in]  int     swClass,
  [out] long    *plCookie
);

Parameters

lThreadId

A thread ID.

[in] pvarloc

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 register.

[in] pvarlocRoot

Type: VARIANT*

Must be NULL or of type VT_EMPTY.

[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 a window that is pending open; if the window is already open, use IShellWindows::Register instead. Use IShellWindows::Revoke to un-register a window.

Requirements

Requirement Value
Target Platform Windows
Header exdisp.h
DLL Shdocvw.dll (version 5.00.2014.0216 or later)

See also

IShellWindows

IShellWindows::Register

IShellWindows::Revoke