How to open a text file only through my application but not others?
-
In my case, I have a file placed on a file server, I can set the permission about the folder/file. How can I let the user can read the file in the application I create but they cannot direct access the file out of my application?
The only way I can see is to encrypt it so only your code can make sense of it.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
In my case, I have a file placed on a file server, I can set the permission about the folder/file. How can I let the user can read the file in the application I create but they cannot direct access the file out of my application?
-
In my case, I have a file placed on a file server, I can set the permission about the folder/file. How can I let the user can read the file in the application I create but they cannot direct access the file out of my application?
You can't do that. If you give a user permission to open that file, they can open it using anything, including Notepad or some file byte editor. You're only solution, like Christian said, is to encrypt the file so it can't be understood by anything other that your application.
Dave Kreskowiak Microsoft MVP - Visual Basic