smeezekitty Posted October 29, 2014 Posted October 29, 2014 I tried a Windows XP only program on Windows 2000 and got "Not a valid Win32 Application" Now I fully expected to get DLL errors but I was surprised by that message. In fact I even re-downloadedit because I thought it may have gotten corrupted but the result was the same. Did something change in Windows EXEs that make them show that message?
dencorso Posted October 30, 2014 Posted October 30, 2014 This info applies to running 9x/ME in 2k/XP, so it's probably not related.As you can see, "Not a valid Win32 Application", may not actually mean literally that.I doubt you error is caused by the same issues described in the link I jus gave you.But, at the moment, it's the best I can offer. HTH
Tommy Posted October 30, 2014 Posted October 30, 2014 Blackwingcat could possibly answer this as that was the firstish thing he found a way around when he created his Kernel Extension (v2) for Windows 2000, and that was to stop the Win32 errors from happening.
MagicAndre1981 Posted October 30, 2014 Posted October 30, 2014 this happens when an application is compiled to be used at least under XP (_WIN32_WINNT is defined as 0x0501): Setting WINVER or _WIN32_WINNTYou can define these symbols by using the #define statement in each source file, or by specifying the /D compiler option supported by Visual C++.For example, to set WINVER in your source file, use the following statement:#define WINVER 0x0502To set _WIN32_WINNT in your source file, use the following statement:#define _WIN32_WINNT 0x0502To set _WIN32_WINNT using the /D compiler option, use the following command:cl -c /D_WIN32_WINNT=0x0502 source.cpp http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx
smeezekitty Posted October 30, 2014 Author Posted October 30, 2014 Blackwingcat could possibly answer this as that was the firstish thing he found a way around when he created his Kernel Extension (v2) for Windows 2000, and that was to stop the Win32 errors from happening.Ok Maybe He will stop by? this happens when an application is compiled to be used at least under XP (_WIN32_WINNT is defined as 0x0501):But what is changed in the executable that throws that message? And can it be changed with a hex editor maybe?
blackwingcat Posted October 31, 2014 Posted October 31, 2014 Hi. I showed the technical report about it (in Japanese)http://blog.livedoor.jp/blackwingcat/archives/1298206.html It also related with "version" option and "osversion" one in link.exe (Visual Studio Linker).
dencorso Posted October 31, 2014 Posted October 31, 2014 This batch can set those values to 5.0 for you, provided you have the linker from MSVS 6 (I used v. 6.0.8447.0, from MSVC6 SP3).. @echo offif %1sz==sz goto erroucopy %1 %1_oriren *.*_ori *.oriLINK /EDIT %1 /SUBSYSTEM:WINDOWS,5.00 /OSVERSION:5.00 /VERSION:5.00goto finis:errouecho usage: 44460 filename.extecho.:finisOf course, there'll be many possible improvements to the above batch.
dencorso Posted November 1, 2014 Posted November 1, 2014 But... but... but... doesn't ImportPatcher apply just for 9x/ME? Would it work also for 2k?Would you perhaps elaborate some more, please?
jumper Posted November 2, 2014 Posted November 2, 2014 ImportPatcher is built using VC5 so should run on Win95+ and NT4+, maybe even win32s and NT3.5. It will check (and can correct) the OS subversion (target platform) of any PE32 file. IP37 and IP38 will auto-target to the current (reported) OS version.Polish Jack1024's PEInfo.exe 0.9.1.1 (d7p) is also very good for editing PE32 header values.
smeezekitty Posted November 2, 2014 Author Posted November 2, 2014 Polish Jack1024's PEInfo.exe 0.9.1.1 (d7p) is also very good for editing PE32 header values. PEinfo.exe did the trick! I changed Minor version number of required OS and Minor version number of subsystem from 1 to 0
blackwingcat Posted November 4, 2014 Posted November 4, 2014 Hi. http://blog.livedoor.jp/blackwingcat/archives/1452362.htmlI released before VC++2005 for Windows 95 Library.You should patch PE Header for Windows 4.x after you compile and link. Polish Jack1024's PEInfo.exe 0.9.1.1 (d7p) is also very good for editing PE32 header values.PEinfo.exe did the trick! I changed Minor version number of required OSand Minor version number of subsystem from 1 to 0
j7n Posted November 5, 2014 Posted November 5, 2014 Windows 98 actually provided a second more informative message in such a case: EXE expects a never version of Windows. Upgrade your Windows version. It is not often that 9x does something better than NT. I've previously used Stud_PE to adjust this header. 1
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now