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

AV when InterceptCreate called inside initialization section #33

Open
Sorien opened this issue Jan 14, 2016 · 3 comments
Open

AV when InterceptCreate called inside initialization section #33

Sorien opened this issue Jan 14, 2016 · 3 comments

Comments

@Sorien
Copy link
Contributor

Sorien commented Jan 14, 2016

initialization
    InterceptCreate(@Dialogs.ShowMessage, @DialogHelper.ShowMessage);

image

@MahdiSafsafi
Copy link
Owner

Hi Sorien,
Can you please include a simple demo ?

@Sorien
Copy link
Contributor Author

Sorien commented Jan 14, 2016

hmm, can't reproduce it in simple demo .. i'll try to debug it a bit

@Sorien
Copy link
Contributor Author

Sorien commented Jan 14, 2016

system.pas - function InitUnits https://gist.github.com/Sorien/5235bdfab2c33dd11ece

image

TProc(P)(); is calling initialization at my unit (code below)

initialization
    InterceptCreate(@Dialogs.ShowMessage, @DialogHelper.ShowMessage);

in next itteration total count is changed ...

image

when i remove InterceptCreate/replace with old code hooking Count won't be changed

it looks really weird :/

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

2 participants