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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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