开发者

RCDATA: Mixing strings and binary data

开发者 https://www.devze.com 2023-03-01 01:44 出处:网络
The next line added in a .rc will add the 开发者_开发问答file NOTEPAD.EXE to resources as a binary data

The next line added in a .rc will add the 开发者_开发问答file NOTEPAD.EXE to resources as a binary data

0x3333 RCDATA "C:\\WINDOWS\\NOTEPAD.EXE" 

however, using code below a string with value "C:\WINDOWS\NOTEPAD.EXE" will be added as resource

0x3333 RCDATA
BEGIN
  "Hello world"
  "C:\\WINDOWS\\NOTEPAD.EXE"
  0x9999  ;hex number stored as a word
END

How can I add a string and a binary data under the same resname (0x3333) ?

Documentation makes no reference to files as binary data.


The second syntax does not support external files like the first syntax does. String literals are stored as-is, as you have noticed.

0

精彩评论

暂无评论...
验证码 换一张
取 消