Bastl
Bastl

Reputation: 893

How to use a C++ dll in Windows Phone 8.1 XAML App within C++ Runtime Component

I want to use a C++ dll (compiled for arm, x86) within my C# windows phone 8.1 XAML visual studio project.

I created a C++ runtime component to interact with my C++ code. This code needs a precompiled dll. I added my lib file to my project settings. The compilation is running fine. If I start my app with the windows phone 8.1 emulator I get:

The specified module could not be found. (Exception from HRESULT: 0x8007007E)

My Visual Studio Project Structure:

enter image description here

Things I have tried:

So, how can I use a .lib/.dll library within a C++ Runtime Component Project?

Some more details:

Upvotes: 3

Views: 1999

Answers (1)

Bastl
Bastl

Reputation: 893

I managed to get it working.

You have to import the dll into the C#-project. It's important that the dll is in the root the C#-project and that: copy to output directory is not activated.

Upvotes: 1

Related Questions