RltGetVersionEx vs PsGetVersion

Hello, all:
I want get the os version(2k/ xp sp1/ xp sp2/ etc.) in my driver.
PsGetVersion can use both in 2k and xp, but it can not give me the
enough info(service pack mjor and minor) . RtlGetVersionEx is only
supported in xp and later.
How can I get the os version in my driver which can be work in
both 2k and xp ? thanks

leo

First for XP and later you ought to think about use of RtlVerifyVersionInfo
if you want to be compatible with the application specifications for
certification at some point down the road.

Second, well, since the Rtl*Version* functions are not available on W2K,
hard luck :slight_smile: In your driver use MmGetSystemRoutineAddress to get the address
of the Rtl*Version* function if its available otherwise you are before WXP
and all you can do is call PsGetVersion with reduced information provided.

cheers
lyndon

“leo” wrote in message news:xxxxx@ntdev…
Hello, all:
I want get the os version(2k/ xp sp1/ xp sp2/ etc.) in my driver.
PsGetVersion can use both in 2k and xp, but it can not give me the
enough info(service pack mjor and minor) . RtlGetVersionEx is only
supported in xp and later.
How can I get the os version in my driver which can be work in
both 2k and xp ? thanks

You should also watch out for VER_SET_CONDITION, which calls
VerSetConditionMask, which is also XP and later. VER_SET_CONDITION used
to compact the arguments into one ULONGLONG, but since it calls
VerSetConditionMask now, you can easily use MmGetSystemRoutineAddress
for it as well.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Lyndon J Clarke
Sent: Sunday, May 08, 2005 5:15 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] RltGetVersionEx vs PsGetVersion

leo

First for XP and later you ought to think about use of
RtlVerifyVersionInfo
if you want to be compatible with the application specifications for
certification at some point down the road.

Second, well, since the Rtl*Version* functions are not available on W2K,

hard luck :slight_smile: In your driver use MmGetSystemRoutineAddress to get the
address
of the Rtl*Version* function if its available otherwise you are before
WXP
and all you can do is call PsGetVersion with reduced information
provided.

cheers
lyndon

“leo” wrote in message news:xxxxx@ntdev…
Hello, all:
I want get the os version(2k/ xp sp1/ xp sp2/ etc.) in my driver.
PsGetVersion can use both in 2k and xp, but it can not give me the
enough info(service pack mjor and minor) . RtlGetVersionEx is only
supported in xp and later.
How can I get the os version in my driver which can be work in
both 2k and xp ? thanks


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Sadly VerSetConditionMask is not documented … oh dear :wink:

“Doron Holan” wrote in message
news:xxxxx@ntdev…
You should also watch out for VER_SET_CONDITION, which calls
VerSetConditionMask, which is also XP and later. VER_SET_CONDITION used
to compact the arguments into one ULONGLONG, but since it calls
VerSetConditionMask now, you can easily use MmGetSystemRoutineAddress
for it as well.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Lyndon J Clarke
Sent: Sunday, May 08, 2005 5:15 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] RltGetVersionEx vs PsGetVersion

leo

First for XP and later you ought to think about use of
RtlVerifyVersionInfo
if you want to be compatible with the application specifications for
certification at some point down the road.

Second, well, since the RtlVersion functions are not available on W2K,

hard luck :slight_smile: In your driver use MmGetSystemRoutineAddress to get the
address
of the RtlVersion function if its available otherwise you are before
WXP
and all you can do is call PsGetVersion with reduced information
provided.

cheers
lyndon

“leo” wrote in message news:xxxxx@ntdev…
Hello, all:
I want get the os version(2k/ xp sp1/ xp sp2/ etc.) in my driver.
PsGetVersion can use both in 2k and xp, but it can not give me the
enough info(service pack mjor and minor) . RtlGetVersionEx is only
supported in xp and later.
How can I get the os version in my driver which can be work in
both 2k and xp ? thanks


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Both VER_SET_CONDITION and VerSetConditionMask are documented for UM and
the docs apply to KM as well in terms of functionality (obviously
exported from different binaries though).

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Lyndon J Clarke
Sent: Sunday, May 08, 2005 9:58 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] RltGetVersionEx vs PsGetVersion

Sadly VerSetConditionMask is not documented … oh dear :wink:

“Doron Holan” wrote in message
news:xxxxx@ntdev…
You should also watch out for VER_SET_CONDITION, which calls
VerSetConditionMask, which is also XP and later. VER_SET_CONDITION used
to compact the arguments into one ULONGLONG, but since it calls
VerSetConditionMask now, you can easily use MmGetSystemRoutineAddress
for it as well.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Lyndon J Clarke
Sent: Sunday, May 08, 2005 5:15 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] RltGetVersionEx vs PsGetVersion

leo

First for XP and later you ought to think about use of
RtlVerifyVersionInfo
if you want to be compatible with the application specifications for
certification at some point down the road.

