Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何才能更方便获取某一接口方法的地址呢? #3

Open
mycopy opened this issue May 27, 2020 · 0 comments
Open

如何才能更方便获取某一接口方法的地址呢? #3

mycopy opened this issue May 27, 2020 · 0 comments

Comments

@mycopy
Copy link

mycopy commented May 27, 2020

以下方法为获取某一接口方法的地址,如何修改才能通过传入字符串“SetFileName”来获取IFileDialog.SetFileName的地址呢?期望哪位大神告知,谢谢!cnfw@vip.qq.com
function GetMethodPointer(const IntRef{IFileDialog}: IInterface): Pointer; assembler;
{$IFDEF Win64}
asm
mov rax, [IntRef]
add rax, vmtoffset IFileDialog.SetFileName
mov rax, [rax]
end;
{$ELSE}
asm
mov eax, [IntRef]
add eax, vmtoffset IFileDialog.SetFileName
mov eax, [eax]
end;
{$ENDIF}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant