]> Creatis software - crea.git/blobdiff - src/creaSystem.cxx
*** empty log message ***
[crea.git] / src / creaSystem.cxx
index 9f917e508b2b7b830347c22f9d6781e724f07747..7225884dd445252b2f44d9c45a0727eb4a4c24ed 100644 (file)
@@ -44,6 +44,8 @@ namespace crea
    }
 #endif
 
+
+
 int System::GetAppPath(char *pname, size_t pathsize)
    {
 #ifdef LINUX   
@@ -167,5 +169,18 @@ int System::GetAppPath(char *pname, size_t pathsize)
 } 
 
 
+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