Guest_imported
New member
- Jan 1, 1970
- 0
Please advise how I could save this Get Name value? I would like to store name value of people using the database but dont know how to get this to work?
[tt]
Private Declare Function apiGetLoginName Lib "advapi32.dll" Alias _
"GetLoginName" (ByVal lpBuffer As String, nSize As Long) As Long
Function FGetName() As String
' Returns the network login name
Dim lngLen As Long, lngX As Long
Dim strUserName As String
strUserName = String$(254, 0)
lngLen = 255
lngX = apiGetLoginName(strUserName, lngLen)
If lngX <> 0 Then
FGetName = Left$(strUserName, lngLen - 1)
Else
FGetName = ""
End If
'here you can add the code to save the value of FGetName into the
table[/tt]
End Function
[tt]
Private Declare Function apiGetLoginName Lib "advapi32.dll" Alias _
"GetLoginName" (ByVal lpBuffer As String, nSize As Long) As Long
Function FGetName() As String
' Returns the network login name
Dim lngLen As Long, lngX As Long
Dim strUserName As String
strUserName = String$(254, 0)
lngLen = 255
lngX = apiGetLoginName(strUserName, lngLen)
If lngX <> 0 Then
FGetName = Left$(strUserName, lngLen - 1)
Else
FGetName = ""
End If
'here you can add the code to save the value of FGetName into the
table[/tt]
End Function