Little Registry Cleaner/Common Tools/LittleSoftwareStats/Hardware/WindowsHardware.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Microsoft.Win32;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Management;
namespace LittleSoftwareStats.Hardware
{
internal class WindowsHardware : Hardware
{
#region P/Invoke signatures
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
private class MEMORYSTATUSEX
{
public uint dwLength;
public uint dwMemoryLoad;
public ulong ullTotalPhys;
public ulong ullAvailPhys;
public ulong ullTotalPageFile;
public ulong ullAvailPageFile;
public ulong ullTotalVirtual;
public ulong ullAvailVirtual;
public ulong ullAvailExtendedVirtual;
public MEMORYSTATUSEX()
{
this.dwLength = (uint)Marshal.SizeOf(typeof(MEMORYSTATUSEX));
}
}
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern bool GlobalMemoryStatusEx([In, Out] MEMORYSTATUSEX lpBuffer);
#endregion
readonly string _cpuBrand = "";
public override string CPUBrand
{
get { return this._cpuBrand; }
}
readonly string _cpuName = "";
public override string CPUName
{
get { return this._cpuName; }
}
readonly int _cpuArch;
public override int CPUArchitecture
{
get { return this._cpuArch; }
}
public override int CPUCores
{
get { return Environment.ProcessorCount; }
后面还有 102 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。