I know that the COM interface is deprecated and also appreciate that C++ is rather long in the tooth but I am where I am, trying to port some existing Python code that works with win32com into an existing c++ console application developed under Visual Studio 2017.

So far I have generated an IDL file from MediaMonkey.exe (4.1.20) and (after addition of some forward definitions) got it to compile .h and .c files which I have added to my project.

My problem now is that I cannot work out how to instantiate an SDB object to start working with.

I was expecting something like: SongsDB::SDBApplication SDB = new SongsDB::SDBApplication();
But SongsDB is not recognised

I have also tried using #import on the MM executable but my .tld file is failing to compile because various terms (such as EOF) have been #defined elsewhere and generate errors.

If someone could give me some pointers please I would be very grateful.

I had really hoped that I could work this out for myself but I have failed to get a result from QuerySongs with the c++ interface.

I have successfully accessed the interface and can control the player. However I have been reading as much background as I can and beating my head against a brick wall but am getting nowhere.

QuerySongs runs and returns an IDispatch object pointer. The documentation says that the it should return a SongIterator object but I cannot discover how to either extract SongIterator from the IDispatch or to get it from the ISDBDatabase object. This works from Python with WIN32COM so I think I must have a fundamental misunderstanding of something.

If anyone is able to point me in a helpful direction I would really appreciate it.

Hi,
In any other languages I used I simply ignored definitions like "IDispatch *pIDisp;" and assumed directly "ISDBSongIterator* pSDBIterator" which would result in "something like pSDBDatabase->QuerySongs(qs, &pSDBIterator);"