IShareWindowCommandSourceInterop interface (sharewindowcommandsourceinterop.h)

A native interoperation interface that allows getting a ShareWindowCommandSource object. This interface is available in C++ only. Also see IShareWindowCommandSourceInterop.GetForWindow.

Important

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

Inheritance

The IShareWindowCommandSourceInterop interface inherits from the IUnknown interface.

Methods

The IShareWindowCommandSourceInterop interface has these methods.

 
IShareWindowCommandSourceInterop::GetForWindow

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

Remarks

Here's a code example.

auto interop_factory = winrt::get_activation_factory
    <winrt::Windows::UI::Shell::ShareWindowCommandSource,
    IShareWindowCommandSourceInterop>();
        
winrt::check_hresult(interop_factory->GetForWindow(
    m_hwndOfMyAppCallWindow,
    winrt::guid_of<winrt::Windows::UI::Shell::IShareWindowCommandSource>(), 
    winrt::put_abi(m_shareWindowCommandSource)));

Requirements

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

See also