A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Windows 10 » Windows 10 Help Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

strange results in Win10 from CreateProcess due to MajorVersion etc PE headers



 
 
Thread Tools Rate Thread Display Modes
  #1  
Old December 14th 14, 06:41 AM posted to alt.comp.os.windows-10,alt.comp.programming.64bit-windows,comp.os.ms-windows.pre-release,microsoft.public.windows.64bit.general
Dex[_4_]
external usenet poster
 
Posts: 1
Default strange results in Win10 from CreateProcess due to MajorVersion etc PE headers

My host system is Win7-x64 ... I have two small .exe's, a 32bit and a 64bit,
each only ~2kb in size, that do nothing other than call kernel32!ExitProcess
with a specific return code returned to signify successful execution.

I've been testing with various values of Major/MinorOperatingSystemVersion
and Major/MinorSubsystemVersion.

WINDOWS 7-x64 (everything behaving as expected)
-------------

When I run the 64bit version on my Win7-x64 host it successfully executes
(and gives correct return code) for _everything_ -- it seems Win7 ignores
these version settings in the PE header of 64bit executables ???

Anyway when I run the 32bit version on my Win7-x64 host I get "correct"
expected behavior from CreateProcess. That is, if it fails CreateProcess
will return 0, and if it succeeds CreateProcess will return non-zero, and I
will then receive the correct return code every time.


WINDOWS 10-x64 Tech Preview (running inside VMWare 11)
--------------

In regards to the 64bit version it behaves the same as described above on my
Win7-x64 system.

HOWEVER, the 32bit version behaves ... a little odd.

I'll list these as "A.B C.D" where A=MajorOperatingSystemVersion .
B=MinorOperatingSystemVersion C=MajorSubsystemVersion .
D=MinorSubsystemVersion

Note however that it doesn't really seem to matter what the
OperatingSystemVersion values are,
but look what happens when it comes upon "6.3" and "6.4" as SubsystemVersion
values ...

Trying 0.0 6.0 ...OK, CreateProcess=1, GetLastError=0, ReturnCode=Valid
Trying 0.0 6.1 ...OK, CreateProcess=1, GetLastError=0, ReturnCode=Valid
Trying 0.0 6.2 ...OK, CreateProcess=1, GetLastError=0, ReturnCode=Valid
Trying 0.0 6.3 ...FAIL, CreateProcess=1, GetLastError=0, ReturnCode=INVALID
(0xC000007B)
Trying 0.0 6.4 ...FAIL, CreateProcess=1, GetLastError=0, ReturnCode=INVALID
(0xC000007B)
Trying 0.0 6.5 ...FAIL, CreateProcess=0, GetLastError=0, ReturnCode=none
Trying 0.0 6.6 ...FAIL, CreateProcess=0, GetLastError=0, ReturnCode=none

.... !?!?!?!?!???????



--- news://freenews.netfront.net/ - complaints: ---
Ads
  #2  
Old December 14th 14, 09:22 AM posted to alt.comp.os.windows-10,alt.comp.programming.64bit-windows,comp.os.ms-windows.pre-release,microsoft.public.windows.64bit.general
Dex[_5_]
external usenet poster
 
Posts: 4
Default strange results in Win10 from CreateProcess due to MajorVersion etc PE headers

Sorry, I was wrong in regards to x64 possibly ignoring the version values.
Just to clarify, im actually getting the same results from the 64bit exe as
well as the 32bit exe...

