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

Post a reply

:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review

Expand view Topic review: Is it possible to use COM from MM Portable in .Net

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

by Corneloues » Mon Mar 05, 2018 9:30 am

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...



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

by 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. ... 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