top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

C: Need to forbid a C program to run until certain date or time during the day?

+2 votes

Let's say I have an exe-file (for example computer game) and need to forbid to run it until certain date or time during the day. Any 'manipulations' with file are allowed.

Could you, please, offer me a simple way of how to encode/decode such a file mostly in C or C++?

posted Dec 29, 2014 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
Just inside main() function add check for time (you can use time()).
Based on your recuriment i.e forbid the program to run or not.

Similar Questions
+2 votes

For an example:
I have a dll file liba.dll,
While compiling i am giving the path of the library file. It is compiling properly.

Now i have to load this binary/.exe file and DLL file to other system/device,
Then what about the DLL file?
How our program gets to know the path of DLL during run time?
I mean how DLL file will be linked?

+2 votes

I have a process in Linux which can have different memory footprint, I want a program or shell script which can print the time of the day when the memory usage is highest for this process.

Can someone help me.