IShareWindowCommandSourceInterop::GetForWindow method (sharewindowcommandsourceinterop.h)

Important

Some information relates to a prerelease product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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.

Note

Thank you for your interest in consuming the ShareWindowCommandSource API within your real-time communication application.

The ShareWindowCommandSource API is a limited access feature.

Please contact onairapi@microsoft.com for more information, and to request an unlock token.

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

   
Target Platform Windows
Header sharewindowcommandsourceinterop.h

See also