Foobar2000:Components 0.9/COM Automation Server (foo comserver2)

From Hydrogenaudio Knowledgebase
Jump to: navigation, search

What it does[edit]

The purpose of this component is to allow other programs to control some aspects of foobar2000.

What it does not do[edit]

The component does not enable you to implement foobar2000 components in languages other than C++.

It does not enable you to control or launch more than one instance of foobar2000, be it from the same or different (installation) locations.

Features[edit]

The features implemented in 0.7 alpha 2 are:

  • querying information about the foobar2000 instance
  • querying and modifying playback state and settings
  • receiving notifications about changes in the playback state and settings
  • querying and modifying the list of open playlists
  • receiving notifications about changes in the list of open playlists
  • querying the contents of open playlists
  • querying the contents of the media libary
  • performing the default action on a playlist entry (i.e. the equivalent of double-clicking a playlist entry)
  • querying information about tracks through titleformatting

More features are planned for the final version.

Documentation[edit]

There is not much documentation yet. The existing documentation as well as the test and demo scripts/applications are included in the installer (except for the proof-of-concept web panel which is to be announced in a separate post).

Compatibility[edit]

The component requires foobar2000 0.9 or compatible.

The current release is targeted primarily at Visual Basic 6 and scripting clients. It should be useable with clients written in C++, but it has not been tuned yet for this situation.

The component has been tested successfully with clients written in the following languages:

  • Visual Basic 6
  • VBScript
  • Lua 5.0.2 with LuaCOM (some problems with event callbacks)
  • Python 2.3 with Pythonwin (no event support AFAIK)
  • C# and VB.Net (.Net 1.1)

Known installer issues[edit]

The uninstallation function fails to remove some information from the registry. The following batch file can be used to remove the entries in question from the registry:

reg delete HKCR\TypeLib\{CB8F14D8-736E-4BB7-ADCF-BE26C39B576B} /f
reg delete HKCR\CLSID\{1bffc1e4-21a6-45af-8831-5ee045281633} /f
reg delete HKCR\Foobar2000.Application.0.7 /f

The file is also available for download (see below). Windows NT4 users have to install reg.exe from the Windows NT4 Resource Kit; reg.exe is a native command on Windows 2000 and XP, I suspect it is present on later versions as well. You have to close foobar2000 and all programs that use the installed type library to run this successfully.

Disclaimer[edit]

This is the last section between you and the download links, but please read this carefully!

This component is a work in progress. It is currently labeled as an alpha version, which is primarily due to the incomplete functionality; I try to make sure there are no bugs in the released versions, but I cannot guarantee it. The (COM) interfaces currently exposed by the component are not the ones that the will be in the final version.

While the exposed functionality is quite limited, it may be sufficient for some people. For example the access to playback controls is rather complete; on the other hand, you only get read access to the open playlists and the media library.

There is no scheduled release date for the final version. I will try to advance this component as time permits.

Links[edit]