WPF mainly works with managed code. Managed code means most of the things are taken care by garbage collector. And as I can see from your post You want to integrate C++ dll which is unmanaged code. It is not so simple using C++ library in WPF but not impossible. C# provides many other aspects to handle these kind of scenarios.
You will have to take a look about Interoperability and unmanaged code. Have a look on below link: Sample Project