plugins.h
上传用户:jinandeyu
上传日期:2007-01-05
资源大小:620k
文件大小:4k
源码类别:

远程控制编程

开发平台:

WINDOWS

  1. /*  Back Orifice 2000 - Remote Administration Suite
  2.     Copyright (C) 1999, Cult Of The Dead Cow
  3.     This file is free software, and not subject to GNU Public License
  4. restrictions; you can redistribute it and/or modify it in any way 
  5. you see fit. This file is suitable for inclusion in a derivative
  6. work, regardless of license on the work or availability of source code
  7. to the work. If you redistribute this file, you must leave this
  8. header intact.
  9.     
  10. This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
  13. The author of this program may be contacted at dildog@l0pht.com. */
  14. #ifndef __INC_PLUGINS_H
  15. #define __INC_PLUGINS_H
  16. #include<bocomreg.h>
  17. #include<auth.h>
  18. #include<encryption.h>
  19. #include<iohandler.h>
  20. #ifdef __BO2KSERVER__
  21. void InitializeCommands(void);
  22. void TerminateCommands(void);
  23. void LoadPlugins(void);
  24. void UnloadPlugins(void);
  25. int AddPlugin(void *pPlugin, int nSize);
  26. int DebugPlugin(char *svPluginFile);
  27. HMODULE GetPlugin(int nNum);
  28. int RemovePlugin(int nNum);
  29. #endif
  30. #pragma pack(push,1)
  31. typedef struct {
  32. WORD nNumPlugins;
  33. } ATTACHMENT_HEADER, *PATTACHMENT_HEADER;
  34. typedef struct {
  35. DWORD dwPluginSize;
  36. } ATTACHMENT_INDEX, *PATTACHMENT_INDEX;
  37. typedef int (TYPEOF_ClientMenu)(HWND hParent);
  38. typedef int (TYPEOF_RegisterCommand)(BO_CMD_HANDLER handler, char *svFolderName, char *svCommName, char *svArgDesc1, char *svArgDesc2, char *svArgDesc3);
  39. typedef int (TYPEOF_UnregisterCommand)(int command);
  40. typedef int (TYPEOF_RegisterClientMenu)(LPCSTR szCategory, LPCSTR szComName, TYPEOF_ClientMenu *pProc);
  41. typedef int (TYPEOF_UnregisterClientMenu)(LPCSTR szCategory, LPCSTR szComName);
  42. typedef int (TYPEOF_IssueAuthCommandRequest)(CAuthSocket *cas_from, int command, int comid, int nArg1, char *svArg2, char *svArg3);
  43. typedef int (TYPEOF_IssueAuthCommandReply)(CAuthSocket *cas_from, int comid, int nReplyCode, char *svReply);
  44. typedef CAuthSocket *(TYPEOF_ConnectAuthSocket)(INTERACTIVE_CONNECT *pIC, int nUserId, HWND hParent, LPCSTR svBindStr, LPCSTR svNetMod, LPCSTR svEncryption, LPCSTR svAuth);
  45. typedef CAuthSocket *(TYPEOF_ListenAuthSocket)(INTERACTIVE_LISTEN *pIL, int nUserId, HWND hParent, LPCSTR svBindStr, LPCSTR svNetMod, LPCSTR svEncryption, LPCSTR svAuth);
  46. typedef int (TYPEOF_DispatchCommand)(int command, CAuthSocket *cas_from, int comid, int nArg1, char *svArg2, char *svArg3);
  47. typedef INTERACTIVE_LISTEN TYPEOF_InteractiveListen; 
  48. typedef INTERACTIVE_CONNECT TYPEOF_InteractiveConnect;
  49. typedef struct {
  50. CEncryptionHandler *pEncryptionHandler;
  51. CIOHandler *pIOHandler;
  52. CAuthHandler *pAuthHandler;
  53. TYPEOF_RegisterCommand *pRegisterCommand;
  54. TYPEOF_UnregisterCommand *pUnregisterCommand;
  55. TYPEOF_RegisterClientMenu *pRegisterClientMenu;
  56. TYPEOF_UnregisterClientMenu *pUnregisterClientMenu;
  57. TYPEOF_DispatchCommand *pDispatchCommand;
  58. TYPEOF_IssueAuthCommandRequest *pIssueAuthCommandRequest;
  59. TYPEOF_IssueAuthCommandReply *pIssueAuthCommandReply;
  60. TYPEOF_ConnectAuthSocket *pConnectAuthSocket;
  61. TYPEOF_ListenAuthSocket *pListenAuthSocket;
  62. TYPEOF_InteractiveListen *pInteractiveListen;
  63. TYPEOF_InteractiveConnect *pInteractiveConnect;
  64. } PLUGIN_LINKAGE;
  65. typedef struct {
  66. char *svFilename;
  67. char *svDescription;
  68. WORD wVersionLo;
  69. WORD wVersionHi;
  70. WORD wBOVersionLo;
  71. WORD wBOVersionHi;
  72. } PLUGIN_VERSION;
  73. typedef BOOL (TYPEOF_InstallPlugin)(PLUGIN_LINKAGE pl);
  74. typedef BOOL (TYPEOF_PluginVersion)(PLUGIN_VERSION *ppv);
  75. typedef void (TYPEOF_TerminatePlugin)(void);
  76. #define WM_CHILD_DESTROYED (WM_USER+1)
  77. #pragma pack(pop)
  78. #endif