zoukankan      html  css  js  c++  java
  • HOWTO:InstallShield如何往注册表中写二进制数据(REGDB_BINARY)

    版权声明: 可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息。

    下面是一个简单的示例代码,实现将二进制数据写入注册表: 

    function OnBegin()
    NUMBER
    nRootKey, nType, nSize;
    STRING szKey,szNumName, svHex[8];
    begin
    nRootKey = HKEY_LOCAL_MACHINE;
    RegDBSetDefaultRoot
    ( nRootKey );


    // Set up parameters for call to RegDBSetKeyValueEx.
    szKey = "SOFTWARE\\Kevin Wan";
    szNumName = "BinaryValue";

    svHex[0] = 0x47;
    svHex[1] = 0x65;
    svHex[2] = 0x6D;
    svHex[3] = 0x53;
    svHex[4] = 0x41;
    svHex[5] = 0x46;
    svHex[6] = 0x45;
    svHex[7] = 0x20;

    nType = REGDB_BINARY;
    nSize = 8;

    // Set a key name and a value associated with it.
    if (RegDBSetKeyValueEx (szKey, szNumName, nType, svHex,
    nSize) < 0) then
    MessageBox
    ("RegDBSetKeyValueEx failed.", SEVERE);
    abort
    ;
    endif
    ;
    end;
  • 相关阅读:
    Zepto结合Swiper的选项卡
    Angular选项卡
    创建简单的node服务器
    封装ajax
    JQuery和html+css实现鼠标点击放烟花
    js实现螺旋纹理特效
    Angular入门
    Angular JS例子 ng-repeat遍历输出
    Angular 基础教程(1)
    PHP数组
  • 原文地址:https://www.cnblogs.com/wanbinghong/p/1822506.html
Copyright © 2011-2022 走看看