I want to change the value returned dwBuildNumber - it always returns zero,
eventhough the value is assigned CE_BUILD_VER which is 54 in
WINCE500\Public\Common\SDK\INC\bldver.h I have also assigned it a value of
124 in the function GetVersionEx in the file
WINCE500\PRIVATE\WINCE0S\COREOS\CORE\DLL\apis.c.
I then do a build and sysgen in platform builder. I have Clean before build
enabled
None of these changes show up when I run a little app i wrote
the major and minor version show up ok but the buildNumber is always 0
sample code used.

What am I doing wrong?

OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&OsVersionInfo);
wsprintf(sz, TEXT("OS Maj=%d Min=%d Id=%d build=%d\r\n"),
OsVersionInfo.dwMajorVersion,
OsVersionInfo.dwMinorVersion, OsVersionInfo.dwBuildNumber);
statusMessage(sz);

Re: GetVersionEx - dwBuildNumber how to change by Luca

Luca
Thu Apr 24 03:53:15 PDT 2008

The PRIVATE code you have modified is not rebuilt when you use build,
sysgen, etc. This is why your changes
do not show up. Anyway, generally speaking, it is not a good idea to modify
private code: if you want to change
the build number because you need to track/identify your images/devices you
can implement an IOCTL_HAL_GET_DEVICE_INFO handler
in your OAL

--

Luca Calligaris
www.eurotech.it

"Mark" <Mark@discussions.microsoft.com> ha scritto nel messaggio
news:772DCB23-E425-4B00-BC8F-45246F5FD657@microsoft.com...
>I want to change the value returned dwBuildNumber - it always returns zero,
> eventhough the value is assigned CE_BUILD_VER which is 54 in
> WINCE500\Public\Common\SDK\INC\bldver.h I have also assigned it a value
> of
> 124 in the function GetVersionEx in the file
> WINCE500\PRIVATE\WINCE0S\COREOS\CORE\DLL\apis.c.
> I then do a build and sysgen in platform builder. I have Clean before
> build
> enabled
> None of these changes show up when I run a little app i wrote
> the major and minor version show up ok but the buildNumber is always 0
> sample code used.
>
> What am I doing wrong?
>
> OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
> GetVersionEx(&OsVersionInfo);
> wsprintf(sz, TEXT("OS Maj=%d Min=%d Id=%d build=%d\r\n"),
> OsVersionInfo.dwMajorVersion,
> OsVersionInfo.dwMinorVersion, OsVersionInfo.dwBuildNumber);
> statusMessage(sz);



Re: GetVersionEx - dwBuildNumber how to change by Mark

Mark
Thu Apr 24 10:31:03 PDT 2008

Maybe I misunderstand, I look at IOCTL_HAL_GET_DEVICE_INFO
it has SPI_GETPLATFORMVERSION but it returns CE_MAJOR_VER and CE_MINOR_VER.
I do not see anything with a build number or are you suggesting that I should
return in a string in SPI_GETOEMINFO - if so how would a user get this
information?

"Luca Calligaris" wrote:

> The PRIVATE code you have modified is not rebuilt when you use build,
> sysgen, etc. This is why your changes
> do not show up. Anyway, generally speaking, it is not a good idea to modify
> private code: if you want to change
> the build number because you need to track/identify your images/devices you
> can implement an IOCTL_HAL_GET_DEVICE_INFO handler
> in your OAL
>
> --
>
> Luca Calligaris
> www.eurotech.it
>
> "Mark" <Mark@discussions.microsoft.com> ha scritto nel messaggio
> news:772DCB23-E425-4B00-BC8F-45246F5FD657@microsoft.com...
> >I want to change the value returned dwBuildNumber - it always returns zero,
> > eventhough the value is assigned CE_BUILD_VER which is 54 in
> > WINCE500\Public\Common\SDK\INC\bldver.h I have also assigned it a value
> > of
> > 124 in the function GetVersionEx in the file
> > WINCE500\PRIVATE\WINCE0S\COREOS\CORE\DLL\apis.c.
> > I then do a build and sysgen in platform builder. I have Clean before
> > build
> > enabled
> > None of these changes show up when I run a little app i wrote
> > the major and minor version show up ok but the buildNumber is always 0
> > sample code used.
> >
> > What am I doing wrong?
> >
> > OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
> > GetVersionEx(&OsVersionInfo);
> > wsprintf(sz, TEXT("OS Maj=%d Min=%d Id=%d build=%d\r\n"),
> > OsVersionInfo.dwMajorVersion,
> > OsVersionInfo.dwMinorVersion, OsVersionInfo.dwBuildNumber);
> > statusMessage(sz);
>
>
>

