00001 /* mini 00002 * 00003 * This program is distributed under the GNU General Public License, version 2. 00004 * A copy of this license is included with this source. 00005 * 00006 * Copyright 2004-2006, Toni Thomsson <toni@tonjac.org> 00007 */ 00008 00009 #ifndef mini_h 00010 #define mini_h 00011 00012 #include <windows.h> 00013 #include <zz_default_error_data.h> // Don't remove, forces class to be exported when building an mini application DLL 00014 /* 00015 Maximum CGI-parameter argument length 00016 */ 00017 #define MINI_ARGUMENTLEN 1024 00018 #define MINI_DLL_API int _declspec(dllexport) __stdcall 00019 00025 typedef struct tagMINI_SESSION{ 00027 char id[40]; 00029 char user[256]; 00031 int userrole; 00033 char ip[50]; 00035 int time; 00037 int locked; 00039 void* userdata; 00041 void* extension; 00043 int usercount; 00045 int java; 00047 char last_error_message[512]; 00049 int last_error_code; 00051 int rollback; 00052 } MINI_SESSION; 00053 00054 #ifdef __cplusplus 00055 extern "C" { 00056 #endif 00057 00058 /* 00059 Description: 00060 Prototype for a mini-fast-cgi service 00061 00062 Parameters: 00063 IN session Session object 00064 IN argc Number of cgi-parameters 00065 IN argv Vector with cgi-parameters: 00066 00067 argv[0] Always the name of the DLL 00068 argv[n] Name of parameter: -{name} 00069 argv[n+1] Value of parameter {value} 00070 00071 example: -id myid 00072 00073 OUT buff Reply buffer, The buffer must be allocated with GlobalAlloc(). The buffer 00074 is freed by the caller when the call returns. 00075 OUT size Size of buff 00076 IN/OUT msg Error message. Buffer allocated by the caller. 00077 IN msglen Maximum size of error message, equals the size of the buffer allocated by the caller 00078 00079 returns: 00080 0 if service is successful, or !0 of the service fails 00081 00082 */ 00083 typedef int ( __stdcall MINI_DLL_SVC )( MINI_SESSION* session, 00084 int argc, char** argv, 00085 char** buff, int* size, 00086 char* msg, int msglen ); 00087 00088 00089 #ifdef __cplusplus 00090 } 00091 #endif /* __cplusplus */ 00092 #endif /* mini_h */
1.4.6-NO