B2S.Server Sample Plugin
Sample plugin implementation for the B2S.Server
Go to:
Overview 
 All Classes Namespaces Files Functions Properties Pages
Guidelines for plugin implementations

When implementing a plugin, please remember the following guidelines:

  • Speed
    The B2S.Server acts as a proxy between Visual Pinball in Pinmame. If the transfer of the data between the two is slowed down, the whole virtual pinball system will be slow down, which leads to unwanted behaviour like stuttering.
    Therefore it is important to make your plugin as fast as possible. If you have any longer running action in your plugin, execute them in a separate thread.
  • Error handling
    It is important that all exceptions that might occur in your code are handled inside the plugin. If you pluging throws any unhandled exceptions, the B2S.Server will deactivate the plugin. You can check the status of the plugins in the plugin window of the B2S.Server.
  • B2SServerPluginInterface
    Dont compile your own B2SServerPluginInterface.dll. Download a binary version of the dll (e.g. together with the B2S.Server), to avaoid versioning problems.
  • Windows and Forms
    If your plugin opens and updates windows, it will likely slow down the system. Updating windows from separate threads is quite tricky and sometimes unreliable. In such a case you might want to consider running a separate process/exe file doing all work necessary to open and update windows (B2S.Server does the same thing).
  • Name
    Make sure you plugin returns something meaningfull for the name property of the IDirectPlugin interface. It is recommended that you also include the version and/or the build date of you plugin in the Name property.