Apllication Crashs on Windows. Code Error:
-
When I try to start my application on Windows, I get a error message with co error "c0000005"
The same project, application on Linux works very very fine!@
#ifdef Q_OS_WINCE
int WINAPI WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPWSTR /wCmdParam/, int cmdShow)
#else
extern "C"
int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR /cmdParamarg/, int cmdShow)
#endif
{
//Error on this line (Below)
QByteArray cmdParam = QString::fromWCharArray(GetCommandLine()).toLocal8Bit(); //--> HERE IS THE ERROR!#if defined(Q_OS_WINCE)
wchar_t appName[MAX_PATH];
GetModuleFileName(0, appName, MAX_PATH);
cmdParam.prepend(QString(QLatin1String(""%1" ")).arg(QString::fromWCharArray(appName)).toLocal8Bit());
#endif
@Well First of all I don't create this code, is something form Qt!
I'm compiling using the last MinGW, the Qt 4.8.3 on Windows 7 32bits.
I don't know how to solve my problem!!!!