- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
The following works fine in Windows XP:
bret = CreateProcess(null,"C:\\WQA\\WQA updating\\wqafinder.exe"C,null,null,false,CREATE_NO_WINDOW,null,null,si,pi)
But in Windows 7 it fails. GetLastError() indicates error 193, "%1 is not a valid Win32 application". I am using Intel Visual Fortran Composer XE 2013 with Win32 configuration set for both the program containing the above line, and the target program (wqafinder.exe). Please can someone throw some light on what's wrong?
Many thanks in advance,
Mike
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens when you use a CMD window and type in a command to run the program?
Is wqafinder.exe a program you wrote?
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll bet that wqafinder.exe is a 16-bit program. These will run on XP but not on Windows 7 x64. The problem has nothing at all to do with Intel Fortran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for replies. The program wqafinder is a 32 bit program and it runs well when started from a command window in Windows 7. But Steve's comment gave me clue - the documentation for CreateProcess says the first argument, lpApplicationName, should be null for 16 bit applications (though it doesn't say it should not be null for 32 bit applications). Anyway, I changed the first and second arguments around and it all works well now.
Many thanks
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sometimes when in I am in doubt about the functionality of some Win API function(s) I look at their implementation here I mean mainly input parameters processing.The implementation can be found in ReactOS code source.But I would not relay on their decompilation because it is mainly based on Win 2k/Win XP code.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page