00001
00009 #ifndef DKUTIL_CSTD_DEFINE_H
00010 #define DKUTIL_CSTD_DEFINE_H
00011
00012 #include "auto_config.h"
00013
00014
00015
00016
00017
00018
00020 #define DKINGYO_ULONGLONG_MAX 18446744073709551615
00021
00022 #define DKINGYO_LONGLONG_MAX 9223372036854775807
00023
00024 #define DKINGYO_LONGLONG_MIN -9223372036854775808
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifdef __cplusplus
00040 # define DKUTIL_EXTERN extern "C"
00041 #else
00042
00043 # define DKUTIL_EXTERN extern
00044 #endif
00045
00046
00047 #ifndef DKC_INLINE
00048 #define DKC_HAVE_INLINE 1
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 # if _MSC_VER >= 1100
00059 # define DKC_INLINE __inline
00060 # elif USEINLINE
00061 # define DKC_INLINE __inline__
00062 # else
00063 # define DKC_INLINE
00064 # undef DKC_HAVE_INLINE
00065 # define DKC_HAVE_INLINE 0
00066 # endif
00067
00068
00069
00070 # ifdef FORCEINLINE
00071 # define DKC_FORCE_INLINE FORCEINLINE
00072 # elif _MSC_VER >= 1100
00073 # define DKC_FORCE_INLINE __forceinline
00074 # else
00075 # define DKC_FORCE_INLINE DKC_INLINE
00076 # endif//end of FORCEINLINE
00077 #endif//end of DKC_INLINE
00078
00079
00080
00081 #ifdef WIN32
00082 # define DKC_EXPORT __declspec(dllexport)
00083 # define DKC_IMPORT __declspec(dllimport)
00084 # ifdef USE_DKC_DLL
00085 # ifdef DKCDLL_EXPORTS
00086 # define DKC_EXTERN DKUTIL_EXTERN DKC_EXPORT
00087 # else
00088 # define DKC_EXTERN DKUTIL_EXTERN DKC_INPORT
00089 # endif
00090 # else
00091 # ifdef _MSC_VER
00092 # define DKC_EXTERN DKUTIL_EXTERN DKC_INLINE
00093 # else
00094 # define DKC_EXTERN DKUTIL_EXTERN
00095 # endif
00096 # endif
00097 #else
00098 # define DKC_EXPORT
00099 # define DKC_IMPORT
00100 # define DKC_EXTERN DKUTIL_EXTERN
00101 #endif
00102
00103 #ifdef _DEBUG
00104 # ifndef DEBUG
00105 # define DEBUG
00106 # endif
00107 #endif
00108 #ifdef _NDEBUG
00109 # ifndef NDEBUG
00110 # define NDEBUG
00111 # endif
00112 #endif
00113
00114
00115 #if defined(_MT) || defined(__MT__)//MultiThread
00116 # define dkcdMultiThread
00117 #endif
00118
00119
00120 #include "macro.h"
00121
00122
00123
00124
00125 enum edkOS{
00126 enuWindows3_1 = 1,
00127 enuWindowsNT3_51,
00128 enuWindowsNT4_0,
00129 enuWindows95,
00130 enuWindows98,
00131 enuWindows2000,
00132 enuWindowsMe,
00133 enuWindowsXP,
00135 enuWindows_NET,
00136
00137 };
00138
00139
00140 enum edkOSExtension{
00142 edkOSE_OSR2 = 1,
00144 edkOSE_edkSE,
00146 edkOSE_HomeEditon,
00148 edkOSE_Professional,
00150 edkOSE_DataCenter_Server,
00152 edkOSE_Advanced_Server,
00153 edkOSE_Enterprise_Server,
00154 edkOSE_Web_Server,
00156 edkOSE_Server,
00157
00158 };
00159
00161 enum edkVariableType{
00163 edkVariableUnknown = 0,
00165 edkInt,
00167 edkUInt,
00169 edkLongLong,
00171 edkULongLong,
00173 edkDouble,
00175 edkString,
00176 };
00177
00178
00179
00181 enum{
00183 enuSTRLENGTH_INT_DU = 1,
00185 enuSTRLENGTH_UINT_DU,
00187 enuSTRLENGTH_LONGLONG_DU,
00189 enuSTRLENGTH_ULONGLONG_DU,
00191 enuSTRLENGTH_DOUBLE,
00192 };
00193
00195 enum edkFileSignature{
00196 edkfALL = 0,
00197
00198 edkfTXT,
00199 edkfHTML,
00200 edkfXML,
00201
00202 edkfAVI,
00203 edkfMPEG,
00204 edkfMOV,
00205
00206 edkfWAV,
00207 edkfMIDI,
00208 edkfMP3,
00209 edkfOGG,
00210
00211 edkfPNG,
00212 edkfBMP,
00213 edkfTIFF,
00214 edkfJPEG,
00215 edkfGIF,
00216
00217 edkfZIP,
00218 edkfLZH,
00219 edkfGZ,
00220 edkfGCA,
00221 edkfDGC,
00222 edkfRAR,
00223
00224 edkfSENTINEL,
00225 };
00226
00232 #if 0
00233
00234 enum edk_ProcessSignatures{
00235 edk_NONE_SIGNATURE = 0,
00236
00237
00238 edk_LZSS_SIGNATURE = 10,
00239 edk_ZLIB_SIGNATURE,
00240 edk_RLE_PACKBITS_SIGNATURE,
00241 edk_BLOCKSORT_SIGNATURE,
00242
00243
00244 edk_BLOWFISH_SIGNATURE = 100,
00245 edk_ARCFOUR_SIGNATURE,
00246
00247
00248
00249
00250 };
00251 #else
00252
00253 enum edk_ProcessSignatures{
00254 edk_NONE_SIGNATURE = 0,
00255
00256
00257 edk_LZSS_SIGNATURE = 0x100,
00258 edk_ZLIB_SIGNATURE = 0x200,
00259 edk_RLE_PACKBITS_SIGNATURE = 0x400,
00260 edk_BLOCKSORT_SIGNATURE = 0x800,
00261 edk_LZW_SIGNATURE = 0x1000,
00262
00263
00264 edk_BLOWFISH_SIGNATURE = 0x10000,
00265 edk_ARCFOUR_SIGNATURE = 0x20000,
00266 edk_HC256_SIGNATURE = 0x40000,
00267 edk_SNOW20_SIGNATURE = 0x80000,
00268 edk_SNOW2_SIGNATURE = edk_SNOW20_SIGNATURE,
00269 edk_VERNAM_SIGNATURE = 0x100000,
00270 edk_RIJNDAEL_SIGNATURE = 0x200000,
00271
00272
00273
00274
00275
00276 };
00277
00278 #endif
00279
00280
00281
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00302 enum edk_SJISFileSystem{
00303 edkcFileRewrite = 1,
00304 };
00305
00312 enum edk_SecureHash{
00313
00314 edkcSH_MD2 = 0,
00315 edkcSH_MD4,
00316 edkcSH_MD5,
00317
00318 edkcSH_SHA0 = 16,
00319 edkcSH_SHA1 ,
00320 edkcSH_SHA160 = edkcSH_SHA1,
00321 edkcSH_SHA256,
00322 edkcSH_SHA384,
00323 edkcSH_SHA512,
00324
00325 edkcSH_RIPEMD128 = 32,
00326 edkcSH_RIPEMD160,
00327 edkcSH_RIPEMD256,
00328 edkcSH_RIPEMD320,
00329
00330 };
00331
00337 enum edkResult{
00339 edk_FAILED = -1,
00341 edk_SUCCEEDED = 0,
00343 edk_Not_Found,
00345 edk_FileNotFound,
00347 edk_Not_Selected,
00349 edk_ArgumentException,
00351 edk_ParsingError,
00352
00359 edk_LogicError,
00361 edk_BufferOverFlow,
00363 edk_OutputBufferWasLost,
00365 edk_InputBufferWasLost,
00366
00367
00369 edk_SignatureException,
00371 edk_Not_Satisfactory,
00373 edk_Not_Defined_Function,
00375 edk_OutOfMemory,
00377 edk_EndProcess,
00379 edk_LogicException,
00381 edk_NoValueToProcess,
00382
00383 edk_FileCheated_Change,
00385 edk_FileCheated_Addition,
00387 edk_VariableOverFlow,
00389 edk_VariableUnderFlow,
00391 edk_ResultDefinitionEnd = 32767,
00403 edk_UserDefinitionBegin,
00404 };
00405
00406 #define DKUTIL_SUCCEEDED(s) (s==edk_SUCCEEDED)
00407 #define DKUTIL_FAILED(s) (s)//(s != edk_SUCCEEDED)
00408 #define DKUTIL_FAILED_BOOL(s) (s != edk_SUCCEEDED)
00409 #define DKUTIL_SUCCEEDED_BOOL(s) (s==edk_SUCCEEDED)
00410
00411 #include "os.h"
00412
00413 #endif //end of include once