-1

WRL (ツールキット v140) を使用して Visual C++ で SystemMediaTransportControls を使用しようとしていますが、次のような問題があります。

Microsoft::WRL::ComPtr<ABI::Windows::Media::ISystemMediaTransportControls> controls;
HRESULT hResult = ABI::Windows::Foundation::GetActivationFactory(Microsoft::WRL::Wrappers::HStringReference(RuntimeClass_Windows_Media_SystemMediaTransportControls).Get(), &controls);

上記のコードは E_NOINTERFACE を返していますが、MSDN チュートリアルに従って IUriRuntimeClassFactory を有効にすると機能します。

編集:これらの関数を呼び出す前に初期化しました。

4

1 に答える 1

0

ISystemMediaTransportControls is an interface implemented on SystemMediaTransportControls class, not its activation factory. Did you intend the controls variable to be Microsoft::WRL::ComPtr<ABI::Windows::Media:ISystemMediaTransportControlsStatics> instead?

于 2016-12-11T16:56:01.020 に答える