帮助数据保护 [英] Help with data protection

查看:57
本文介绍了帮助数据保护的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,它已经有很长的时间了.请帮我这个小小的头痛.
我正在开发一个WinForm C#应用程序,该应用程序用于启动.chm文件,就像我的意思是单击按钮时启动了一个.chm文件,目前操作很顺利,但是在为该应用程序创建安装程序文件后,我"我想实现某种安全性,以防止启动或复制目标系统上的.chm文件.

请问有人知道该怎么做.

谢谢

Good day guys, its quite a long time. Please help me with this little headache.
I am developing a WinForm C# application which is use to launch a .chm file, like i mean when a button is clicked a .chm file is launched, for now the operation is smooth, but after creating an installer file for the app, I''ll like to implement a kinda security which will prevent the .chm file on the target system from been launched or copied.

Please does any one know how to go about this.

Thanks

推荐答案

在您的应用程序运行时,您可以将其锁定为:
When your application is running you can lock it as :
using (FileStream fs =
         File.Open("MyFilepath", FileMode.Open, FileAccess.Read, FileShare.None))
{
   // use fs
}



如果您希望在应用程序未运行时也拥有永久锁,请执行以下操作:

您可能会想到带有以上代码的Windows服务.



If you would like to have a permanent lock even when your application is not running :

You may think of Windows Service with the above code.


这篇关于帮助数据保护的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