Visual Basic - Detectar tarjeta de red y velocidad procesador

Life is soft - evento anual de software empresarial
 
Vista:

Detectar tarjeta de red y velocidad procesador

Publicado por Juanma Cordero (19 intervenciones) el 27/07/2001 10:22:19
Necesito ayuda cuanto antes y a ver si me podeis ayudar.He leido aqui informes sobre la velocidad del micro pero no lo dan especifico para windows 9x, sino para winNT.¿sabeis alguna api o funcion para detectar la velocidad? y necesito otra para detectar la red.Mucha gracias, espero vuestras respuestas
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Espero te sirva

Publicado por Juan Jose (16 intervenciones) el 06/08/2001 21:54:20
'espero te sirva
Public Const HKEY_LOCAL_MACHINE = &H80000002

Public Function Procesador() As String
On Error GoTo CtroLError
Dim v As String
Dim tipo As String
Dim SInfo As SYSTEM_INFO
v = GetString(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\SYSTEM\CENTRALPROCESSOR\0\", "~MHz")
tipo = GetString(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\SYSTEM\CENTRALPROCESSOR\0\", "Identifier")
vendedor = GetString(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\SYSTEM\CENTRALPROCESSOR\0\", "VendorIdentifier")
Procesador = "PROCESADOR :" & tipo & " - velocidad: " & v & " MHZ - " & vendedor & vbCrLf
Exit Function
CtroLError:
Err.Description
End Function
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Espero te sirva 2

Publicado por Juan Jose (16 intervenciones) el 06/08/2001 21:55:41
Public Function GetString(hKey As Long, strPath As String, strValue As String)
Dim Ret
RegOpenKey hKey, strPath, Ret
GetString = RegQueryStringValue(Ret, strValue)
RegCloseKey Ret
End Function
Public Function RegQueryStringValue(ByVal hKey As Long, ByVal strValueName As String) As String
Dim lResult As Long, lValueType As Long, strBuf As String, lDataBufSize As Long
lResult = RegQueryValueEx(hKey, strValueName, 0, lValueType, ByVal 0, lDataBufSize)
If lResult = 0 Then
If lValueType = REG_SZ Then
strBuf = String(lDataBufSize, Chr$(0))
lResult = RegQueryValueEx(hKey, strValueName, 0, 0, ByVal strBuf, lDataBufSize)
If lResult = 0 Then
RegQueryStringValue = Left$(strBuf, InStr(1, strBuf, Chr$(0)) - 1)
End If
ElseIf lValueType = REG_BINARY Then
Dim strData As Integer
lResult = RegQueryValueEx(hKey, strValueName, 0, 0, strData, lDataBufSize)
If lResult = 0 Then
RegQueryStringValue = strData
End If
End If
End If
End Function
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar