I need to keep users from directly accessing an exe file (call it my.exe). To do so, I am told to embed this file within a new file, which is to be built using C++ (lets call it new.exe). This new file does the following upon execution:
1) reads the IP add of the computer. if the IP does not match 188.8.131.52 then terminates
2) asks the user for username/password
3) connects to a PostgreSQL database to authenticate the user
4) if successful, then it would execute the embedded file my.exe
5) when the user is done with my.exe and terminates it, a window with a text box and a SEND button pops up and asks the user to fill it out
6) the content of the box is sent to the SQL database when SEND is pressed
7) new.exe terminates
I could also ask my questions in the following way:
- how to embed my.exe within new.exe
- how to do step (1)
- how to connect to SQL databases in C++ (I think I need API to do so, right?)
- how to do step (5)
I am very short on time and need to manage the above as soon as possible. By the way, I would consider my level of knowledge of C++ low.
Any help is greatly appreciated. Have a happy new year.