Page 1 of 1

How to get WCE OS version without GetVersionEx function?

PostPosted: Mar 15, 2006 @ 9:29pm
by Broken Sword

PostPosted: Mar 16, 2006 @ 12:22am
by fast_rx

PostPosted: Mar 20, 2006 @ 11:12am
by Broken Sword

PostPosted: Mar 21, 2006 @ 2:27am
by mamaich
You can check the version of coredll.dll in its PE-header in ROM (e32_rom.e32_subsysmajor and e32_subsysminor). It is 5.0 for WM5, 4.21 for WM2003SE, 4.20 for 2003 first edition. I have not checked older OSes.
But module structure has changed in WM5 and e32 field is 4 bytes shifted. For some hell MS added "calledfunc" field in its middle. Good programmers never do such things.
It is easy to determine whether you need to shift or not. For example by checking "baseptr", or "startip" field positions, if it is shifted - you have WM5. Or you can use any other heuristic.
The other method is checking for presence of some functions in coredll. For example "GetDllVersion" appeared in 5.0.

PostPosted: Mar 21, 2006 @ 11:12am
by Broken Sword

PostPosted: Mar 23, 2006 @ 1:07am
by Broken Sword