Re: GetVersionEx - dwBuildNumber how to change by cis

cis
Tue Apr 29 08:45:53 PDT 2008

On 24 Apr., 05:34, Mark <M...@discussions.microsoft.com> wrote:
> I want to change the value returneddwBuildNumber- it always returns zero,

GetVersionEx() is defined in apis.c wich is prebuild by Microsoft. So
changing CE_BUILD_VER does not change this behaviour without
rebuilding apis.c (which is both prohibited by Microsoft).

Only Microsoft knows which version CE_BUILD_VER had when apic.c was
build. So currently we have to accept build version 0 or violate the
EULA :-(

Chris

Re: GetVersionEx - dwBuildNumber how to change by Steve

Steve
Tue Apr 29 16:46:50 PDT 2008

<cis@internal.de> wrote in message
news:6f5e7145-0ae4-48e5-a3bd-af2c27da18c6@m45g2000hsb.googlegroups.com...
> On 24 Apr., 05:34, Mark <M...@discussions.microsoft.com> wrote:
>> I want to change the value returneddwBuildNumber- it always returns zero,
>
> GetVersionEx() is defined in apis.c wich is prebuild by Microsoft. So
> changing CE_BUILD_VER does not change this behaviour without
> rebuilding apis.c (which is both prohibited by Microsoft).
>
> Only Microsoft knows which version CE_BUILD_VER had when apic.c was
> build.

Correct the version information provided by that API is for the core OS
itself and thus owned by Microsoft. It would be disastrous to applications
developers if every OEM changed that. You can however provide your own APIs
to fetch version numbers related to your specific device.


--
Steve Maillet
Program Manager - .NET Micro Framework
http://blogs.msdn.com/smaillet



Re: GetVersionEx - dwBuildNumber how to change by Paul

Paul
Wed Apr 30 09:47:31 PDT 2008

As Steve says!

Here's a previous thread that discusses what I do. It's not an API, but
it's easy for the user of your device to find, easy for me to read back and
parse for use in programs that need to know *my* version of the OS, etc. A
search of the old messages in this group will give you tons of other
possibilities...

http://groups.google.com/group/microsoft.public.windowsce.embedded/browse_thread/thread/cf090481a3d59781/7827b4b113384cc9?hl=en&lnk=st&q=#7827b4b113384cc9

Paul T.

"Steve Maillet [MSFT]" <smaillet_at_microsoft_com@nospam.com> wrote in
message news:865275B2-DD33-4B4A-94AD-CEE39B7C1DC5@microsoft.com...
> <cis@internal.de> wrote in message
> news:6f5e7145-0ae4-48e5-a3bd-af2c27da18c6@m45g2000hsb.googlegroups.com...
>> On 24 Apr., 05:34, Mark <M...@discussions.microsoft.com> wrote:
>>> I want to change the value returneddwBuildNumber- it always returns
>>> zero,
>>
>> GetVersionEx() is defined in apis.c wich is prebuild by Microsoft. So
>> changing CE_BUILD_VER does not change this behaviour without
>> rebuilding apis.c (which is both prohibited by Microsoft).
>>
>> Only Microsoft knows which version CE_BUILD_VER had when apic.c was
>> build.
>
> Correct the version information provided by that API is for the core OS
> itself and thus owned by Microsoft. It would be disastrous to applications
> developers if every OEM changed that. You can however provide your own
> APIs to fetch version numbers related to your specific device.
>
>
> --
> Steve Maillet
> Program Manager - .NET Micro Framework
> http://blogs.msdn.com/smaillet
>
>