|
//*****************************************************************************
// *
// Filename : plugin.h *
// Author : Eric M Solliday *
// Date : January 26, 2009 *
// Copyright: 2009, Sherric Group, LLC *
// *
// Description: *
// This is the interface file for the PluginDemo project. *
// This file describes the commands that are made available to the core app *
// by the plug-in library. The commands included in this file are for *
// example purposes only. *
// *
// This file is provided under the Code Project Open License (CPOL). *
// No other warrenties are given or inferred. *
// *
//*****************************************************************************
#ifndef PLUGIN_H
#define PLUGIN_H
// Always include windows.h
#include <windows.h>
// Typedefs for the service functions (function pointers)
// In a more meaningful implementation, the signatures here would
// reflect valid data being passed to the service function as arguments.
typedef void (*svcSerialOpen)();
typedef void (*svcSerialClose)();
typedef void (*svcSerialRead)();
typedef void (*svcSerialWrite)();
// Service function lookup structure
typedef struct
{
svcSerialOpen SerialOpenFP;
svcSerialClose SerialCloseFP;
svcSerialRead SerialReadFP;
svcSerialWrite SerialWriteFP;
}
tServiceLookup;
// Typedefs for the plugin command functions (function pointers)
// In a more meaningful implementation, the signatures here would
// reflect valid data being passed to the command functions as arguments.
typedef void (*pluginInitFunct)( HWND, tServiceLookup* );
typedef void (*pluginFunct)( HWND );
// Plugin Function pointers
pluginInitFunct PluginInitFP;
pluginFunct DeviceResetFP;
pluginFunct DeviceReadDataFP;
pluginFunct DeviceWriteDataFP;
// Plugin Functions
extern "C" __declspec(dllexport) void plugin_PluginInit(HWND, tServiceLookup*);
extern "C" __declspec(dllexport) void plugin_DeviceReset(HWND);
extern "C" __declspec(dllexport) void plugin_DeviceWriteData(HWND);
extern "C" __declspec(dllexport) void plugin_DeviceReadData(HWND);
#endif // PLUGIN_H
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.