LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i count the number of launches...?-need a help

Hi..!
I built an application in CVI. If the my login module of the application fails, then i have to restart my application using launchexecutable. But the login is allowed to attempt only three times.After the thrird attempt i want to display other error message. For that how can i count the number of launches of my application..? Any ideas..?

In the following example you can enter the password 124.
How can i count the number of launches for three time..?
How can i increment the result based on launches..?

Thanx in advance,
Venki.
0 Kudos
Message 1 of 4
(3,067 Views)

Hi Venky, you could save a counter in a physical file or in the registry and read it at program start, resetting its value in case of good password entered.

I modified your project this way using the registry: take a look at it and see if it can fulfil your needs.

Note: I modified also the way you are re-running the program so that there is alway no more than one instance of the program running at a time.

Roberto

Message Edited by Roberto Bozzolo on 01-18-2006 10:03 AM



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 4
(3,059 Views)
Hi people!

   as usual, Roberto's solution seems good and clean!  But I would suggest to protect your password with some cryptographic algorithm, because Windows registry keys are quite easily accessible.  Tou can encrypt the key in your .c file.

 
  Of course, this depends upon th security level you need for your application.

   Bye!

graziano
Message 3 of 4
(3,051 Views)
Many thanx...It helps a lot...
0 Kudos
Message 4 of 4
(3,035 Views)