Questa funzione consente di conoscere l’identificativo del processore montato sul PC. Per poter eseguire correttamente questa funzione è necessario importare il namespace System.Management
1: Imports System.Management
2:
3: Public Function GetProcessorId() As String
4: Dim strProcessorId As String = String.Empty
5: Dim query As New SelectQuery("Win32_processor")
6: Dim search As New ManagementObjectSearcher(query)
7:
8: For Each info As ManagementObject In search.Get()
9: strProcessorId = info("processorId").ToString()
10: Next
11:
12: Return strProcessorId
13: End Function
Questa funzione può essere modificata per conoscere altre informazioni sulla macchina.