Getting active SDBApplication COM object

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

Moderator: Gurus

Agent_9191
Posts: 5
Joined: Fri Jul 30, 2010 8:03 am

Re: Getting active SDBApplication COM object

Post by Agent_9191 » Fri Aug 13, 2010 10:02 pm

In a way I'm glad to see I'm not the only one running into the COM issue. Since it happens in both .NET and VBScript, it's definitely the underlying cause (well, besides the obvious error message, but just wanted to rule out interop issues). It would be nice if somebody would update the development wiki and remove the obviously incorrect line about a second call to the SDBApplication returning the currently running instance. But it looks like signing up for an account on the wiki is broken, so can't go in to edit it. :x

While Steggy's approach makes sense if it's a long running application, it doesn't work for one-shot type apps that just need to do a single purpose and then end (but be run multiple times a day). For what I'm looking to do with MM I don't necessarily need the UI, but trying to go directly against the database has some issues since they customized the SQLite stuff. Not trying to hijack the thread, but it some dev's may be able to forgo the UI and go directly against the DB if anybody knows of a good way to work with their customizations. I'll keep digging through the forums, but any suggestions?

Melloware
Posts: 339
Joined: Mon Aug 18, 2008 9:46 am
Location: Philadelphia, PA, US
Contact:

Re: Getting active SDBApplication COM object

Post by Melloware » Sun Aug 15, 2010 9:19 am

Just to chime in my two cents I never got this working from C# .NET.

I can create new instance if it is not running of course. And I used the Stax's MonkeyToys source code example to create a small plugin that injects the running SDBApplication into my own C# Application at runtime.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
MonkeyTunes - DACP Server for MediaMonkey
Intelliremote - Take Back Control of your HTPC!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Post Reply