IShareWindowCommandSourceInterop::GetForWindow method (sharewindowcommandsourceinterop.h)

Gets the ShareWindowCommandSource object corresponding to a window identifier (a window handle).

The window identifier represents the window where the call or meeting is established. This allows the Windows Shell to use the window identifier to obtain resources such as an icon, and to provide that as a hint to the user.

Important

The IShareWindowCommandSourceInterop::GetForWindow API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, contact Microsoft Support.

Syntax

HRESULT GetForWindow(
  HWND   appWindow,
  REFIID riid,
  void   **shareWindowCommandSource
);

Parameters

appWindow

Type: HWND*

The window identifier (a window handle) of the window where the call or meeting is established.

The window identified by the HWND passed in appWindow must be such that it is capable of providing the brand icon, and the friendly name, of the client application.

riid

Type: REFIID

A reference to the interface identifier of the Windows::UI::Shell::IShareWindowCommandSource interface.

shareWindowCommandSource

Type: void**

The address of a Windows::UI::Shell::IShareWindowCommandSource pointer in which to receive the ShareWindowCommandSource object.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

For a code example, see IShareWindowCommandSourceInterop.

Requirements

Requirement Value
Minimum supported client Windows Build 22000
Minimum supported server Windows Build 22000
Target Platform Windows
Header sharewindowcommandsourceinterop.h

See also