]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkUtilities.cxx
#3203 BBTK Feature New Normal vtk7itk4wx3-mingw64
[bbtk.git] / kernel / src / bbtkUtilities.cxx
index 7e85dc76787497b9e350fc332188b4283f88304b..a7285fed13e6e80efd8b93cdba1d9e3747f26acb 100644 (file)
 #include "bbtkUtilities.h"
 #include "bbtkMessageManager.h"
 
+//EED 2018-07-16
+#if defined(_WIN32) 
+       #include <shlwapi.h>
+#endif
+
 #if defined(MACOSX) // assume this is OSX 
 # include <sys/param.h>
 # include <mach-o/dyld.h> // _NSGetExecutablePath : must add -framework CoreFoundation to link line 
@@ -633,7 +638,11 @@ namespace bbtk
 #endif /* LINUX */
     
 #ifdef WIN32
-    long result = GetModuleFileName(NULL, pname, pathsize);
+//2018-07-06 mingw64
+    wchar_t pname2[512];
+       mbstowcs(pname2,pname,strlen(pname)+1);
+    long result = GetModuleFileName(NULL, pname2, pathsize);
+//    long result = GetModuleFileName(NULL, pname, pathsize);
     if (result > 0)
       {
        /* fix up the dir slashes... */