第4章网络安全-2安全协议.pptVIP

  • 5
  • 0
  • 约2.41万字
  • 约 106页
  • 2018-01-21 发布于河北
  • 举报
第4章网络安全-2安全协议

* 注册表编程 注册表的句柄可以由调用RegOpenKeyEx()和RegCreateKeyEx()函数得到的,通过函数RegQueryValueEx()可以查询注册表某一项的值 通过函数RegSetValueEx()可以设置注册表某一项的值。RegCreateKeyEx()函数和RegSetValueEx()函数的使用方法如程序proj3_12.cpp所示。 * 操作注册表 #include stdio.h #include windows.h ? main() { HKEY hKey1; DWORD dwDisposition; LONG lRetCode; //创建 lRetCode = RegCreateKeyEx ( HKEY_LOCAL_MACHINE, SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\IniFileMapping\\WebSecurity, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, hKey1, dwDisposition); //如果创建失败,显示出错信息 if (lRetCode != ERROR_SUCCESS){ printf (Error in creating

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档