James W. Walker wrote:
> In all the CodeWarrior examples of VERSIONINFO blocks in .rc files, the
> strings end with \0, e.g.,
>
> VALUE "FileVersion", "1.0\0"
Since string literals in RC have no terminator by default, an explicit
terminator would seem to be necessary so that the resource can be
properly parsed.
>
> I don't see anything about this in Microsoft's do***entation on
> VERSIONINFO resources.
This page is coy on the issue:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/tools/versioninfo_resource.asp
But this one, "Designing COM interfaces", does include an example
resource definition that uses \0 terminators:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncomg/html/msdn_design.asp
> Is this a workaround for a bug in CodeWarriors
> .rc compiler, or a workaround for a bug in certain versions of Windows,
> or what?
Probably neither; it just seems to be the (undo***ented) "way it's
done". An unscientific Google search shows the practice to be
ubiquitous (including VS generated RC files) and this is also how I
happen do it in my resource descriptions, which are variously compiled
by MinGW, CW, and occasionally Windows-hosted tools.


|