cprogrammer
cprogrammer

Reputation: 5675

RCDATA: Mixing strings and 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.

Upvotes: 1

Views: 691

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 597036

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

Upvotes: 1

Related Questions