zoukankan      html  css  js  c++  java
  • 替换 EXE 程序里的字符

    更换一个 EXE 的字符串表?

    先有这样的字符资源:

    STRINGTABLE
    {
     1, "abcdefghijklmnopqrstuvwxyz"
    }
    

    function ChangeString(const FileName;NewString: string): Boolean;
    var
      hUpdate: Cardinal;
      s:string;
    begin
      Result:= False;
      hUpdate:= BeginUpdateResource('C:\Project1.exe', false);
      if hUpdate = 0 then Exit;
      try
        s:=NewString;
        Result:= UpdateResource(hUpdate, 'String Table','1', 0, @s[1], Length(s));
      finally
        EndUpdateResource(hUpdate, not Result);
      end;
    end;
    

    其中值: 

    RT_ACCELERATOR Accelerator table. 

    RT_ANICURSOR Animated cursor. 

    RT_ANIICON Animated icon. 

    RT_BITMAP Bitmap resource. 

    RT_CURSOR Hardware-dependent cursor resource. 

    RT_DIALOG Dialog box. 

    RT_DLGINCLUDE Allows a resource editing tool to associate a string with an .rc file.

      Typically, the string is the name of the header file that provides symbolic names.

      The resource compiler parses the string but otherwise ignores the value.


    RT_FONT Font resource. RT_FONTDIR Font directory resource. 

    RT_GROUP_CURSOR Hardware-independent cursor resource. 

    RT_GROUP_ICON Hardware-independent icon resource. 

    RT_HTML HTML. RT_ICON Hardware-dependent icon resource. 

    RT_MANIFEST Microsoft® Windows® XP: Side-by-Side Assembly XML Manifest. 

    RT_MENU Menu resource. 

    RT_MESSAGETABLE Message-table entry. 

    RT_PLUGPLAY Plug and Play resource. 

    RT_RCDATA Application-defined resource (raw data). 

    RT_STRING String-table entry. 

    RT_VERSION Version resource. RT_VXD VXD. 

  • 相关阅读:
    USB子系统gadget analyse
    关于嵌入式的学习和职业发展
    编译JNI动态库so
    Linux串口编程
    i2c_get_clientdata和to_i2c_client 的使用获取平台设备
    Kbuild 编译系统分析
    解决QPST 出现的 "服务器正在运行" 的 下载错误.
    Msm 高通平台配置记录之一
    USB Skeleton driver 分析记录
    网站应用数据库相关 过滤类
  • 原文地址:https://www.cnblogs.com/sail2000/p/2060200.html
Copyright © 2011-2022 走看看