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

[fix] should use IMAGE_ORDINAL32 #1

Open
ImFlo opened this issue Jun 27, 2021 · 0 comments
Open

[fix] should use IMAGE_ORDINAL32 #1

ImFlo opened this issue Jun 27, 2021 · 0 comments

Comments

@ImFlo
Copy link

ImFlo commented Jun 27, 2021

function_handle = (void*) GetProcAddress(import_module, (LPSTR) lookup_addr);

According to the msdn : "If this parameter is an ordinal value, it must be in the low-order word; the high-order word must be zero.", cf. https://docs.microsoft.com/fr-fr/windows/win32/api/libloaderapi/nf-libloaderapi-getprocaddress

This line should be : function_handle = (LPVOID)GetProcAddress(import_module, (LPSTR)IMAGE_ORDINAL32(lookup_addr));

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