Hardware/Ring0.cs
changeset 361 0a386ef7d5bb
parent 344 3145aadca3d2
child 364 25ef2c489ce8
     1.1 --- a/Hardware/Ring0.cs	Wed Jul 11 17:35:30 2012 +0000
     1.2 +++ b/Hardware/Ring0.cs	Wed Jul 11 22:28:39 2012 +0000
     1.3 @@ -4,7 +4,7 @@
     1.4    License, v. 2.0. If a copy of the MPL was not distributed with this
     1.5    file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.6   
     1.7 -  Copyright (C) 2010-2011 Michael Möller <mmoeller@openhardwaremonitor.org>
     1.8 +  Copyright (C) 2010-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
     1.9  	
    1.10  */
    1.11  
    1.12 @@ -75,7 +75,8 @@
    1.13  
    1.14      private static bool ExtractDriver(string fileName) {
    1.15        string resourceName = "OpenHardwareMonitor.Hardware." +
    1.16 -        (IntPtr.Size == 4 ? "WinRing0.sys" : "WinRing0x64.sys");
    1.17 +        (OperatingSystem.Is64BitOperatingSystem() ? "WinRing0x64.sys" : 
    1.18 +        "WinRing0.sys");
    1.19  
    1.20        string[] names =
    1.21          Assembly.GetExecutingAssembly().GetManifestResourceNames();