
The OSVersion property that is provided for obtaining operating system information does not contain a member that provides service pack information. If you want to determine what service pack is installed, you must call the GetVersionEx API function directly. Normally it is better to avoid this practice--the .NET Framework provides access to the underlying API sets in a much more consistent (and easier to use) manner than calling the individual API functions. When it is necessary to call an API function directly, it can be done through the .NET Framework's Interop layer. The code in this article provides a method, GetService..
|