Login With The Window Account. Authenticate a user with Windows credentials
Code Example
1 2 | Function Boolean LogonUser ( String lpszUsername, String lpszDomain, String lpszPassword, ULong dwLogonType, ULong dwLogonProvider, Ref ULong phToken) Library "advapi32.dll" Alias For "LogonUserW" Function Boolean CloseHandle (ULong hObject) Library "kernel32.dll" |
Login Click Event
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | Constant ULong LOGON32_LOGON_NETWORK = 3 Constant ULong LOGON32_PROVIDER_DEFAULT = 0 String ls_domain, ls_user, ls_password ULong lul_token Boolean lbl_result //Sets And Gets values ls_domain = "" ls_user = "TEST" ls_password = "TEST" //Error User checking If (IsNull(ls_user) Or ls_user = "") Then MessageBox("Warning", "You must enter a User ID.", StopSign!) sle_user.SetFocus() Return End If //Error Password checking If (IsNull(ls_password) Or ls_password = "") Then MessageBox("Warning", "You must enter a Password.", StopSign!) sle_password.SetFocus() Return End If //Determines is the User ID And Password are valid lbl_result = LogonUser( ls_user, ls_domain, ls_password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, lul_token ) //Valid If (lbl_result) Then //Close Handle of Token CloseHandle(lul_token) MessageBox("Warning", "Login Success") Else CloseHandle(lul_token) //Error Message MessageBox("Warning", "Invalid User ID or Password.", StopSign!) End If |
Find Projects On Github click here
Good Luck!
Howdy just wanted to give you a brief heads up and let you know a few of the images aren’t loading properly. I’m not sure why but I think its a linking issue. I’ve tried it in two different browsers and both show the same outcome.
I checked it working normally. before I had been so well is because your home network. you can use opera and enable vpn to transfer ip to another ip. you can use other ways to change ip. This part by the network and github problem so I do not know I only solved using it only
Appreciate the recommendation. Let me try it out.
Hi there to all, for the reason that I am truly eager of reading this blog’s post to be updated on a regular basis. It contains nice data.
Hello, its nice piece of writing about media print, we all be aware of media is a enormous source of data.
You made some decent points there. I checked on the internet to learn more about the issue and found most people will go along with your
views on this site.
I like the valuable info you provide in your articles.
I will bookmark your weblog and check again here regularly.
I’m quite certain I will learn lots of new stuff right here!
Best of luck for the next!