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

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

Moderators: Gurus, Addon Administrators

Posts: 1
Joined: Thu Jan 18, 2018 7:34 pm

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

Post by npbenjohnson »

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. ... 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. 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 ... 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
Posts: 26
Joined: Thu Oct 22, 2009 4:41 am

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

Post by Corneloues »

I need this too.

A sample C#/.Net project would be great. Hosted on GitHub if possible so it could be maintained over time.

Maybe even a NuGet package for proper integration...


Post Reply