• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

Capture , when time changes by the user

Sir

i develop  application that  run on machine for few days.

for this i use Registry functions.

but one more funtionaliy that i can added is that

when user try to change the system time then this Application not run for ever.

pls tell me how i can acheive this.

this task is very important for me.

pls  help me.

i am very thankful to u.
0
Faiz_Ali
Asked:
Faiz_Ali
  • 2
1 Solution
 
AlexFMCommented:
Try to handle WM_TIMECHANGE message.
0
 
Faiz_AliAuthor Commented:
i think i don't only to capture WM_TIMECHANGE message.

because even  my application is closed and user try to change system time .

Application not again run .
0
 
Roshan DavisCommented:
So you are writing a software and need to make that copy as "EVALUATION" for certain days right?

User may change time for several purpose, so changing the time will not run this program is not a solution.

Your program have some evaluation period.

While exiting the program you will write the current time in file/registry (this should store in a path that user cannot find easily).
So next time you will check the current time and the time that is in the file/registry. if the current time is less than or the time exceeds the expire, your program will simply close.

Alternative is, instead of restricting time, limit the no. of time the application that is using.

If your program needs internet connectivity then your option can be easily implemented by checking the server time.

Rosh :)
0
 
Faiz_AliAuthor Commented:
Sorry Sir

i mean i want if user try to change system date after this software can't run on his machine.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now