Home » U++ Library support » U++ Core » Bug?: Command line arguments passing problem (Windows)
Bug?: Command line arguments passing problem (Windows) [message #24770] |
Fri, 29 January 2010 15:10  |
 |
kov_serg
Messages: 42 Registered: August 2008 Location: Russia
|
Member |
|
|
Upp-1824-Win32
When I pass program paths with russian letters (cp1251) program have very strange strings from CommandLine()
Windows passign arguments in cp1251 not utf8. So if I pass arguments from IDE Debug/Run options/programm argumetns. It works.
But when I drag and drop file on my exe. Windows send command line in 1251. So program could not find files.
In CtrlCore/CtrlCore.h function int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR lpCmdLine, int nCmdShow)
has different behaviour for WINCE and !WINCE
...
1735 #ifdef PLATFORM_WIN32
...
1740 #ifdef PLATFORM_WINCE
...
1745 int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR lpCmdLine, int nCmdShow) \
...
1748 UPP::coreCmdLine__() = UPP::SplitCmdLine__(UPP::FromSystemCharset(lpCmdLine)); \
...
1761 #else
...
1763 #define GUI_APP_MAIN \
...
1766 int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nCmdShow) \
...
1769 UPP::coreCmdLine__() = UPP::SplitCmdLine__(lpCmdLine); \
...
Why line 1748 differ from 1769 ?
If I change line 1769 adding FromSystemCharset it works fine in windows.
Is it bug or feature?
|
|
|
Goto Forum:
Current Time: Wed Apr 30 23:33:04 CEST 2025
Total time taken to generate the page: 0.03639 seconds
|