Second, well, since the RtlVersion functions are not available on W2K,

hard luck :slight_smile: In your driver use MmGetSystemRoutineAddress to get the
address
of the RtlVersion function if its available otherwise you are before
WXP
and all you can do is call PsGetVersion with reduced information
provided.

cheers
lyndon

“leo” wrote in message news:xxxxx@ntdev…
Hello, all:
I want get the os version(2k/ xp sp1/ xp sp2/ etc.) in my driver.
PsGetVersion can use both in 2k and xp, but it can not give me the
enough info(service pack mjor and minor) . RtlGetVersionEx is only
supported in xp and later.
How can I get the os version in my driver which can be work in
both 2k and xp ? thanks


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thanks very much for the perfect resolution.

On 5/9/05, Doron Holan wrote:
> Both VER_SET_CONDITION and VerSetConditionMask are documented for UM and
> the docs apply to KM as well in terms of functionality (obviously
> exported from different binaries though).
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Lyndon J Clarke
> Sent: Sunday, May 08, 2005 9:58 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] RltGetVersionEx vs PsGetVersion
>
> Sadly VerSetConditionMask is not documented … oh dear :wink:
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev…
> You should also watch out for VER_SET_CONDITION, which calls
> VerSetConditionMask, which is also XP and later. VER_SET_CONDITION used
> to compact the arguments into one ULONGLONG, but since it calls
> VerSetConditionMask now, you can easily use MmGetSystemRoutineAddress
> for it as well.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Lyndon J Clarke
> Sent: Sunday, May 08, 2005 5:15 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] RltGetVersionEx vs PsGetVersion
>
> leo
>
> First for XP and later you ought to think about use of
> RtlVerifyVersionInfo
> if you want to be compatible with the application specifications for
> certification at some point down the road.
>
> Second, well, since the RtlVersion functions are not available on W2K,
>
> hard luck :slight_smile: In your driver use MmGetSystemRoutineAddress to get the
> address
> of the RtlVersion function if its available otherwise you are before
> WXP
> and all you can do is call PsGetVersion with reduced information
> provided.
>
> cheers
> lyndon
>
> “leo” wrote in message news:xxxxx@ntdev…
> Hello, all:
> I want get the os version(2k/ xp sp1/ xp sp2/ etc.) in my driver.
> PsGetVersion can use both in 2k and xp, but it can not give me the
> enough info(service pack mjor and minor) . RtlGetVersionEx is only
> supported in xp and later.
> How can I get the os version in my driver which can be work in
> both 2k and xp ? thanks
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

If I remember, PsGetVersion returns a pointer to the Service
Pack banner string, from which you can easily retrieve the
Service Pack number. I coded something like this in the
BoundsChecker driver way back when, but I don’t remember the
details any longer.

Alberto.

----- Original Message -----
From: “leo”
To: “Windows System Software Devs Interest List”

Sent: Monday, May 09, 2005 3:08 AM
Subject: Re: [ntdev] RltGetVersionEx vs PsGetVersion

Thanks very much for the perfect resolution.

On 5/9/05, Doron Holan wrote:
> Both VER_SET_CONDITION and VerSetConditionMask are documented
> for UM and
> the docs apply to KM as well in terms of functionality
> (obviously
> exported from different binaries though).
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Lyndon
> J Clarke
> Sent: Sunday, May 08, 2005 9:58 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] RltGetVersionEx vs PsGetVersion
>
> Sadly VerSetConditionMask is not documented … oh dear :wink:
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev…
> You should also watch out for VER_SET_CONDITION, which calls
> VerSetConditionMask, which is also XP and later.
> VER_SET_CONDITION used
> to compact the arguments into one ULONGLONG, but since it
> calls
> VerSetConditionMask now, you can easily use
> MmGetSystemRoutineAddress
> for it as well.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Lyndon
> J Clarke
> Sent: Sunday, May 08, 2005 5:15 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] RltGetVersionEx vs PsGetVersion
>
> leo
>
> First for XP and later you ought to think about use of
> RtlVerifyVersionInfo
> if you want to be compatible with the application
> specifications for
> certification at some point down the road.
>
> Second, well, since the RtlVersion functions are not
> available on W2K,
>
> hard luck :slight_smile: In your driver use MmGetSystemRoutineAddress to
> get the
> address
> of the RtlVersion function if its available otherwise you
> are before
> WXP
> and all you can do is call PsGetVersion with reduced
> information
> provided.
>
> cheers
> lyndon
>
> “leo” wrote in message news:xxxxx@ntdev…
> Hello, all:
> I want get the os version(2k/ xp sp1/ xp sp2/ etc.) in my
> driver.
> PsGetVersion can use both in 2k and xp, but it can not give me
> the
> enough info(service pack mjor and minor) . RtlGetVersionEx is
> only
> supported in xp and later.
> How can I get the os version in my driver which can be work
> in
> both 2k and xp ? thanks
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to
xxxxx@lists.osr.com