14#include "CoreMinimal.h"
16#include "Microsoft/COMPointer.h"
22 template <
typename From,
typename To>
25 HRESULT hr = from->QueryInterface(IID_PPV_ARGS(&to));
26 if (UNLIKELY(hr != S_OK))
30 TEXT(
"Object of type %s did not implement %s"),
37 template <
typename From,
typename To>
38 FCanFail ComCast(TComPtr<From>
const& from, TComPtr<To>& to,
bool fastError =
false)
40 return ComCast(from.Get(), to, fastError);
43 template <
typename From,
typename To>
51 template <
typename From,
typename To>
54 return ComCast(from.Get(), fastError);
static TSharedRef< T > Make(T *newError, Args &&... args)
FORCEINLINE FCanFail Success()
const FString TTypeString
FCanFail ComCast(From *from, TComPtr< To > &to, bool fastError=false)