00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef IPSHOOKINTERFACE_H
00030 #define IPSHOOKINTERFACE_H
00031
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #endif
00049
00050 #if defined(__WATCOMC__)
00051 #pragma pack(1)
00052 #endif
00053
00057 #define IPS_CHOOK_VERSION 1
00058
00063 typedef unsigned int IPSBOOL;
00064
00065
00066
00067
00068 #ifndef FALSE
00069 #define FALSE 0
00070 #endif
00071 #ifndef TRUE
00072 #define TRUE !FALSE
00073 #endif
00074
00087 #if defined (__WATCOMC__) // Windows and OS/2
00088 #if defined(__OS2__)
00089 #define IPSCALL __syscall
00090 #elif defined(__NT__)
00091 #define IPSCALL __stdcall
00092 #endif
00093 #define IPSEXPORT IPSCALL __export
00094 #elif defined(_MSC_VER) // Windows
00095 #define IPSCALL __stdcall
00096 #define IPSEXPORT __declspec(dllexport)
00097 #else // Just to make doxygen happy
00098 #define IPSCALL system calling convention
00099 #define IPSEXPORT exported entry
00100 #endif
00101
00102
00103
00104
00105 typedef struct _IPSHOOKPROC IPSHOOKPROC;
00106 typedef struct _IPSHOOKPROC *PIPSHOOKPROC;
00107
00111 struct _IPSHOOKDATA
00112 {
00113 char *arg;
00114 char *result;
00115 };
00116
00117 typedef struct _IPSHOOKDATA IPSHOOKDATA;
00118 typedef struct _IPSHOOKDATA *PIPSHOOKDATA;
00119
00124 struct _IPSHOOKINFO
00125 {
00126 char *ipsVersionString;
00127 union {
00128 unsigned int ipsVersionID;
00129 struct part {
00130 unsigned char subRevision;
00131 unsigned char revision;
00132 unsigned char minorVersion;
00133 unsigned char majorVersion;
00134 };
00135 } ver;
00136 unsigned int hookVersion;
00137 unsigned int sessionHandle;
00138 PIPSHOOKPROC pproc;
00139 PIPSHOOKDATA pdata;
00140 };
00141
00142 typedef struct _IPSHOOKINFO IPSHOOKINFO;
00143 typedef struct _IPSHOOKINFO *PIPSHOOKINFO;
00144
00145 typedef IPSBOOL (IPSCALL *PFIPSGETVALUE)(PIPSHOOKINFO, int, char*, char*, int);
00146 typedef IPSBOOL (IPSCALL *PFIPSSETVALUE)(PIPSHOOKINFO, int, char*, char*);
00147 typedef IPSBOOL (IPSCALL *PFIPSSEND)(PIPSHOOKINFO, void*, int);
00148 typedef IPSBOOL (IPSCALL *PFIPSRECV)(PIPSHOOKINFO, void*, int);
00149 typedef IPSBOOL (IPSCALL *PFIPSLOG)(PIPSHOOKINFO, unsigned, int, char*);
00150
00151
00158 struct _IPSHOOKPROC
00159 {
00160 PFIPSGETVALUE GetValue;
00161 PFIPSSETVALUE SetValue;
00162 PFIPSSEND Send;
00163 PFIPSRECV Recv;
00164 PFIPSLOG Log;
00165 };
00166
00167
00168
00169
00170 IPSBOOL IPSCALL IpsGetValue(PIPSHOOKINFO pHookInfo, int type, char* ident, char* buf, int size);
00171 IPSBOOL IPSCALL IpsSetValue(PIPSHOOKINFO pHookInfo, int type, char* ident, char* text);
00172
00180 #define IVT_RESULTVALUE 0x00000000
00181 #define IVT_VARIABLEVALUE 0x00000001
00182 #define IVT_CONFIGVALUE 0x00000002
00183 #define IVT_RESOURCEVALUE 0x00000003
00184
00186 IPSBOOL IPSCALL IpsSend(PIPSHOOKINFO pHookInfo, void* buf, int size);
00187 IPSBOOL IPSCALL IpsRecv(PIPSHOOKINFO pHookInfo, void* buf, int size);
00188 IPSBOOL IPSCALL IpsLog(PIPSHOOKINFO pHookInfo, unsigned code, int level, char* text);
00189
00200
00201 #define ILC_DEFAULT 0xf0000000
00202 #define ILC_SYSTEM_LOG 0xf1000000
00203 #define ILC_SYSTEM_CONSOLE 0xf2000000
00204 #define ILC_SYSTEM_LOG_CONSOLE \
00205 ILC_SYSTEM_LOG|ILC_SYSTEM_CONSOLE
00206
00208 #if defined(__WATCOMC__)
00209 #pragma pack(pop)
00210 #endif
00211
00212 #ifdef __cplusplus
00213 }
00214 #endif
00215
00216
00217 #endif // IPSHOOKINTERFACE_H