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

Allow direct cast of get_proc_address result #95

Merged
merged 2 commits into from
Aug 26, 2024

Commits on Aug 25, 2024

  1. Allow direct cast of get_proc_address result

    GetProcAddress returns a pointer to some function. It can return
    pointers to different functions, so it has to return something that is
    suitable to store any pointer to function. Microsoft chose FARPROC,
    which is int (WINAPI *)() on 32-bit Windows. The user is supposed to
    know the signature of the function he requests and perform a cast
    (which is a nop on this platform). The result is a pointer to function
    with the required signature, which is bitwise equal to what
    GetProcAddress returned.
    However, gcc >= 8 warns about that.
    
    Add a template parameter to do the cast inside the function and suppress
    the warning there.
    Flamefire committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    9bd9649 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Configuration menu
    Copy the full SHA
    62b14d9 View commit details
    Browse the repository at this point in the history