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)
- {
- FILE *fh = fopen("./proxylog.txt", "a");
- fprintf(fh, "Proxy Loaded!");
- fclose(fh);
- }
- void DLL_EXPORT __stdcall pluginunload(gameclient *gamedata)
- {
- FILE *fh = fopen("./proxylog.txt", "a");
- fprintf(fh, "Proxy Unloaded!");
- fclose(fh);
- }
- void DLL_EXPORT __stdcall pluginrun(gameclient *gamedata)
- {
- FILE *fh = fopen("./proxylog.txt", "a");
- fprintf(fh, "Proxy Started!");
- fclose(fh);
- }
- bool DLL_EXPORT __stdcall pluginsendpacket(gameclient *gamedata, int Packet_length, char *buffer)
- {
- FILE *fh = fopen("./proxylog.txt", "a");
- fprintf(fh, "Proxy Sent!");
- fclose(fh);
- return false;
- }
- bool DLL_EXPORT __stdcall pluginrecvpacket(gameclient *gamedata, int Packet_length, char *buffer)
- {
- FILE *fh = fopen("./proxylog.txt", "a");
- fprintf(fh, "Packet Received!");
- fclose(fh);
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement