qlibrary - Qt shell32.dll ShellExecuteA strange behavior. How Can I display a file?

I have some code defined as follows:typedef long (*ShellExecFunct)(long, const char*, const char*, long, long, long);void some_funct(){ QLibrary shell32(QString("shell32.dll")); ShellExecFunct viewfile = (ShellExecFunct) shell32.resolve("ShellExecuteA"); if(viewfile) { int res = viewfile(NULL, "open", "c:\\eula.1028.txt", NULL, NULL, 5); }}This code launches the file as I want it to, but blows up immediately. The new window stays open.I have another version like so:typedef long (*ShellExecFunct)(long, const char*, const ch...Read more