Jake,
LogonUser requires that the user initiating the function be able to act as part of the OS. Most users are not allowed to do this (hence the privilege error you are getting).
What are you trying to do with the function? If you want to validate a user with a password, you can look at this message for another alternative.
http://www.levelextreme.com/wconnect/wc.dll?UniversalThread~?2,15,449121HTH.
>>>>I can't seem to get LogonUser to work properly. I am using the following code:
>>>>
>>>>
>>>>DECLARE INTEGER LogonUser in WIN32API ;
>>>> String lcUser,;
>>>> String lcServer,;
>>>> String lcPassword,;
>>>> INTEGER dwLogonType,;
>>>> Integer dwProvider,;
>>>> Integer @dwToken
>>>>
>>>>lnToken = 0
>>>>lnResult = LogonUser(lcUsername,lcDomain,lcPassword,;
>>>> 3,LOGON32_PROVIDER_DEFAULT,@lnToken)
>>>>
>>>>
>>>>I use my username, password and domain from my network NT account yet the result is always 0. I am running Win 2K Pro. Any help would be greatly appreciated.
>>>>
>>>>Jake
>>>
>>>What does GetLastError() return?
>>
>>127 ??
>>
>>Any ideas? According to msdn this means procedure not found.
>>
>>Jake
>
>Er, I played a bit more and now get 1314 over and over.
>
>Jake
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao