home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
net_id
/
netid.bas
next >
Wrap
BASIC Source File
|
1993-12-06
|
623b
|
23 lines
Declare Function WNetGetUser Lib "USER.EXE" (ByVal szUser$,
lpnBufferSize%) As
Integer
Function netuser () As String
Dim User As String * 255
Dim BufSize As Integer
Dim status As Integer
netuser = "Not Logged In"
On Error Resume Next
Err = 0
BufSize = 255
status = WNetGetUser(User, BufSize)
If Err = 0 And status = 0 Then
netuser = Left$(User, InStr(User, Chr(0)) - 1)
End If End Function
Joe Healy Sarasota, FL 73750,3634
(Courtesy of a previous tip from Rich Klein 70511,3032)
Rich Klein 70511,3032
(Courtesy of a previous tip from another forum junkie...)