Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to access win32api function LogonUser
Message
From
30/12/1998 07:37:31
 
 
To
30/12/1998 06:24:53
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00170686
Message ID:
00171481
Views:
60
>I run the program on a NT server and logon on to an other NT and domain
>I retrieve the error 1314
>
>1314 A required privilege is not held by the client. ERROR_PRIVILEGE_NOT_HELD
>
>So it is still not working
>I also understand that is only working on a NT and not on a WIN9x machine

This is a permissions error which can be corrected by granting the process requiring this capability the SE_TCB_NAME privilege, or you will get exactly this error, as documented in the MSDN documentation. if they aren't going to logon as the same user on a different domain, the process will also need SE_CHANGE_NAME_NOTIFY.

>
>Are there other ways
>

Establishing a trust relatiohsip between the two domains so that the user has access rights in both domains would allow access without the need for a call that allows specification of another domain membership. You should be able to access resources on the other domain by simply attaching them with WNetAddConnection2(). LogonUser logs the current user out and another in to the current machine; you can force this as a dialog from ExitWindowsEx(), but the user will have to specify user name/domain/password when they log back in, and the program will stop running. This is important, because when you change domains, mapped resources may well stop being available as a result of different access rights on the two user accounts.

>Kind regards
>
>Jan.
>
>
>>>The getlasterror = 120
>>>120 This function is not supported on this system. ERROR_CALL_NOT_IMPLEMENTED
>>
>>This is because LogonUser is not implemented on Win9x. You can use it only on WinNT.
>>
>>>I did not understand the ASCI and UNICODE stuff from (Paul Vlad Tatavu)
>>>I changed the declaration in AS LogonUsera and AS LogonUserw but no result
>>>Checked on win98 machine accessing an NT domain and server
>>
>>VFP will choose automatically between the version ended in A and the function ended in W.
>>
>>Vlad
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform