msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

EASY ONE

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise
Author Message
Daniel



Joined: 04 Oct 2007
Posts: 2

PostPosted: Tue Sep 16, 2003 6:24 pm    Post subject: EASY ONE Reply with quote

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

Archived from group: microsoft>public>vb>enterprise
Back to top
View user's profile Send private message
Jens Neuhalfen



Joined: 04 Oct 2007
Posts: 55

PostPosted: Wed Sep 17, 2003 5:52 pm    Post subject: Re: EASY ONE Reply with quote

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
>
>
Back to top
View user's profile Send private message
Dave



Joined: 04 Oct 2007
Posts: 8

PostPosted: Thu Sep 18, 2003 2:22 pm    Post subject: Re: EASY ONE Reply with quote

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
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group