At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!
Private Function Identifier(ByVal wmiClass As String, ByVal wmiProperty As String) As String 'Return a hardware identifier Try Dim Result As String = "" Dim mc As New System.Management.ManagementClass(wmiClass) Dim moc As System.Management.ManagementObjectCollection = mc.GetInstances Dim mo As System.Management.ManagementObject For Each mo In moc 'Only get the first one If Result = "" Then Try Result = mo(wmiProperty).ToString Exit For Catch ex As Exception 'Ignore error End Try End If Next mo Return Result Catch ex As Runtime.InteropServices.COMException If ex.ErrorCode = 2147549186 Then '0x80010002 System.Threading.Thread.Sleep(10000) Return Identifier(wmiClass, wmiProperty) End If End Try End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.