8 #ifndef GAUDIKERNEL_DSOUTILS_H
9 #define GAUDIKERNEL_DSOUTILS_H
17 #include "Reflex/Reflex.h"
24 return libName+
".dll";
25 #elif defined(__linux) || defined(__APPLE__)
26 return "lib"+libName+
".so";
40 (
void*)mem.Stubfunction()
42 System::FuncPtrCast<void*>(mem.Stubfunction())
47 const char* pos =
strrchr (info.dli_fname,
'/');
59 void* addr = (
void*)(mem.Stubfunction());
61 MEMORY_BASIC_INFORMATION mbi;
62 if ( VirtualQuery(addr, &mbi,
sizeof(mbi)) ) {
63 HMODULE h_module = (HMODULE)mbi.AllocationBase;
65 if( GetModuleFileName(h_module,
mod,
sizeof(
mod)) ) {
78 #else // dummy implementation for unknown platforms
86 static bool inDso(
const ROOT::Reflex::Member& mem,
96 if (srcname.empty()) {
103 if (std::string::npos == pos) {
106 curname = dsoname.
substr(pos+1);
109 return srcname == curname;
114 #endif // not GAUDIKERNEL_DSOUTILS_H