Advertisement
Guest User

Untitled

a guest
May 28th, 2010
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.72 KB | None | 0 0
  1. #include <windows.h>
  2. #include <string.h>
  3.  
  4. // variables
  5. DWORD dwPluginID;
  6.  
  7. struct sPluginInfo {
  8.     char strPluginName[255];
  9.     char strPluginDescription[255];
  10.     char strPluginVersion[255];
  11. };
  12.  
  13. struct sBotUserInfo {
  14.     char strBotName[255];
  15.     char strBotPassword[255];
  16.     bool bIsFemale;
  17. };
  18.  
  19. // functions
  20. typedef BYTE (__stdcall * typeCommFortProcess)(DWORD dwPluginID, DWORD dwMessageID, BYTE * bMessage, DWORD dwMessageLength);
  21. typeCommFortProcess CommFortProcess;
  22.  
  23. extern "C" __declspec(dllexport) BYTE PluginInit(DWORD dwThisPluginID, sPluginInfo *plInfo, sBotUserInfo *botInfo, typeCommFortProcess);
  24. extern "C" __declspec(dllexport) BYTE PluginTerminate();
  25. extern "C" __declspec(dllexport) BYTE PluginProcess(DWORD dwMessageID, BYTE * bMessage, DWORD dwMessageLength);
  26. extern "C" __declspec(dllexport) BOOL Premoderation(DWORD dwMessageID, BYTE * bMessage, DWORD * dwMessageLength);
  27.  
  28. extern "C" __declspec(dllexport) VOID PluginShowOptions();
  29. extern "C" __declspec(dllexport) VOID PluginShowAbout();
  30.  
  31. //---------------------------------------------------------------------------
  32. int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
  33. {
  34.     return 1;
  35. }
  36.  
  37. //---------------------------------------------------------------------------
  38. BYTE PluginInit(DWORD dwThisPluginID, sPluginInfo * plInfo, sBotUserInfo * botInfo, typeCommFortProcess func1)
  39. {
  40.    dwPluginID = dwThisPluginID;
  41.  
  42.    strcpy_s((* plInfo).strPluginName, "Null");
  43.    strcpy_s((* plInfo).strPluginDescription, "Null");
  44.    strcpy_s((* plInfo).strPluginVersion, "4.02");
  45.  
  46.    strcpy_s((* botInfo).strBotName, "botik");
  47.    strcpy_s((* botInfo).strBotPassword, "osdwgz");
  48.  
  49.    (* botInfo).bIsFemale = false;
  50.  
  51.    CommFortProcess = func1;
  52.  
  53.    (*CommFortProcess)(dwPluginID, 40, NULL, 0);
  54.  
  55.    return 0;
  56. }
  57.  
  58. //---------------------------------------------------------------------------
  59. BYTE PluginTerminate()
  60. {
  61.     MessageBox(NULL, L"Terminate" , L"Terminate", 0);
  62.     return 0;
  63. }
  64.  
  65. //---------------------------------------------------------------------------
  66. BOOL Premoderation(DWORD dwMessageID, BYTE * bMessage, DWORD * dwMessageLength)
  67. {
  68.     MessageBox(NULL, L"Premoderation" , L"Premoderation", 0);
  69.     return FALSE;
  70. }
  71.  
  72. //---------------------------------------------------------------------------
  73. BYTE PluginProcess(DWORD dwMessageID, BYTE * bMessage, DWORD dwMessageLength)
  74. {
  75.     MessageBox(NULL, L"hello", L"Process", 0);
  76.     return 0;
  77. }
  78.  
  79. //---------------------------------------------------------------------------
  80. VOID PluginShowOptions()
  81. {
  82.     MessageBox(NULL, L"Options" , L"Options", 0);
  83. }
  84.  
  85. //---------------------------------------------------------------------------
  86. VOID PluginShowAbout()
  87. {
  88.     MessageBox(NULL, L"About" , L"About", 0);
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement