Windows - Userid sotto Windows & NT




Api # Inserire la seguente dichiarazione In un modulo Bas
Public Declare Function WNetGetUserA Lib "mpr" (ByVal lpName As String _
ByVal lpUserName As String, lpnLenght As Long) As Long
Creare una funzione pubblica da richiamare cosi': MiaStringa = NomeUtente
Function NomeUtente() As String
Dim sUserNameBuff As String * 255
sUserNameBuff = Space(255)
Call WNetGetUserA( vbNullString , sUserNameBuff , 255&)
NomeUtente = Left$( sUserNameBuff , InStr( sUserNameBuff , vbNullChar ) - 1)
End Function











( windowsuseridsottowindows&nt.html )- by Paolo Puglisi - Modifica del 17/12/2023