ChessPartner devices extension dlls

ChessPartner devices extension dlls can be used to interface ChessPartner to electronic Chessboards or other equipment. Here you find information on how to program a device extension.

**** Beware this information is only useful for programmers ****

This demo project shows how to make ChessPartner device extensions. These extensions are intended to drive things like electronic Chess boards like the DGT board.
Installing a extension is by simply copy the dll into the devices subdirectory. Once copied the extension will be visible int device tab of the Extra -> Options dialog.

Structure of a device extension dll.

A device extension has a single entry point on which the ChessPartner GUI sends a message when certain events happen. Events are things like the user or engine making a move.
The device extension can send messages back to the ChessPartner GUI by using the windows SendMessage API call. These messages must be send using a specic message ID on a specific hWnd.

The cpextdevice.h file contains the definition of all the various messages.

When a extension dll is loaded, ChessPartner first sends the EXTDEVMSG_INITDEVICE message, in the parameters of this message a hWnd and MSG ID is given for sending messages back to the CP GUI.

After that, the device extension can send a message to the GUI to specify what kind of messages it is interested in.

Its up to the extension to do something meaningful with the messages.

Its also possible to pass moves to the GUI using the EXTDEVNOTIFY_MOVEPLAYED notify message.

When the extension is about to be unloaded the EXTDEVMSG_STOPDEVICE message is send.

A extension dll should also supply a configuration dialog page, when the user want to access the extension configuration page, the CP GUI sends the EXTDEVMSG_CONFIGURE message.
The extension should store its configuration data in a ini file.

The sample extension project

The sample extension dll simply output the played moves to the configured serial port and accepts moves entered through the serial port.

This project is build with Microsoft Visual studio 6.0