Home > Back-end >  Delphi itself to recompile function for help
Delphi itself to recompile function for help

Time:09-21

How to use their own language to realize the concat in Delphi, pos, copy, setlength, length the effects of several functions?

CodePudding user response:

Why do you want to do?
Or
What is the purpose of you to do so?

CodePudding user response:

These are actually intrinsics, not ordinary functions, you want to achieve can only be done for a specific type, it is unlikely to achieve the same, in addition to concat, in view of the pos string, copy, setlength, length is possible, but not dynamic array,

CodePudding user response:

The several functions of the Source code is in {DELPHI | \ Source \ Rtl \ Sys System. In the pas

System unit is a compiler implementation, so, even if your program Uses them, but still can use the System. Pos () to call a function this way,
That is to say, System. Pas cannot be compiled.

Another more special is SysInit unit, the variable and a pointer, is by the Delphi linker for processing, so whether you Uses it, the inside of the HInstance global variables are available,

These units of the implementation code, only the difference between different versions of the Delphi, changed, you don't have to think about

PS: there's an old virus specifically for Delphi, after System infection, with Delphi compiled exe is poisoned, and the virus code exists in SysInit. Dcu, so in theory you can use the same method, by SysInit. The process of routine in dcu, secretly modify System. Pos a function pointer to the location, modify the internal function of demand,
But seems to work a little slants big ~ ~

CodePudding user response:

These is the original function of Delphi, generally should not be modified,
If you want to modify, you can modify System. Pas source code,

Also can be to write a few similar functionality function,

CodePudding user response:

Yes, this is the original function of Delphi, a direct call line... or a custom function again
  • Related