Guillame,
I have found two fairly simple ways to make a custom Login window with a LabVIEW interface. Both use ActiveX calls to the TestStand API. Of course you must modify the FrontEndCallbacks.seq file to call your new VI instead of using the standard DLL calls. Check to make sure that you have the proper preconditions and Post Actions. Refer to the standard functions for the details.
The simpler way of implementing this in LabVIEW is a call to the TestStand engine to display a dialog box. Pass the sequence context pointer into the VI, extract the Engine reference, and use this to call the DisplayLoginDialog method. Pass empty strings for initialLoginName and initialPassword, and fill in the other inputs.
Take the userObject output, create an ActiveX property, and choose the three outputs FullName, LoginName, and Privileges. Password isn't needed here because the dialog box handles password checking for you. Send these outputs to the TestStand engine by using the TestStand-Set Property Value VI's (in the TestStand palette). For the first two, use the (String) VI. For the Privileges output, which is an Automation Reference of Class, you can use the (Variant) VI. The lookup strings are StationGlobals.TS.CurrentUser.[FullName/LoginName/Privileges]. You can then close the Engine reference and generate the Test Data cluster. I have implemented this VI and verified that it sets all properties as expected.
The more complex and customized method is to create your own LabVIEW interface to set the properties of LoginName, FullName, and Privileges. The basic method is as follows. Collect the user name from a string box. Wait for the user to press the OK button. Use the Engine.GetUser method to get a User reference. Use the User.ValidatePassword method to check to see if this is a valid user name and password. Take the User output to set the values using the TS API as described above. Create the Test Data cluster. In TestStand, make sure the checkbox for Display Front Panel is selected. The context pointer should be passed for either technique.
Obviously this is a rather rough sketch of what must be done. I have included two VI's that illustrate the specifics. login1.vi illustrates the first method. login2.vi illustrates the second method. There is currently no list box for selecting users on login2.vi, so you have to type in the user name.
These VI's could be compiled into an executable or DLL in LabVIEW. Or you could use the LV Runtime to use the VI's directly.
Please ask if you have any further questions. Good luck.
Steven Reasoner
Applications Engineering
National Instruments