Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "main.h"
- #include <stdio.h>
- #include <string>
- struct gameclient
- {
- bool proxyenabled; // true if embedded proxy is enabled, false if otherwise or error
- int pid;
- int windowX;
- int windowY;
- int windowWidth;
- int windowHeight;
- int windowhwnd;
- int gameserverPort; //port used by game client. 0 if proxyenabled == false
- std::string gameserverIp; //port used by game client. "" if proxyenabled == false
- std::string windowTitle;
- };
- void DLL_EXPORT __stdcall pluginload(gameclient *gamedata)
- {
- if (gamedata->proxyenabled == true)
- {
- MessageBoxA(0,"YAY PROXY IS ENABLED","Test Plugin",MB_OK);
- }
- MessageBoxA(0,"Example plugin load","Test Plugin",MB_OK);
- }
- void DLL_EXPORT __stdcall pluginunload(gameclient *gamedata)
- {
- MessageBoxA(0,"Example plugin unload","Test Plugin",MB_OK);
- }
- void DLL_EXPORT __stdcall pluginrun(gameclient *gamedata)
- {
- MessageBoxA(0,"Example plugin run","Test Plugin",MB_OK);
- }
- bool DLL_EXPORT __stdcall pluginsendpacket(gameclient *gamedata, int Packet_length, char *buffer)
- {
- return false; //return true to cancel packet
- }
- bool DLL_EXPORT __stdcall pluginrecvpacket(gameclient *gamedata, int Packet_length, char *buffer)
- {
- return false; //return true to cancel packet
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement