11-13-2008 07:03 AM
Hi,
I am a TestStand newbie. Please bear with me if this question seems very basic.
I am trying to build a C# wrapper around the user management module in TestStand. I have created a new UI that reads all the features of a user like his groupname , privileges etc.
How can I access the NI_UserCustomPrivileges using API's?
I would really appreciate any assistance in this.
Solved! Go to Solution.
11-16-2008 11:09 PM
11-16-2008 11:52 PM
Thank you ga101 for you assistance. I tried to read the privilege using the privilige name and it worked.
One more question please.
In this case I knew the name of the privilege and so was able to query appropriately. The privilegesof all the collections like admin, operator, developer etc. seem static. The contents of the Custom collection are dymanic.
Is it possible to get the name and the datatype of the privilege from the NI_UserCustomPrivileges collection using API's?
Thanks
12-22-2008 11:29 PM
Hi,
The Custom Privileges for a user are just a container. Once you use the TestStand API to retrieve a reference to the User Privileges container, you can iterate over all the Custom Privileges (items in the container) to retrieve references to each individual Privilege and then from that reference, get Name and Type information.
have a look at example below. (TestStand 4.1). You can use the exact same API calls from C to achieve the results.
Regards,
Vaibhav
12-23-2008 05:46 AM
12-23-2008 06:24 AM
sorry. here is the file.