56 #elif defined(LOAD_KPP) 72 #define LOAD_OPTIMIZED_FUNCTION(name) Optimized##name = (DefOptimized##name) GetProcAddress(hMod, #name); 73 #elif defined(LOAD_KPP) 74 #define LOAD_OPTIMIZED_FUNCTION(name) Optimized##name = (DefOptimized##name) dlsym(m_pLibHandle, #name); 77 #define LOAD_OPTIMIZED_FUNCTION(name) Optimized##name = 0; 82 #undef DECLARE_OPTIMIZED_FUNCTION_0 83 #undef DECLARE_OPTIMIZED_FUNCTION_1 84 #undef DECLARE_OPTIMIZED_FUNCTION_2 85 #undef DECLARE_OPTIMIZED_FUNCTION_3 86 #undef DECLARE_OPTIMIZED_FUNCTION_4 87 #undef DECLARE_OPTIMIZED_FUNCTION_5 88 #undef DECLARE_OPTIMIZED_FUNCTION_5_RET 89 #undef DECLARE_OPTIMIZED_FUNCTION_8 90 #undef DECLARE_OPTIMIZED_FUNCTION_9 92 #define DECLARE_OPTIMIZED_FUNCTION_0(name) LOAD_OPTIMIZED_FUNCTION(name) 93 #define DECLARE_OPTIMIZED_FUNCTION_1(name, p1) LOAD_OPTIMIZED_FUNCTION(name) 94 #define DECLARE_OPTIMIZED_FUNCTION_2(name, p1, p2) LOAD_OPTIMIZED_FUNCTION(name) 95 #define DECLARE_OPTIMIZED_FUNCTION_3(name, p1, p2, p3) LOAD_OPTIMIZED_FUNCTION(name) 96 #define DECLARE_OPTIMIZED_FUNCTION_4(name, p1, p2, p3, p4) LOAD_OPTIMIZED_FUNCTION(name) 97 #define DECLARE_OPTIMIZED_FUNCTION_5(name, p1, p2, p3, p4, p5) LOAD_OPTIMIZED_FUNCTION(name) 98 #define DECLARE_OPTIMIZED_FUNCTION_5_RET(name, p1, p2, p3, p4, p5) LOAD_OPTIMIZED_FUNCTION(name) 99 #define DECLARE_OPTIMIZED_FUNCTION_8(name, p1, p2, p3, p4, p5, p6, p7, p8) LOAD_OPTIMIZED_FUNCTION(name) 100 #define DECLARE_OPTIMIZED_FUNCTION_9(name, p1, p2, p3, p4, p5, p6, p7, p8, p9) LOAD_OPTIMIZED_FUNCTION(name) 120 HMODULE hMod = LoadLibrary(
"KPP.dll");
124 #elif defined(LOAD_KPP) 141 typedef bool (*ActivateFunction) (
const char *);
142 ActivateFunction f = 0;
145 f = (ActivateFunction) GetProcAddress(hMod,
"Activate");
146 #elif defined(LOAD_KPP) 152 printf(
"info: loaded Keyetech Performance Primitives (KPP)\n");
154 if (f(
"license_kpp.txt"))
155 printf(
"info: activated KPP with license key\n");
158 printf(
"info: KPP activation with licensey key failed\n");
159 printf(
"info: The KPP thus run as a demo version.\n");
166 #undef DECLARE_OPTIMIZED_FUNCTION_0 167 #undef DECLARE_OPTIMIZED_FUNCTION_1 168 #undef DECLARE_OPTIMIZED_FUNCTION_2 169 #undef DECLARE_OPTIMIZED_FUNCTION_3 170 #undef DECLARE_OPTIMIZED_FUNCTION_4 171 #undef DECLARE_OPTIMIZED_FUNCTION_5 172 #undef DECLARE_OPTIMIZED_FUNCTION_5_RET 173 #undef DECLARE_OPTIMIZED_FUNCTION_8 174 #undef DECLARE_OPTIMIZED_FUNCTION_9 176 #define DECLARE_OPTIMIZED_FUNCTION_0(name) Optimized##name = 0; 177 #define DECLARE_OPTIMIZED_FUNCTION_1(name, p1) Optimized##name = 0; 178 #define DECLARE_OPTIMIZED_FUNCTION_2(name, p1, p2) Optimized##name = 0; 179 #define DECLARE_OPTIMIZED_FUNCTION_3(name, p1, p2, p3) Optimized##name = 0; 180 #define DECLARE_OPTIMIZED_FUNCTION_4(name, p1, p2, p3, p4) Optimized##name = 0; 181 #define DECLARE_OPTIMIZED_FUNCTION_5(name, p1, p2, p3, p4, p5) Optimized##name = 0; 182 #define DECLARE_OPTIMIZED_FUNCTION_5_RET(name, p1, p2, p3, p4, p5) Optimized##name = 0; 183 #define DECLARE_OPTIMIZED_FUNCTION_8(name, p1, p2, p3, p4, p5, p6, p7, p8) Optimized##name = 0; 184 #define DECLARE_OPTIMIZED_FUNCTION_9(name, p1, p2, p3, p4, p5, p6, p7, p8, p9) Optimized##name = 0; 193 #elif defined(LOAD_KPP)