I'm doing C# interop with Direct3D (I know about SlimDX and XNA so let's not get into the merits of this) and I'm calling D3DX10CreateMesh passing it my ID3DX10Mesh interface. I'm getting an error saying "No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))". The D3DX10CreateMesh call comes while I am trying to create a 10 mesh to copy a 9 mesh into (after successfully loading an x file). I've looked at my C# definition of the ID3DX10Mesh and it follows the same structure as every other working interface I've defined.
But then I noticed something. The Guids for the 9 and 10 meshes are exactly the same (4020E5C2-1403-4929-883F-E2E849FAC195). I've double checked the d3dx9mesh and d3dx10mesh headers and this is the case. The 9 mesh interface works but the 10 doesn't (This maybe be instantiation-order dependent) I personally don't understand this as it would imply that even in C/C++ apps you couldn't use the two meshes together but we know that you can. I've seen it done in NVUT SDK. I can only think that the Runtime Callable Wrapper is getting confused byt the Guids?
Why are the mesh guids the same and how are C/C++ apps able to avoid the conflict?