General information
Category:
Database DAO/RDO/ODBC/ADO
>Bruno, voici le call api pour le nom d'usager:
>
>Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
>
>Voici une fonction telle que nous l'utilisons ici:
>
>Public Function DomainUserName() As String
>
> Dim strBuffer As String * 255
> Dim lngBufferLength As Long
> Dim lngRet As Long
> Dim strTemp As String
>
> lngBufferLength = 255
> lngRet = GetUserName(strBuffer, lngBufferLength)
> strTemp = UCase(Trim$(strBuffer))
> DomainUserName = Left$(strTemp, Len(strTemp) - 1)
>
>End Function
bonjour louis
ok pour le username mais pour le computername ! car c'est surtout celui ci qui m'interresse
Merci louis
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only