how to pass nt password ?
- From: "James" <jkklim@xxxxxxxxxxx>
- Date: Thu, 17 Nov 2005 13:50:11 +0800
I succesfully pass username , domain and password via this function (taken
from MSDN)
Private Declare Auto Function LogonUser Lib "advapi32.dll" (ByVal
lpszUsername As [String], _
ByVal lpszDomain As [String], ByVal lpszPassword As [String], _
ByVal dwLogonType As Integer, ByVal dwLogonProvider As Integer, _
ByRef phToken As IntPtr) As Boolean
Dim returnValue As Boolean = LogonUser(username, domain, pwd,
LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, tokenHandle)
The above assumes that in the application, user will be required to enter
username, domain and password via keyboard
However i do NOT want the application to ASK user for the username,domain
and password. Instead the application shld use the current user context
since users already logon to a operating system eg XP.
i can extract username and domain using the WindowsIdentity.Name Property
which give it as domain\nt id, and then i pass to above function in
username, domain.
How do i extract password ? I know password cannot be seen, but at least
what can i do to pass the current password arguments into the above
function - logonuser ?
.
- Follow-Ups:
- Re: how to pass nt password ?
- From: Mattias Sjögren
- Re: how to pass nt password ?
- From: Micky
- Re: how to pass nt password ?
- Prev by Date: Windows Explorer in VB dot net
- Next by Date: vb and c#
- Previous by thread: Windows Explorer in VB dot net
- Next by thread: Re: how to pass nt password ?
- Index(es):
Relevant Pages
|
Loading