]> Creatis software - crea.git/blobdiff - src/creaSystem.cxx
*** empty log message ***
[crea.git] / src / creaSystem.cxx
index 65311afe1e6c9601276b7963c26fbf07065a5883..460bb7fb53c5756fbb966d11d4f912dc982c9d9e 100644 (file)
@@ -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