Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-11

TWin32Object.SetLimitText()

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andreas Hausladen

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

Reply by email