One of the requirements for our exported media files is that they must have the option to be exported purely as a portable executable file.
In order for certain things to be packed into the executable file, I wanted to add resources to the .exe using kernel32's UpdateResource() function.
The process is simple:
handle := BeginUpdateResource(pchar(fileName), false);
UpdateResource(handle,
RT_RCData,
pchar(key),
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
data,
size);
EndUpdateResource(handle, false);
The file I was adding resources to changed in size, so I thought it worked, however the code I was using to load the resource kept on failing.
After much of debugging, I finally realized that for some reason FindResource() doesn't work for resources that contain lower case letters. Odd since its also a kernel32 call...
-John Su



Comments