Malcolm Nixon - 2005-02-08

Greetings,

I don't know if this is the best place to ask questions like this, but Rational Purify is reporting illegal parameters to ::LoadString in msvc6/testrunner/ResourceLoaders.cpp

The problem is as follows:
1) ::FindResource finds the resource id.
2) ::SizeofResource gets the size (in TCHARs)
3) string.GetBuffer allocates len+2 TCHARs
4) ::LoadString gets (len+1)*2 TCHARs

Microsoft defines the fourth argument of ::LoadString as being a count of TCHARs, not a number of bytes as the author of the code seems to have assumed.

-Malcolm