Is it possible to use COM from MM Portable in .Net

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

Moderator: Gurus

Is it possible to use COM from MM Portable in .Net

Postby npbenjohnson » Thu Jan 18, 2018 9:43 pm

My goal is to use C# instead of the vb/jscript, but because portable MM doesn't register COM, I need another way to get access to the MM Interfaces.

Tried and failed:

1. Using VBScript GetObject, to access a ComVisible dll and pass the needed objects. This idea was from a SO post, but it doesn't look like vbscript can actually load objects/classes from dlls, it wants an automation object (whatever that is)

2. Use midl to change the idl into a tlb and generate an interop dll with tlbimporter. MIDL has a lot of issues with the idl file, and I don't know anything about low level linking, so I don't know if they are fixable.

3. http://www.mediamonkey.com/wiki/index.p ... pplication states
Code: Select all
extern "C" __declspec(dllexport) void MMSetInterfaceCookie(DWORD cookie)
exists in a dll as a possible COM alternative, which I'm guessing DllImport could be used against, but it doesn't say which dll, or have any usage information about the method.

4. http://www.ventismedia.com/mantis/view.php?id=9454 using mediamonkeycom.exe /regserver throws an error, I'm guess it's because I need to run it as admin, which would mean it's not really a workaround unless mediamonkey happens to be run with administrative privileges so that VBScript can call that command.

5. It looks like maybe viewtopic.php?f=19&t=73936 has it working, but it's in delphi, and I'm not familiar enough with delphi or c++ to convert/use it

Let me know if you've got this working, have any ideas, or if I'm way off on any of these comments
npbenjohnson
 
Posts: 1
Joined: Thu Jan 18, 2018 7:34 pm

Return to MediaMonkey 4 Addons developer forum

Who is online

Users browsing this forum: No registered users and 3 guests