Question

I'v been playing with some Delphi assemblies in IDA.

And I noticed a lot of system calls that I do not understand, and was unable finding any documentation about them. For example: I noticed a lot of calls to the the unknown function LStrClr(void *).

The best I could find was this site http://www.delphibasics.co.uk/ByLetter.asp?Letter=A But it lack many function calls, including LStrClr.

Thanks a lot for your reply, Michael Engstler.

Was it helpful?

Solution

LStrClr means Long String Clear. It is used to, well, clear a long string variable. In other words, when you write:

s := '';

then the compiler will generate a call to the runtime support function _LStrClr. In Unicode Delphi it will be _UStrClr where the U signifies UnicodeString as opposed to AnsiString.

There's no official documentation for this because it is all private implementation detail. However, there is the source code for the Delphi RTL. If you refer to that, such calls are simple to understand.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top