12#if __DCL_HAVE_ALLOC_DEBUG
13#undef __DCL_ALLOC_LEVEL
14#define __DCL_ALLOC_LEVEL __DCL_ALLOC_INTERNAL
20#if __DCL_HAVE_THIS_FILE__
43 __message = _name +
__T(
" ") + _message;
48 StringBuilder
r = __message;
69 catch (DllException* e) {
81 const String& _filename,
int _flags
88 HINSTANCE handle = LoadLibraryExW(
91 LOAD_WITH_ALTERED_SEARCH_PATH
94 DWORD lastError = GetLastError();
100 if (_filename[(
size_t) 0] == L
'/') {
105 void* handle =
__dlopen(_filename, _flags);
106 if (handle ==
NULL) {
113 __filename = _filename;
114 __handle = (
void*)handle;
125 if (::FreeLibrary((HINSTANCE) handle) ==
FALSE)
129 if (dlclose(handle) != 0) {
139void* Dll::getAddress(
const char* _symbol)
148 r = (
void*) GetProcAddress((HINSTANCE)__handle, _symbol);
152 __filename + L
"::" + symbol,
157 r = dlsym(__handle, _symbol);
164 __filename + L
"::" + symbol,
DCLCAPI int __dlerror(String &r)
DCLCAPI void * __dlopen(const String &_filename, int _flag)
#define __DCL_TRACE1(fmt, arg1)
#define __DCL_VERIFY(expr)
#define __DCL_ASSERT(expr)
#define IMPLEMENT_CLASSINFO(class_name, base_class_name)
static String decode(const char *_mbs, size_t _mbslen=(size_t) -1)
DllException(const String &_name, Exception *_cause)
virtual String toString() const
static bool exists(const String &_path)
virtual String toString() const
SysError(Exception *_cause=NULL)