Is it possible to use DirectMusic in either C# or C++.NET? If any of you has done it already, could you show me some snippets as to how I would be able to do common stuff (creating objects, accessing the DMusic interfaces, etc.) because its really confusing trying to use COM in .NET.
Here's what I've learned so far:
I've read somewhere that DMusic is a "pure" COM object so you could only use it in C++ and so far, that's quite correct. COM interop samples in MSDN always talked about having to reference the type library of the COM object into your project. DMusic, however, doesn't have a type library. All I have are the Header files (dmusici.h, etc.) which you could include in your typical C++ projects, of course, but not in C#. Adding a reference to dmusic.dll directly also didn't work. haha. It was worth a try. So referencing DMusic is also a problem in .NET.
The reason why we're trying to push with .NET is because coding the user interface in C++ takes so much work as compared to the visual tools in c++.NET and c# and also to take advantage of the .NET framework benefits.
There are a couple of solutions that could work like simply putting your whole Dmusic code into a C++ DLL and then just access it in c# using DllImport. Problem is, the DLL would need to do a lot of work like managing the numerous audiopaths that the application would create and the operations you would do to each of them, etc. Compared to this solution, doing it in plain c++ would be better and less complicated.
So back to the question, has anyone used Dmusic in .NET?