PInvoke in Metro Apps with Windows 8 / WinRT

前端 未结 2 1284
伪装坚强ぢ
伪装坚强ぢ 2020-12-18 00:00

I have an simple FM Radio Tuner App in Silverlight 5 Out-of-browser that calls code from a Native C++ DLL from my USB FM Receiver using PInvoke. This application works very

2条回答
  •  离开以前
    2020-12-18 01:02

    Unless it is a system DLL or otherwise locatable through the system path, you need to make sure that your DLL is copied to the same folder as your Metro application is deployed in.

    I solved the problem by adding the native DLL to my Metro application project, ensuring that Build Action is set to Content and that Copy to Output Directory is set to Copy Always or Copy if Newer.

提交回复
热议问题