Safest way to get processor ID or some hardware info

前端 未结 2 517
误落风尘
误落风尘 2020-12-09 23:40

I need to get any info to identify a machine and what I was using so far was the following:

    internal static string GetProcessorId()
    {
        try
            


        
2条回答
  •  萌比男神i
    2020-12-10 00:24

    For a small tool I wrote (Windows Forms .NET 2.0), I needed something similar.

    I wrote a helper class that simply uses some common information like HDD serial number through PInvoke of the GetVolumeInformation function.

    This is by no way really safe or bullet-proof, but accurate enough to fit my needs.

    (If you are interested this is the tool, if I'm allowed to link to)

提交回复
热议问题