minpf_dynamic_library.h
Go to the documentation of this file.
#pragma once
#include <plugin/minpf_common.h>
#ifdef _WIN32
#include <Windows.h>
#else
#include <dlfcn.h>
#endif
#ifdef _WIN32
typedef HMODULE dynamic_handle_t;
#else
typedef void* dynamic_handle_t;
#endif
namespace grk
{
struct minpf_dynamic_library
{
char path[MINPF_MAX_PATH_LEN];
dynamic_handle_t handle;
};
minpf_dynamic_library* minpf_load_dynamic_library(const char* path, char* error);
bool minpf_unload_dynamic_library(minpf_dynamic_library* library);
void* minpf_get_symbol(minpf_dynamic_library* library, const char* symbol);
bool minpf_get_full_path(const char* path, void* addr, dynamic_handle_t handle, char* fullPath,
size_t fullPathLen);
} // namespace grk
minpf_common.h
MINPF_MAX_PATH_LEN
#define MINPF_MAX_PATH_LEN
Definition minpf_common.h:29
dynamic_handle_t
void * dynamic_handle_t
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition minpf_dynamic_library.h:29
grk
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk::minpf_load_dynamic_library
minpf_dynamic_library * minpf_load_dynamic_library(const char *path, char *error)
Definition minpf_dynamic_library.cpp:107
grk::grk_read
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
grk::minpf_get_symbol
void * minpf_get_symbol(minpf_dynamic_library *library, const char *symbol)
Definition minpf_dynamic_library.cpp:152
grk::minpf_unload_dynamic_library
bool minpf_unload_dynamic_library(minpf_dynamic_library *library)
Definition minpf_dynamic_library.cpp:88
grk::minpf_get_full_path
bool minpf_get_full_path(const char *path, void *addr, dynamic_handle_t handle, char *fullPath, size_t fullPathLen)
Definition minpf_dynamic_library.cpp:50
grk::minpf_dynamic_library
Definition minpf_dynamic_library.h:35
grk::minpf_dynamic_library::handle
dynamic_handle_t handle
Definition minpf_dynamic_library.h:37
grk::minpf_dynamic_library::path
char path[MINPF_MAX_PATH_LEN]
Definition minpf_dynamic_library.h:36