本文整理自网络,侵删。
function StrLenWide(const Str: PWideChar): Cardinal;asm {Check the first byte} cmp word ptr [eax], 0 je @ZeroLength {Get the negative of the string start in edx} mov edx, eax neg edx@ScanLoop: mov cx, [eax] add eax, 2 test cx, cx jnz @ScanLoop lea eax, [eax + edx - 2] shr eax, 1 ret@ZeroLength: xor eax, eaxend; 相关阅读 >>
Delphi2010中Delphi class explorer妙用
Delphi实现win10下Delphi 10.3.1 inline hook 调试器法获取寄存器并修改
更多相关阅读请进入《Delphi》频道 >>