estoy haciendo una aplicacion cliente servidor mediante winsock.
en el server e puesto la funcion para obtener el sistema operativo.
Esta es la funcion q uso
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Private Function winversion() As String
'declaramos la variable osvi de tipo osversioninfo
Dim osvi As OSVERSIONINFO
'asignamos valor al parametro dwOSVersionInfoSize
'de acuerdo a la longitud de nuestra variable osvi de tipo
'osversioninfo
osvi.dwOSVersionInfoSize = Len(osvi)
'le pasamos el parametro a la API
GetVersionEx osvi
'comparamos y le damos valor a winversion
If osvi.dwPlatformId = 1 Then
If osvi.dwMinorVersion = 0 Then winversion = "Windows 95"
If osvi.dwMinorVersion = 10 Then winversion = "Wiondows 98"
ElseIf osvi.dwPlatformId = 2 Then
If osvi.dwMinorVersion = 0 Then
winversion = "Windows 2000"
Else
winversion = "Windows xp"
End If
End If
End Function
Private Sub Command1_Click()
Label1.Caption = "La version es " & winversion
End Sub
lo que quiero es q mande al cliente el sistema operativo q usa
en el server e puesto la funcion para obtener el sistema operativo.
Esta es la funcion q uso
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Private Function winversion() As String
'declaramos la variable osvi de tipo osversioninfo
Dim osvi As OSVERSIONINFO
'asignamos valor al parametro dwOSVersionInfoSize
'de acuerdo a la longitud de nuestra variable osvi de tipo
'osversioninfo
osvi.dwOSVersionInfoSize = Len(osvi)
'le pasamos el parametro a la API
GetVersionEx osvi
'comparamos y le damos valor a winversion
If osvi.dwPlatformId = 1 Then
If osvi.dwMinorVersion = 0 Then winversion = "Windows 95"
If osvi.dwMinorVersion = 10 Then winversion = "Wiondows 98"
ElseIf osvi.dwPlatformId = 2 Then
If osvi.dwMinorVersion = 0 Then
winversion = "Windows 2000"
Else
winversion = "Windows xp"
End If
End If
End Function
Private Sub Command1_Click()
Label1.Caption = "La version es " & winversion
End Sub
lo que quiero es q mande al cliente el sistema operativo q usa