var token : THandle; sApp_ReconnectUser_NewOSUser : string; sApp_ReconnectUser_NewOSDomain : string; sApp_ReconnectUser_NewOSPassword : string; begin ... if not LogonUser( pchar( sApp_ReconnectUser_NewOSUser ), pchar( sApp_ReconnectUser_NewOSDomain ), pchar( sApp_ReconnectUser_NewOSPassword ), LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, token ) then RaiseLastOSError; if not ImpersonateLoggedOnUser( token ) then begin ShowMessage( 'Reconnect problem.' ); Application.Terminate; end; ...
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Wednesday, December 20, 2017
DELPHI - How reconnect to another OS user - (AD account)
This example shows how to reconnect to other active directory user (with possibility to change domain).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment