views:

295

answers:

1

We're working on a device driver for Vista. There's a known bug in SPO (that was fixed in SP1). We have a workaround that only works in SP0 (and destroys the behavior in SP1).

Is there a Windows API or another way to tell what Service Pack version is installed? (Programmatically).

+1  A: 

You probably want the function GetVersionEx, in particular the wServicePackMajor and wServicePackMinor members of the associated OSVERSIONINFOEX structure.

I'm assuming you are doing this internally in your driver and not from a web app or something given the asp.net tag.

Kevin Loney
eek. i don't know how that asp.net tag got in there. Thanks! I looked at this earlier, but I can't believe I missed these fields.
moogs