WebView2Samples
WebView2Samples copied to clipboard
Just say no to wil::com_ptr
Is a legitimate call :)
I made that work (after setting to "no exceptions" in project properties) and by replacing two usages of wil::com_ptr with Microsoft::WRL::ComPtr.
There is now the warning about not having /EHsc, emanating from ppltasks.h , but that is a much larger subject.
I assume now I need to install WV2 RT to make it work.
I have the same problem that the sample does not compile out of the box. The sample Win32_GettingStarted depends on wil and because the header <wil/com.h> is not found there is also no wil::com_ptr and the error \WebView2Samples\GettingStartedGuides\Win32_GettingStarted\HelloWebView.cpp(27,8): error C2653: 'wil': is not a class or namespace name is generated.
Well... I use neither, I use Compiler COM Support Classes, #import statement, and such. That is still intrinsic in cl.exe and <comdef.h> and is still simple and working. AFAIK there is even a team maintaining that.
But now and here we are hitting one very big black wall called: "Microsoft Legacy API's". Stay safe and don't go there.