X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/13a5a49f36fee7a8afc237b2fe254a6db9663371..608299859db6a162b7346b39235f8bf95da90acf:/src/msw/main.cpp diff --git a/src/msw/main.cpp b/src/msw/main.cpp index 9d35d67001..a8bee7283b 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -77,15 +77,8 @@ WXDLLEXPORT int wxEntry(HINSTANCE hInstance, } #ifdef __WXWINCE__ - // WinCE doesn't insert the program itself, so let's - // do it here. - wxString programName; - - if ( ::GetModuleFileName( (HMODULE) wxGetInstance(), wxStringBuffer(programName, MAX_PATH), MAX_PATH ) == 0) - { - wxLogLastError(_T("GetModuleFileName")); - } - args.Insert(programName, 0); + // WinCE doesn't insert the program itself, so do it ourselves. + args.Insert(wxGetFullModuleName(), 0); #endif int argc = args.GetCount();