Why does logonuser return 0 in Windows NT???
Printable View
Why does logonuser return 0 in Windows NT???
is there a user logged on when you call the function?
Zero means the call to Logonuser failed. Check the following demo to make sure your calling it correctly.
Demo of LogonUser
I am entering the correct info, and the code i copied from a sample. but I'll try urs and see. thanx
nope, it doesn't work
So there is no user logged on when you call it?
try this: use getlasterror (an API) and see what it returns, then look it up on MSDN
Hmmmm.....NT logs on fine otherwise......your program has correct permissions to run.....Domain specified ?? Try without to check username(see below link)
Only other sample I can find uses the LastDllError mentioned in previous post.
http://www.vbusers.com/code/codeget....1&NumReplies=3
Above link has 2 functions for checking if username/password valid. Says one is more reliable then other.
hmmm, 0. a very common error :rolleyes:Quote:
Originally posted by mlewis
So there is no user logged on when you call it?
try this: use getlasterror (an API) and see what it returns, then look it up on MSDN
Hmm...
Quote:
Originally posted by Patoooey
Hmmmm.....NT logs on fine otherwise......your program has correct permissions to run.....Domain specified ?? Try without to check username(see below link)
Only other sample I can find uses the LastDllError mentioned in previous post.
http://www.vbusers.com/code/codeget....1&NumReplies=3
Above link has 2 functions for checking if username/password valid. Says one is more reliable then other.
hmm, it seems i do not have rites for logonuser. o well :(
mlewis - Set us up the bomb!
I condog...or is that concur?