From cba64a358778d19a565f4df8d6fcbfeceac17b12 Mon Sep 17 00:00:00 2001 From: looooo Date: Wed, 30 May 2018 10:31:29 +0200 Subject: [PATCH] fix windows problem: https://forum.freecadweb.org/viewtopic.php?f=4&t=29014 --- src/Main/MainPy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main/MainPy.cpp b/src/Main/MainPy.cpp index e8e6965e78..061740903c 100644 --- a/src/Main/MainPy.cpp +++ b/src/Main/MainPy.cpp @@ -61,7 +61,7 @@ BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserv // This name is preliminary, we pass it to Application::init() in initFreeCAD() // which does the rest. char szFileName [MAX_PATH]; - GetModuleFileName((HMODULE)hModule, szFileName, MAX_PATH-1); + GetModuleFileNameA((HMODULE)hModule, szFileName, MAX_PATH-1); App::Application::Config()["AppHomePath"] = szFileName; } break; @@ -98,7 +98,7 @@ PyMOD_INIT_FUNC(FreeCAD) #elif defined(FC_OS_CYGWIN) HMODULE hModule = GetModuleHandle("FreeCAD.dll"); char szFileName [MAX_PATH]; - GetModuleFileName(hModule, szFileName, MAX_PATH-1); + GetModuleFileNameA(hModule, szFileName, MAX_PATH-1); argv[0] = (char*)malloc(MAX_PATH); strncpy(argv[0],szFileName,MAX_PATH); argv[0][MAX_PATH-1] = '\0'; // ensure null termination