
30/10/2003, 18:46
|
 | | | Fecha de Ingreso: mayo-2002 Ubicación: Lima, Peru
Mensajes: 4.619
Antigüedad: 22 años, 9 meses Puntos: 7 | |
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Function GetMachine() As String
Dim lTamanio As Long
Dim sBuffer As String
sBuffer = Space(15& + 1)
lTamanio = Len(sBuffer)
GetMachine = ""
If GetComputerName(sBuffer, lTamanio) Then GetMachine = Left(sBuffer, lTamanio)
End Function
Public Function GetNameUser() As String
Dim lTamanio As Long
Dim sBuffer As String
sBuffer = Space(15& + 1)
lTamanio = Len(sBuffer)
GetNameUser = ""
If GetUserName(sBuffer, lTamanio) Then GetNameUser = Left(sBuffer, lTamanio)
End Function
__________________ No tengo firma ahora... :( |