X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FcreaSystem.cxx;fp=src%2FcreaSystem.cxx;h=460bb7fb53c5756fbb966d11d4f912dc982c9d9e;hb=a92a4d8ae0373b7e45cba62c8f84c2196030a269;hp=65311afe1e6c9601276b7963c26fbf07065a5883;hpb=f212ff2c82487b560f063b0c1d5951841ffe857e;p=crea.git diff --git a/src/creaSystem.cxx b/src/creaSystem.cxx index 65311af..460bb7f 100644 --- a/src/creaSystem.cxx +++ b/src/creaSystem.cxx @@ -171,6 +171,18 @@ int System::GetAppPath(char *pname, size_t pathsize) return -1; /* Path Lookup Failed */ } +std::string System::GetDllAppPath(std::string nomdll){ + std::string path = "."; +#ifdef WIN32 + char currentPath[_MAX_PATH]; + HMODULE hand = GetModuleHandle(nomdll.c_str()); + GetModuleFileName(hand, currentPath, _MAX_PATH); + + path = currentPath; + path = path.substr(0,path.find_last_of("\\")); +#endif + return path; +} } // namespace crea