Creating the first Watch TV Pro .NET PlugIn

 

Installating the WTVP.NET on a system with Microsoft Visual C# 2005 and Watch TV Pro 2.21 or 2.22 is more than half the way to your first .NET plug-in. First start Visual Studio.NET and choose to create a new C# project:

After the solution is created choose Rebuild All and - in the case the build succeeds what I strongly hope - start Watch TV Pro normally. There should now be a new plug-in menu entry with the name of the plug-in:

If you select the Hello Me! menu item some dialog box is shown:

Your first WTVP.NET is up and running inside Watch TV Pro!

 

It's recommended at least to update the PlugInName and BaseMenuID properties of your new plug-in class. You should especially make sure that the menu base identifier plus a following sequence of numbers is not used by some other plug-in. The WTVP.NET framework will take the ContextMenu of the plug-in and assign any menu item - including popups and separators - a unique identifier starting with the base identifier.

For additional information on any topic please refer to the the sample plug-in. The installation will in addition feed the IntelliSense feature of Microsoft Visual C# with a short descriptions on elements of the plug-in base class inside the WTVP.NET framework.

Since Watch TV Pro starts in a quite strange way it may not be possible to debug the plug-in directly by setting Watch TV Pro as the executable: it will start, terminate immediatly and start a new instance. To debug simply attach the debugger to the running instance. To debug code which is run automatically during startup adding a message box will stop execution so that the debugger can be attached - normally this is not necessary.

I decided not to include debug information for the WTVP.NET framework itself so it's not possible to step inside the plug-in base class. Using the SDK sources and a bit of configuration it's not so hard to create a version of the plug-in which allows debugging into the framework including full source code access, too. Please study the documentation and code of the C++ wrapper DLL.