INameSpaceTreeControl::TreeAdvise method (shobjidl_core.h)

Enables a client to register with the control.

Syntax

HRESULT TreeAdvise(
  [in]  IUnknown *punk,
  [out] DWORD    *pdwCookie
);

Parameters

[in] punk

Type: IUnknown*

A pointer to the client IUnknown that registers with the control.

[out] pdwCookie

Type: DWORD*

A pointer to the cookie that is passed back for registration.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The pointer to the cookie that is passed back is used to unregister the control later with INameSpaceTreeControl::TreeUnadvise.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)