NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

User login from code

Hi All,

 

I have the following question regarding user login. I would like to pass username and login from C# to engine and start it.

I have found some old topics, but links are no longer valid.

 

axApplicationMgr.Start() displays login dialog, but I would like to avoid and do it in the background.

 

Thanks,

Mike

 

 

0 Kudos
Message 1 of 3
(1,148 Views)

The engine calls the LoginLogout sequence of FrontendCallbacks.seq, so looking at the frontend.dll C source code to see how that handles logging in the system user may be helpful to you. I believe as long as you have a valid user in the in the User Manager, you can override this callback, call TS_EngineSetCurrentUser and then bypass the Login dialog in the same manner as how frontend.dll handles the system user.

 

I know it's not C#, but the method should be equivalent.

 

I hope this helps.

 

-Jack

Message 2 of 3
(1,123 Views)

Hi Jack,

 

Many thanks. Found the source code and will play with it.

I will let you know the result.

 

Regards,

Mike

0 Kudos
Message 3 of 3
(1,098 Views)