LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Labwindows VI password

Hi there,

 

I am new in labWindows and I am working on a project that someone else started. After compiling the c_code I have a VI popping up requiring a user name and password. I don't have this info. I went over the C code fund some functions related to the the passwords: SetActiveCtrl (panelPwd, PANEL_PWD_STRING_PASSWORD);PasswordCtrl_GetAttribute (), MessagePopup (), SetActiveCtrl(), int CVICALLBACK Password_Entered (int panel, int control, int event,
  void *callbackData, int eventData1, int eventData2)... but I don't see where the exact info is stored for me to proceed or change the passord. Please your help is needed. my codes have 3269 lines, a bit crowded.

 

Thank you,

agyna

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

Hi agyna,

 

CVI hasn't any internal function to protect code with password like LabVIEW has. What you are seeing is the application in the code of the Password control instrument. Informations like user name and password are either directly stored in the code or saved somewhere on your disk (e.g. on a configuration file or in the registry), in which case a function to retrieve them must be somewhere in the code.

 

You should have in your code a line PasswordCtrl_GetAttribute (..., ..., ATTR_PASSWORD_VAL, StringVariable); which retrieves the password the user has entered on the panel in a string: that string must be compared with the known password to check user input, so you should see after that line what happens to the string variable.

 

Similarly, somewhere in the code the content of username field should be retireved with some GetCtrlVal; again, you must follow the trace of the string where username is stored.

 

These functions are possibly in your Password_Entered callback.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 3
(3,356 Views)

Thanks, I found it. It was stored in a file called ACCOUNT.H

 

Thanks for your help.

 

agyna.

0 Kudos
Message 3 of 3
(3,330 Views)