Hello,
I am writting a program in MFC. I was needing to know how do I make it so the program stops working after 30 days?
Thank You In Advance,
Daniel
Hello,
I am writting a program in MFC. I was needing to know how do I make it so the program stops working after 30 days?
Thank You In Advance,
Daniel
There's no one way to do it.. there are many ways I can think of. How about, create a CTime variable, Call CTime::GetDay and record it in a file in the windows directory or the registry IF the file or key doesn't already exist. If it does exist, call CTime::GetDay and compare it to the value in the file.
Refer to MSDN: http://msdn.microsoft.com/library/de...a3a.GetDay.asp for description and uses of CTime
I've done something like this before. I just learned how to read/write from/to Windows™ registry. I just kept the day information in a registry key.
Website(s): http://www16.brinkster.com/trifaze/
E-mail: [email protected]
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
Registry keys can be read and altered. Use names that seem unconnected with your program, and use just numbers, not obvious date/times. Another popular trick is to store the information in a file and call the file something annoymous.dll and stick it in the Windows directory.
There are ways around most of the simple methods.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.