WebView2Samples icon indicating copy to clipboard operation
WebView2Samples copied to clipboard

Just say no to wil::com_ptr

Open DBJDBJ opened this issue 4 years ago • 2 comments

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.

DBJDBJ avatar Feb 06 '21 09:02 DBJDBJ

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.

Andreas-Schniertshauer avatar Jun 28 '21 07:06 Andreas-Schniertshauer

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.

DBJDBJ avatar Jun 28 '21 10:06 DBJDBJ