@melloware: I see that I was sent slightly down the wrong path by your post here, where you talked about registering an out-of-proc app (and referred to the MonkeyToys thread). But now I see, it's not really out-of-proc.
mcow wrote:@melloware: I see that I was sent slightly down the wrong path by your post here, where you talked about registering an out-of-proc app (and referred to the MonkeyToys thread). But now I see, it's not really out-of-proc.
Sorry about that. Basically is a COM object registered out of proc by MM. Not the other way around. Typically have your Python App that registers for a COM object like Internet Explorer and can control it. Well since that does not work in MM you have to do the reverse and have MM register your COM object out of proc.
I don't know if an official bug was filed. At least one MM dev. knows about it but it doesn't seem to be a priority.
mcow: If you want to use Python, take a look at what Pako did with the MediaMonkey plugin for eventGhost. If you have any questions about it you could ask him on the EG forum, or he may be on this forum as well...
OK, I submitted this ticket: http://www.mediamonkey.com/support/inde ... etid=11998
We'll see if it becomes a bug or is updated with an existing one. (Is it just me or is that Ventis bug interface very weak? Searching for stuff there is very difficult. Of course, I don't have an account there...)
@melloware, I don't think you're using the term "out-of-proc" correctly. The app code may reside somewhere random, but once MM instantiates the object, it's in-proc—that is, the code is running within the MediaMonkey process.
@jitterjames: thanks for the pointer to eventGhost, I will look at it. I may also steal your UDP-broadcast scheme.
mcow wrote:
@melloware, I don't think you're using the term "out-of-proc" correctly. The app code may reside somewhere random, but once MM instantiates the object, it's in-proc—that is, the code is running within the MediaMonkey process.
You are correct it is in-process inside the MediaMonkey process which I stated 3 posts above. quoted:
I based my MonkeyTunes plugin on the same architecture (in C# instead of VB) and it works great. It is a lot of trouble to go through but it is the only way to get in-process calls in your plugin. Since the script instantiates your C# app as a COM object the COM runs in-process with the main MM process and thus is handed the events from the SDB object already running in the script engine.
@jitterjames: I'm trying to use your udp scheme, but I'm not getting the messages to my port. I can reach it from another Python program.
What IP addr does udpsender.exe send to? I'm not seeing data come in on 127.0.0.1 nor on my ethernet adapter.
it broadcasts to all ip addresses. you should be able to listen on any ip address as long as it belongs to the adapter which is on the same lan. You need to be listening on the correct port though. In the case of my example:
I'm still not able to get that working. What protocol do you specify when you create your outgoing socket? I selected UDP in my receiver socket.
However, I don't need it. I've created a named-pipe implementation that works pretty well. I'm still bugfixing and polishing, but it's solved my basic problem. I can now write a Python script (or really, any program) that can attach to the pipe and get a string identifying each event as it happens.
The named-pipe is implemented as a COM object (which needs to be registered), also written in Python but it gets loaded in-proc by a VBS; then each event-handler just dumps the string into the pipe. If there's no client on the other end of the pipe, nothing gets written.
Thanks all for the feedback, I have reviewed the implementation and fixed the issues with MM server created from external applications - it will be fixed in the next MM 4.0 build.