i suggest you have a look at some of the open source plugins such as the Additional Tagging tools plugin, Android remote or the Lyrics Reloaded plugin.
Even the shell that comes with the API interface pack works as is.
You only need to call the Initialise() function - it assigns the api interface function pointers
public PluginInfo Initialise(IntPtr apiInterfacePtr)
{
mbApiInterface = new MusicBeeApiInterface();
mbApiInterface.Initialise(apiInterfacePtr);
mbApiInterface.Player_Stop = new Player_ActionDelegate(Player_ActionTest);
mbApiInterface.Player_PlayPause = Player_ActionTest;
// to receive player notifications
about.ReceiveNotifications = ReceiveNotificationFlags.PlayerEvents;
}
and depending on what you want to do
public void ReceiveNotification(string sourceFileUrl, NotificationType type)
{
// perform some action depending on the notification type
switch (type)
{
case NotificationType.PluginStartup:
// perform startup initialisation
case NotificationType.PlayStateChanged:
if (mbApiInterface.Player_GetPlayState()== PlayState.Stopped)
{
MessageBox.Show("PLAYER STOPPED");
}
}
to stop the player you would call:
mbApiInterface.Player_Stop();