Original Post
After finding out that Font.MeasureString suffered from a missing feature I thought "hey I've been looking for an excuse to try to call into the native code directly". Many hours of MSDN and google later I give up realising my knowledge of COM, type libraries and C++ is useless if Visual Studio doesn't handle all the magic plumbing for me. However now I've blown hours I could have been doing something useful I still feel the need to know where I'm missing the point or just how far away I was from the solution (or maybe there is no solution!). I need a way to call ID3DXFont.Draw() from C# directly. 1. Write a managed wrapper just like MDX in C++/CLI 2. Call D3DX_dll directly I went with #2 thinking that since I only needed one call it would be similar to doing a PInvoke and heck I've called COM objects from .Net lots of times. Problem: No type library for d3dx, no idl file either. tlbimp won't create one for me saying that the dll is not a valid type library and of course I don't have a type library. I found some examples of creating an interface in .Net by hand but those examples show how to convert IDL which I don't have. the d3dxcore.h file has something that looks a bit like the IDL file fo ID3DXFont so maybe I can convert that. Then I can get the unmanaged Com Pointer and cast it to that interface in an unsafe block and I would be off - right? I figured I was now guessing so much that the odds of it working were negligible. So C++ and COM gurus I throw myself on your expertise to hopefully learn something useful. Is it even possible to call it from within C# (unsafe is fine)