using System.Security.Cryptography;pregkey = Registry.CurrentUser.OpenSubKey("Software\\wmaple_mail", true); if (pregkey == null)
{
RegistryKey pregkey1 = Registry.CurrentUser.CreateSubKey("Software\\wmaple_mail");
}我在程序中用到了注册表存值功能,在我本机测试倒是没有问题,可以用到别的机子上就不行了,别的机子上.net框架没问题,只要我把这块注册表的程序删掉就可以打开,
没有删掉,xp是关闭,03就没有反应,很奇怪,
{
RegistryKey pregkey1 = Registry.CurrentUser.CreateSubKey("Software\\wmaple_mail");
}我在程序中用到了注册表存值功能,在我本机测试倒是没有问题,可以用到别的机子上就不行了,别的机子上.net框架没问题,只要我把这块注册表的程序删掉就可以打开,
没有删掉,xp是关闭,03就没有反应,很奇怪,
解决方案 »
- 求一简单正则 16:00-16:25 匹配。
- 怎么把选定的Execle文档指定的列传到数据库
- short转换为字符串
- 求c#编程密码修改SQL数据库中数据密码
- [求助]实现股票的K线图
- 在C#中DataGridView的控件如何实现字典列的翻译
- 寻求帮助:c#的remoting里,CallContext.GetData获得的对象老是空的?
- vs.2003中开的水晶报表
- 在一个Console程序中,如何得到程序自身的名称,程序的所在目录?
- 关于角色三连击
- 关于net send的简单问题
- 用Graphics和Bitmap画的图,用bmp.Save("d:\\1.bmp")保存的图像正常显示,而加上图像格式参数后保存的图像是漆黑背景中间一个1cm平方大小的红斑,看不到图。如:
{
RegistryKey pregkey1 = Registry.CurrentUser.CreateSubKey("Software\\wmaple_mail");
} 加一个Close试试。
if (pregkey == null)
{
RegistryKey pregkey1 = Registry.CurrentUser.CreateSubKey("Software\\wmaple_mail");
pregkey1.Close();
}
if (pregkey == null)
{
RegistryKey pregkey1 = Registry.CurrentUser.CreateSubKey("Software\\wmaple_mail");
pregkey1.Close();
}
不起作用
[assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum,
ViewAndModify = "HKEY_CURRENT_USER")]
怎么得到他的异常中,提示什么地方出错了
{
pregkey = Registry.CurrentUser.OpenSubKey("Software\\wmaple_mail");
if (pregkey == null)
{
return false;
}
return true;
}
catch
{
return false;
}
或通过throw抛出异常