Additional modules (plugins)
You can use plugins to increase ClubControl client part abilities. Plugins
- it is dll libraries which can communicate with client part. Client can inform
such plugins about different events - for example client mode switching, internet
blocking-unblocking, user registration and so on. So plugins can increase ClubControl
abilities.
You can write such plugins yourself.
To do it you have to create dll with one export function - "CallbackProc",
which is called by client on different events.
Parameters:
void CallbackProc (PLUGIN_CALL_EVENT pce, void *lpData, DWORD dwDataSize);
pce event
lpData extra data
dwDataSize extra data size
enum PLUGIN_CALL_EVENT
{
pceStartup,
//short
//computer number
//sizeof(short)
pceShutdown,
//int
//return value, if != -1 : ExitWindowsEx parameter
//sizeof(int)
pceEnableInet,
//bool
//true/false
//sizeof(bool)
pceMode,
//int
//#define MODE_NONE 0
//#define MODE_LOCKED 1
//#define MODE_USER 2
//#define MODE_ADMIN 3
//#define MODE_LAST MODE_ADMIN
//#define MODE_TOTAL MODE_NONE
//#define MODE BYTE
//sizeof(MODE)
pceUser
//char*
//new user
//string len + 1
}
As an example we give C++ (MS VC 6.0) sources of dll library, which sends network
commands when internet is blocked or unblocked. It can be used to operate Unix
firewall.
there are two code variants (second is commented), both sends filled
structure:
struct INET_DATA
{
DWORD pc;
BOOL bInternet;
};
pc - computer number
bInternet - internet status
Sources and compiled library can be downloaded from http://www.clubcontrol.sp...p?target=SimplePlugin.rar (54Kb).