The very few times I've needed to do this, I've used an intermediary (written in managed C++).
I used the managed C++ to call and expose the unmanaged function and then call that from C#.
Here is an earlier post describing it.
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402