[lazarus] TWin32Object.SetLimitText()

Andreas Hausladen Andreas.Hausladen at gmx.de
Sat Nov 15 11:46:47 EST 2003


In the method TWin32Object.SetLimitText() I found the following code:

var Cls: PChar;
begin
  GetClassInfo(Window, @Cls, 5);
  Str := LowerCase(String(PChar(@Cls)));
end;

Wouldn't that raise an AV?

My Delphi code looks like this:

  SetLength(Str, 1024);
  GetClassName(SysInit.Hinstance, PChar(Str), 5);
  SetLength(Str, StrLen(PChar(Str)));
  Str := LowerCase(Str);



Andreas






More information about the Lazarus mailing list