Here I would use NTFS permissions. The messages may not be what you asked for but this is a supported part of NTFS and I'm guessing here that someone didn't know that.
Program in C++ which allows you to access an application only if we are authorized to open the application ?
For example, Let us consider 2 users A and B . A is authorized to access the application(say Notepad)
and B is not authorized to access the application. If A double clicks on Notepad,the application should execute normally . But when B double clicks on Notepad, The application shouldnt enter the Task Manager and it shouldnt execute;Before that a pop-up should appear saying "You are not authorized to use Notepad" . Please help me in solving this problem .I shall be grateful.