MediaMonkey COM interface with C++

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey.

Moderator: Gurus

MediaMonkey COM interface with C++

Postby ccom » Sat May 28, 2011 3:18 am

I have very limited experience with COM and was hoping that someone here may be able to help me. I want to access the MediaMonkey COM object through the COM API, but I have no idea how without any type headers.

Is there a header available or some other way?
ccom
 

Re: MediaMonkey COM interface with C++

Postby mcow » Sun May 29, 2011 11:20 am

I've only done COM interaction with Python, which interrogates the object server to find out what the interface is.
In general, I think the C++ technique boils down to (roughly, I don't know if these names or syntax are correct):
Code: Select all
sdb = new ComObject("SongsDB.Application");
sdb->Invoke(methodID);   // where you need to have a list of methodIDs

I did find this tutorial online. The guy who wrote it was talking about it in another forum, and said that altho it's primarily PowerBasic-related, the first tutorial has a lot of C++ code. Maybe it will help.
I also saw a reference saying that using Microsoft's ATL library is the best way to interface to COM from C++.
mcow
 
Posts: 443
Joined: Sun Sep 21, 2008 9:35 pm
Location: Cupertino, California

Re: MediaMonkey COM interface with C++

Postby ccom » Thu Jun 23, 2011 1:12 pm

The main source of trouble is the importing of the type library. Any idea how to accomplish that?
ccom
 

Re: MediaMonkey COM interface with C++

Postby mcow » Fri Jun 24, 2011 6:28 pm

This page at MSDN addresses that.

Since MM doesn't include the .tlb file with the distro (maybe it's available if you ask?) it looks like you can use the #import on either the .EXE file (or maybe one of the .DLLs, but the ones I see in the MM3 directory look from their names to be specific to certain functions).
mcow
 
Posts: 443
Joined: Sun Sep 21, 2008 9:35 pm
Location: Cupertino, California

Re: MediaMonkey COM interface with C++

Postby Peke » Fri Jun 24, 2011 6:59 pm

Use #import on MM exe.
Best regards,
Pavle
MM Core Developer and Fan (check HAPPYMONKEYING Site)
Image
Image
Peke
 
Posts: 7551
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia

Re: MediaMonkey COM interface with C++

Postby mcow » Sat Jun 25, 2011 12:56 pm

Peke wrote:Use #import on MM exe.

Skinned or unskinned? Or does it make no difference?
mcow
 
Posts: 443
Joined: Sun Sep 21, 2008 9:35 pm
Location: Cupertino, California


Return to Addons developer forum

Who is online

Users browsing this forum: No registered users and 0 guests