The MASM Forum
Projects => MASM32 => Topic started by: jj2007 on August 17, 2018, 10:09:12 AM
-
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 (https://docs.microsoft.com/en-us/windows/desktop/menurc/resource-types)
RT_RCDATA
MAKEINTRESOURCE(10)
RCDATA resource (https://docs.microsoft.com/en-us/windows/desktop/menurc/rcdata-resource)
Defines 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.
-
: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.
-
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.
-
Its a bit late, RC.EXE has been a pig for the last 30 years.