ie. it doesnt matter what the Major/MinorOperatingSystemVersion is, but if
the Subsystem is 6.3 or 6.4, regardless of whether its 32 or 64bit, it
returns weirdly... (CreateProcess claims success, yet the return code is the
invalid return code you'd normally get when CreateProcess fails)



--- news://freenews.netfront.net/ - complaints: ---
  #3  
Old December 14th 14, 10:16 AM posted to alt.comp.os.windows-10,alt.comp.programming.64bit-windows,comp.os.ms-windows.pre-release,microsoft.public.windows.64bit.general
Dex[_5_]
external usenet poster
 
Posts: 4
Default strange results in Win10 from CreateProcess due to MajorVersion etc PE headers

Ive uploaded some sample 32 and 64bit exes with the appropriate PE header
values...

10kbs .zip:
https://www.sendspace.com/file/yhbuzp

All the executable does is return 69696969 as an ExitProcess return code.

Under Windows 10 i get the following results:

---


C:\runproc c:\xtest\64\0.0.6.2.exe
CreateProcess = 1. GetExitCodeProcess=1, ReturnCode= 69696969/0x4277DC9

C:\runproc c:\xtest\64\0.0.6.3.exe
CreateProcess = 1. GetExitCodeProcess=1, ReturnCode=-1073741701/0xC000007B

C:\runproc c:\xtest\64\0.0.6.4.exe
CreateProcess = 1. GetExitCodeProcess=1, ReturnCode=-1073741701/0xC000007B

C:\runproc c:\xtest\64\0.0.6.5.exe
CreateProcess = 0 (FAIL)
GetExitCodeProcess=0, ReturnCode= 0/0x0

C:\runproc c:\xtest\64\0.0.6.6.exe
CreateProcess = 0 (FAIL)
GetExitCodeProcess=0, ReturnCode= 0/0x0



--- news://freenews.netfront.net/ - complaints: ---
  #4  
Old December 14th 14, 08:38 PM posted to alt.comp.os.windows-10,alt.comp.programming.64bit-windows,comp.os.ms-windows.pre-release,microsoft.public.windows.64bit.general
Paul
external usenet poster
 
Posts: 18,275
Default strange results in Win10 from CreateProcess due to MajorVersionetc PE headers

Dex wrote:
Ive uploaded some sample 32 and 64bit exes with the appropriate PE header
values...

10kbs .zip:
https://www.sendspace.com/file/yhbuzp

All the executable does is return 69696969 as an ExitProcess return code.

Under Windows 10 i get the following results:

---


C:\runproc c:\xtest\64\0.0.6.2.exe
CreateProcess = 1. GetExitCodeProcess=1, ReturnCode= 69696969/0x4277DC9

C:\runproc c:\xtest\64\0.0.6.3.exe
CreateProcess = 1. GetExitCodeProcess=1, ReturnCode=-1073741701/0xC000007B

C:\runproc c:\xtest\64\0.0.6.4.exe
CreateProcess = 1. GetExitCodeProcess=1, ReturnCode=-1073741701/0xC000007B

C:\runproc c:\xtest\64\0.0.6.5.exe
CreateProcess = 0 (FAIL)
GetExitCodeProcess=0, ReturnCode= 0/0x0

C:\runproc c:\xtest\64\0.0.6.6.exe
CreateProcess = 0 (FAIL)
GetExitCodeProcess=0, ReturnCode= 0/0x0


How about this site ? I've never used it, but someone
else mentioned it.

http://connect.microsoft.com/

Paul
  #5  
Old December 14th 14, 09:40 PM posted to alt.comp.os.windows-10,alt.comp.programming.64bit-windows,comp.os.ms-windows.pre-release,microsoft.public.windows.64bit.general
Dex[_5_]
external usenet poster
 
Posts: 4
Default strange results in Win10 from CreateProcess due to MajorVersion etc PE headers

Thanks for your..... oh, wait.



--- news://freenews.netfront.net/ - complaints: ---
  #6  
Old December 14th 14, 09:48 PM posted to alt.comp.os.windows-10,alt.comp.programming.64bit-windows,comp.os.ms-windows.pre-release,microsoft.public.windows.64bit.general
Dex[_5_]
external usenet poster
 
Posts: 4
Default strange results in Win10 from CreateProcess due to MajorVersion etc PE headers

btw, one of the reasons MS releases pre-production releases is to help find
such gremlins... but ok, I'll zip my lips and wait for the production
release, it'll be better to let customers face the issue first right

Anyway Mr Morgan no need to get your pantyhose in a twist, this
issue/bug/whatever found me, I didn't go looking for it, so you can relax.



--- news://freenews.netfront.net/ - complaints: ---
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 08:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.