In
|
function TPJVersionInfo.GetLanguage: string; |
VerLanguageName is called like this:
if fHaveInfo and
(VerLanguageName(GetLanguageCode, Buf, Pred(cBufSize)) > 0) then
Result := Buf;
However the VerLanguageName docs say that if buffer size is too small, the language name is truncated. Also the number of characters written excludes the terminating null.
In practice the buffer used is probably large enough, but still the code is not best practice.
Maybe try something like example 2 from C++ (Cpp) VerLanguageName Examples - but note that the logic needs tweaking regarding buffer sizes.