>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