Melloware appears to be pointing back to MediaMonkey4 and has asked that i assist in reporting it as I have a reproducable case.
http://forum.melloware.com/viewtopic.php?f=16&t=9202
Melloware wrote:Do you want to report the bug there since you have the scenario reproducible?
If I install MM3 and then MM4, all works well and it can add to the tree node.
If I install MM4 on a clean Windows 7 Professional x64 install (not sure if this is OS relevant issue), I get the COM error.
It appears that it is not working correctly.
This problem:
- didn't happen on a system I used to have MM3 on
- After a format, I can not get MM4 to work with it at all on clean install of Windows
- If I put MM3 on the system and then install MM4, I can get it to work. This has been the only fix I've seen.
- All when running as a user or as administrator, including running MM4 from the install program and so on.
Based on the excerpts and other discussions with the developer and forums with other users, this appears to be reproducable.
There are others reporting that the only way to solve this is to install MM3 first and MM4 overtop.
I cite excerpts from various discussions on the matter for further clarification on how it's used.
Melloware wrote:
They report that if they don't install MM3 before installing MM4 they get a COM error when I try to add a child treenode. Could it be possibly the COM object for MM4 is missing this certain API call that happens to be in the MM3 COM API? That is why installing 3 before 4 works?
Code: Select all
2011-04-17 16:36:08,726 [ERROR] - (12) - Error filling treenode...
System.InvalidCastException: Unable to cast COM object of type 'SongsDB.SDBApplicationClass' to interface type 'SongsDB.ISDBApplication'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{1FAF02F8-A7D3-41F1-9210-A3B12046F136}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at SongsDB.SDBApplicationClass.get_MainTree()
at Melloware.MonkeyTunes.MonkeyTunesServer.CJynqUKX3h8mBRSYKJY(Object )
at Melloware.MonkeyTunes.MonkeyTunesServer.Un2KIghXy(SDBTreeNode )
Here is the code where I fill the treenode:
Code: Select all
/// <summary>
/// Event fired when the MonkeyTunes + is clicked on to expand the treeview.
/// </summary>
/// <param name="node">the node to fill the children for</param>
void MediaMonkey_OnFillChildren(SDBTreeNode node) {
try {
LOG.Info("MonkeyTunes Filling Treenode");
SDBTree tree = this.MediaMonkey.MainTree;
// delete all old children
node.HasChildren = false;
foreach (KeyValuePair<string, NetService> pair in PairingServer.Services) {
string deviceName;
NetService service = pair.Value;
try {
byte[] txt = service.TXTRecordData;
IDictionary dict = NetService.DictionaryFromTXTRecordData(txt);
byte[] value = (byte[])dict["DvNm"];
deviceName = Encoding.UTF8.GetString(value);
} catch (Exception) {
deviceName = "Unknown Device";
}
LOG.InfoFormat("TreeNode Device Name = {0}", deviceName);
SDBTreeNode deviceNode = tree.CreateNode;
deviceNode.Caption = deviceName;
deviceNode.CustomData = service.Name;
deviceNode.IconIndex = 54;
deviceNode.OnNodeFocused += new ISDBTreeNodeEvents_OnNodeFocusedEventHandler(MediaMonkey_OnNodeFocused);
tree.AddNode(node, deviceNode, EnumTreeNodePos.NodePos_AddChildLast);
}
node.Expanded = true;
LOG.Info("MonkeyTunes Filled Treenode successfully");
} catch (Exception ex) {
LOG.Error("Error filling treenode...", ex);
}
}
Melloware wrote:Yes that is what I am doing but what is really interesting is I am using the COM object fine and it only fails when calling the above method. Meaning other SDB calls are working fine so the COM object is there it is just when adding this child node it throws this error. Then when users install MM3 and then MM4 this error is corrected.
It is very strange.
I am actually passing the running COM object into my application through VBS like this.... So I create my COM .NET app and then pass the SDB instance into it. This is the only way in C# to catch the OnPlay, OnStop, events.
Code: Select all
Set monkeytunes = CreateObject("Melloware.MonkeyTunes.MonkeyTunesServer")
monkeytunes.Init(SDB)