News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Resource.h: where is RCDATA?

Started by jj2007, August 17, 2018, 10:09:12 AM

Previous topic - Next topic

jj2007

Unfortunately, this builds just fine, without errors:
#include "resource.h"
99 RT_RUBBISH "somefile.gif"


But it doesn't run as expected: It needs, precisely, RCDATA (and not RT_RCDATA or RC_DATA).

The problem here is that the resource compiler does not complain about wrong spellings; which leads to unnecessary bug chasing sessions :(

The only references to that family of constants in resource.h are these:

#define VS_FILE_INFO RT_VERSION
#define RT_MANIFEST 24


Are the other ones defined somewhere else, or are they built into the resource compiler?

Btw our friends in Richmond have these to offer:

Resource Types
QuoteRT_RCDATA
MAKEINTRESOURCE(10)

RCDATA resource
QuoteDefines a raw data resource for an application. Raw data resources permit the inclusion of binary data directly in the executable file.

syntax
nameID RCDATA  [optional-statements] {raw-data  ...}

Perfect, isn't it? Both build fine, but 99 RCDATA "somefile.gif" and 99 10 "somefile.gif" work, RT_RCDATA fails.

hutch--

 :biggrin:

RC.EXE is also a friendly PIG, get it wrong and it dumps garbage in your directory. Solution is to get it right. RC.EXE does not hold your hot little hand either.

jj2007

Hutch,

Don't worry, you don't have to hold my hot little hand, I'm a grown-up. I am just flagging a potential source of wasting our members' precious time due to
a) rc.exe not throwing errors where it should and
b) ambiguous or plainly wrong MSDN documentation.

hutch--

Its a bit late, RC.EXE has been a pig for the last 30 years.