|
61 | 61 | #pragma pack(pop, cryptoki) |
62 | 62 |
|
63 | 63 | // Platform dependend type for dynamically loaded library handle |
64 | | -typedef HINSTANCE DLHANDLE; |
65 | | -// Platform dependend function that loads dynamic library |
66 | | -#define DLOPEN(lib) LoadLibraryA((lib)) |
67 | | -// Platform dependend function that gets function pointer from dynamic library |
68 | | -#define DLSYM(lib, func) GetProcAddress((lib), (func)) |
69 | | -// Platform dependend function that unloads dynamic library |
70 | | -#define DLCLOSE FreeLibrary |
| 64 | +typedef HMODULE DLHANDLE; |
71 | 65 |
|
72 | 66 |
|
73 | 67 | #else // #ifdef _WIN32 |
@@ -95,12 +89,6 @@ typedef HINSTANCE DLHANDLE; |
95 | 89 |
|
96 | 90 | // Platform dependend type for dynamically loaded library handle |
97 | 91 | typedef void* DLHANDLE; |
98 | | -// Platform dependend function that loads dynamic library |
99 | | -#define DLOPEN(lib) dlopen((lib), RTLD_NOW | RTLD_LOCAL); |
100 | | -// Platform dependend function that gets function pointer from dynamic library |
101 | | -#define DLSYM(lib, func) dlsym((lib), (func)) |
102 | | -// Platform dependend function that unloads dynamic library |
103 | | -#define DLCLOSE dlclose |
104 | 92 |
|
105 | 93 |
|
106 | 94 | #endif // #ifdef _WIN32 |
@@ -172,6 +160,11 @@ PKCS11_LOGGER_GLOBALS; |
172 | 160 | // Macro that removes unused argument warning |
173 | 161 | #define IGNORE_ARG(P) (void)(P) |
174 | 162 |
|
| 163 | +// dl.c - declaration of functions |
| 164 | +DLHANDLE pkcs11_logger_dl_open(const char* library); |
| 165 | +void* pkcs11_logger_dl_sym(DLHANDLE library, const char* function); |
| 166 | +int pkcs11_logger_dl_close(DLHANDLE library); |
| 167 | + |
175 | 168 | // init.c - declaration of functions |
176 | 169 | #ifdef _WIN32 |
177 | 170 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved); |
@@ -215,3 +208,4 @@ int pkcs11_logger_utils_str_to_long(const char *str, unsigned long *val); |
215 | 208 | void pkcs11_logger_utils_get_current_time_str(char* buff, int buff_len); |
216 | 209 | unsigned long pkcs11_logger_utils_get_thread_id(void); |
217 | 210 | int pkcs11_logger_utils_get_process_id(void); |
| 211 | +CK_BBOOL pkcs11_logger_utils_path_is_absolute(const char* path); |
0 commit comments