1

I'm trying to use an external DLL in a winrt component. To be specific I built https://github.com/webview/webview and got the required DLLs but when trying to add a reference to these DLLs I get "The DLL is not a type or version current project can use". Now I know that Winrt components can use a winmd file as a reference but can I not use a regular DLL?

MicroDev
  • 21
  • 4
  • 1
    "regular" Windows .dll are not WinRT components, they can be used using a .h and a .lib https://stackoverflow.com/questions/1345671/how-to-use-dlls – Simon Mourier Sep 05 '22 at 06:12
  • I have also added the .lib based on your suggestion but I still cannot include webview.h even though It works with cpr – MicroDev Sep 05 '22 at 15:53
  • What's "cpr"? You should show some code. https://stackoverflow.com/help/minimal-reproducible-example – Simon Mourier Sep 05 '22 at 16:32
  • Thank you for your help @SimonMourier unfortunately the set of APIs I was just trying to use are unavailable in WinRT. – MicroDev Sep 07 '22 at 02:57

1 Answers1

0

Just to Answer this question. I was trying to use a set of APIs in WinRT specific only to Win32 API. And that caused including the headers and lib to fail. Some of these APIs are the likes of SetDPIProcessAware. Otherwise you should follow this guide How to add additional libraries to Visual Studio project? to include libraries in your project.

MicroDev
  • 21
  • 4