CoolMon 2 : SDKBasic

Plugin Basic's - These function must be present in all plugins, no matter the type

CoolMon 2 supports three types of plugins, three plugin design that will do three very different things but nevertheless basically look somewhat alike. They all use a basic plugin set that will enable coolmon to do things that must be done in all three plugin types. The following functions must be present in all types of plugins.

Function Name(OUT Name: Pchar)...
Provide the name for the plugin.

Function Version(OUT Version: word)...
Provide the version number for the plugin. (Please refer to the version chapter earlier in this document).

Function RequiredCoreVersion(OUT RCV: Word)...
You must provide the CM2 core version your plugin requires in order to run properly. (Please refer to the version chapter earlier in this document).

Function GetLastErrorMsg(OUT Msg: PChar)...
Whenever a function call to your plugin fails, this function will be called by CM2 in order to get some sort of error description of the error.

Function Init...
Ran when the plugin is being loaded, in the visual plugin this function will also have a parameter called PaintDC, it will hold the device content that your plugin must draw on.

Function Terminating...
Ran when the plugin is about to be shutdown

Function Setup...
Ran when the user click “setup” on your plugin, if you do not have anything to set up you might wish to display a dialog saying that there is nothing to set up, so the user doesn’t click repeatedly on setup in CM2. This can be done in 2 ways, one you can code it manually or you can save time and simply return “E_NOTIMPL” instead of “S_OK” as the function result. This will cause CM2 to display a standard nothing to setup dialog.