Posted: Wed Sep 17, 2003 5:52 pm Post subject: Re: EASY ONE
Hi Daniel,
_not_ _a_ _chance_ with the password! No way - ask the user for it.
Jens
> Is there a way to get the username and PASSWORD active in Windows (XP/2000)
> using Visual Basic. I need to pass this values to an FTP site.
>
> Thanks
>
>
Posted: Thu Sep 18, 2003 2:22 pm Post subject: Re: EASY ONE
No chance with the password, here an example of how to get the username
'-------------------------------------------------------------------------
' NT Log on
Private Declare Function GetUserName _
Lib "advapi32.dll" _
Alias "GetUserNameA" _
(ByVal lpBuffer As String, _
nSize As Long) As Long
Public Function NTUserName() As String
Dim UserName As String * 25
Call GetUserName(UserName, 25)
' Trim null char
NTUserName = Trim$(Left(UserName, InStr(UserName, Chr(0)) - 1))
End Function
'-------------------------------------------------------------------------
"Daniel" wrote in message$f1gGJfDHA.3616@TK2MSFTNGP11.phx.gbl...
> Is there a way to get the username and PASSWORD active in Windows
(XP/2000)
> using Visual Basic. I need to pass this values to an FTP site.
>
> Thanks
>
>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum