Advertisement
Guest User

Unfail :)

a guest
Aug 26th, 2014
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.45 KB | None | 0 0
  1. #include "main.h"
  2. #include <stdio.h>
  3. #include <string>
  4.  
  5. struct gameclient
  6. {
  7.     bool proxyenabled; // true if embedded proxy is enabled, false if otherwise or error
  8.     int pid;
  9.     int windowX;
  10.     int windowY;
  11.     int windowWidth;
  12.     int windowHeight;
  13.     int windowhwnd;
  14.     int gameserverPort; //port used by game client. 0 if proxyenabled == false
  15.     std::string gameserverIp; //port used by game client. "" if proxyenabled == false
  16.     std::string windowTitle;
  17. };
  18.  
  19.  
  20. void DLL_EXPORT __stdcall pluginload(gameclient *gamedata)
  21. {
  22.     FILE *fh = fopen("./proxylog.txt", "a");
  23.         fprintf(fh, "Proxy Loaded!");
  24.         fclose(fh);
  25. }
  26.  
  27. void DLL_EXPORT __stdcall pluginunload(gameclient *gamedata)
  28. {
  29.     FILE *fh = fopen("./proxylog.txt", "a");
  30.         fprintf(fh, "Proxy Unloaded!");
  31.         fclose(fh);
  32. }
  33.  
  34. void DLL_EXPORT __stdcall pluginrun(gameclient *gamedata)
  35. {
  36.     FILE *fh = fopen("./proxylog.txt", "a");
  37.         fprintf(fh, "Proxy Started!");
  38.         fclose(fh);
  39. }
  40.  
  41. bool DLL_EXPORT __stdcall pluginsendpacket(gameclient *gamedata, int Packet_length, char *buffer)
  42. {
  43.     FILE *fh = fopen("./proxylog.txt", "a");
  44.         fprintf(fh, "Proxy Sent!");
  45.         fclose(fh);
  46.     return false;
  47.  
  48. }
  49.  
  50. bool DLL_EXPORT __stdcall pluginrecvpacket(gameclient *gamedata, int Packet_length, char *buffer)
  51. {
  52.     FILE *fh = fopen("./proxylog.txt", "a");
  53.         fprintf(fh, "Packet Received!");
  54.         fclose(fh);
  55.     return false;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement