Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: COM Automation Server for 0.9 (Read 590083 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

COM Automation Server for 0.9

Reply #25
Thanks foosion... I don't know what I'd do without you and the COM Automation Server...

COM Automation Server for 0.9

Reply #26
Pull out your hair from the frustration of writing a COM server plugin?

COM Automation Server for 0.9

Reply #27

COM Automation Server for 0.9

Reply #28
Thanks for reporting. This was due to a bug in the SDK. Fixed version of COM server should be up tomorrow.
[a href="index.php?act=findpost&pid=367306"][{POST_SNAPBACK}][/a]

I just downloaded the current version available and still have the problem... Did you fix this bug yet? Thanks for your help.

COM Automation Server for 0.9

Reply #29
It seems the fixed versions was not uploaded correctly. The correct version is now available for download.

COM Automation Server for 0.9

Reply #30
Thanks foosion!!!


I received this error after un-installing the older version of the plugin, then downloading the new version and installing it. I even tried re-downloading the latest 0.9 beta and installing that too.

Failed to load DLL: foo_comserver2.dll
Reason: Wrong version number; this component appears to have been built with newer version of foobar2000 SDK, please download latest version of foobar2000 in order to use it.

COM Automation Server for 0.9

Reply #31
 That's what happens, when you don't check twice. My development machine already has the latest internal version and matching SDK installed. Sorry for that. I'm not sure what will happen first: me recompiling the component with an older SDK (provided I can still find it here), or Peter releasing a new RC. We'll see.

COM Automation Server for 0.9

Reply #32
OK. I know how crazy it can get developing with an ever changing SDK/API...

COM Automation Server for 0.9

Reply #33
Luckily, the SDK will be stable, once 0.9 goes final, so that's another good reason not to release it before that.

By the way, the version of foo_comserver2 on my page should work with the now current RC (2006-03-11).

COM Automation Server for 0.9

Reply #34
Thanks foosion!

COM Automation Server for 0.9

Reply #35
So next weekend, if we have the chance to see developement of COM server advanced again?  Thx foosion and all the foobar stuuf for the wonderful job you do  I'll continue my remote control of foobar soft with all the media library and playlist display on a LCD screen and the ability to manage it with remote (like remote wonder)...  THX

COM Automation Server for 0.9

Reply #36

I really like this and it works great.

One addition, when appropriate would be a method supporting the enqueue function in 0.9 - so that we could remotely add an item to the playback queue.

That would be perfect!

Thanks again,

COM Automation Server for 0.9

Reply #37
This existed in the previous 0.8.3 version... Foosion will include this later he told me

COM Automation Server for 0.9

Reply #38
Here's a simple now playing COM Client i made for mIRC. Just put all the files in one place and load the .mrc file inside mirc. The script should then register the DLL (I wonder if there's a way to automatethe registering better) and the F1\Ctrl+F1 keys handle displaying the info.

Have a look in the script and source files if you wanna know more. Basically used foosion's C# example and another "C# dlls in mirc howto" document, Nothing fancy.

COM Automation Server for 0.9

Reply #39
Foosion, you said on your page that the components should work with Final, but the link for COM automation server is dead on the first post

COM Automation Server for 0.9

Reply #40
The download link on my components page works though.

COM Automation Server for 0.9

Reply #41
Great to see an example for VB6. I really (!) like to see that. Will play with it soon.
One annotation: You could update the license.rtf (2005 is over).


COM Automation Server for 0.9

Reply #42
Does a new version planned soon?  I can't wait this plugin advanced, so wonderful

COM Automation Server for 0.9

Reply #43
I wonder how easy to do will be a c++ example. Since COM is atriciouly hard to do right in cpp.

COM Automation Server for 0.9

Reply #44
Any news about this plugin developpement foosion?


COM Automation Server for 0.9

Reply #45
I wrote a simple COM client in Ruby, mainly to use for fetching album art for songs in the media library.  Since I (or someone smarter than me) will probably come up with better uses for it in the future, I set up a project page at RubyForge.

The simplest use of the script can be summed up in:
Code: [Select]
require "fetch_album_art"

fetch =
fetch.fetch_now_playing  # searches for the album art on Amazon for the currently playing track in foobar2000  # downloads the album art using titleformat script "$crc32(%artist% - %album%).jpg"

The documentation should explain a lot on how everything works.  As of now, the source files are only on SVN.  Once I clean them up a little more, I'll probably package it into a nice installer (so you won't have to mess with the actual code as much).

To incorporate this back into foobar2000, I have the foo_uie_albumart search for album art in "E:\Art\$crc32(%artist% - %album%)".

Excellent plugin foosion.

COM Automation Server for 0.9

Reply #46
Foosion, Do you know what basic steps are needed for writing a very simple C++ client?
I've tried including the interface definitions and header files, but couldn't get any of the instances to work properly. My experience with COM is mainly COM+ .NET style, and not much at 'old world COM', sadly.

Anything to help would be appriciated (Right now, as a very ugly workaround, i have a C++ DLL calling a .NET DLL that communicates with foobar's COM Server - i wanna get rid of the .NET dll for compabiltiy with other software).

I could post the very simple c# code im using - more or less get a playback instance, grabs the title format for the current playing track along with some other minor details (foobar version, active playlist index and length) and thats about it.

Again, Any help by anyone with knowledge in COM would be appriciated, Thanks in advance.

COM Automation Server for 0.9

Reply #47
Here is a very simple C++ console application that writes some information about the currently playing song to stdout. Note that it requires ATL which does not work all that well with Visual C++ 2005 Express Edition, though the code can be converted to plain COM code. On the other hand, it compiles under VS2003 or even VC6 (untested). You also have to link foobar2000_i.c from the comserver2/include directory with your code.

Code: [Select]
#pragma once

#include <iostream>
#include <tchar.h>
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors are explicit

#include <atlbase.h>

#include <foobar2000_h.h> // add comserver2/include to your project's include directories

Code: [Select]
// cpptest.cpp : Defines the entry point for the console application.

#include "stdafx.h"

static void g_report_error(HRESULT hRes, LPCTSTR pszInfo) {
HLOCAL hBuffer = NULL;
LPCTSTR pszMessage = (LPCTSTR)::LocalLock(hBuffer);
if (pszMessage != NULL) {
_tprintf(_T("%s: %s"), pszInfo, pszMessage);
} else {
_tprintf(_T("%s: 0x%08X"), pszInfo, hRes);
if (hBuffer != NULL)

static void g_test() {
CComPtr<IVBApplication> pApp;
HRESULT hRes = pApp.CoCreateInstance(CLSID_Application07);
if (FAILED(hRes)) {
g_report_error(hRes, _T("Object could not be created"));

CComPtr<IVBPlayback> pPlayback;
hRes = pApp->get_Playback(&pPlayback);
if (FAILED(hRes)) {
g_report_error(hRes, _T("Playback control could not be accessed"));

CComBSTR strFormat;
strFormat = L"%artist% - %title%";
CComBSTR strResult;
hRes = pPlayback->FormatTitle(strFormat, &strResult);
if (FAILED(hRes)) {
g_report_error(hRes, _T("Title formatting failed"));

#ifdef _UNICODE
#error port me!

int _tmain(int argc, _TCHAR* argv[]) {
// TODO parse arguments



return 0;

COM Automation Server for 0.9

Reply #48
Most of that makes sense to me, I'll give it a shot tommorow night or the night after when I'm home.

I have the professional version of 2005 at home, Lets hope ATL works decently with that, or with 2005 at all.

I've seem some mentioning in MSDN docs about ATL and 2005, but they were more refering to the fact that some things wouldn't compile on 2005 anymore (like BSTR concatnation, needs to be wrapped with some other type of class, CString\CStringW).

Anyway, thanks for the example, appriciated.

COM Automation Server for 0.9

Reply #49
Foosion, please, I don't want you answer me "Yes, a new version is coming at the %date% ^^". I would know if this plugin is sill under developpement or not (or still under developement, but paused at the moment), because I need it for my project, and if it's not under developpement yet, then I'll search an other way to do what I want to...Not a problem