• Rémi Bernon's avatar
    opengl32: Implement wow64 thunk for glGetString (et al.). · 17abb6f4
    Rémi Bernon authored
    This is a bit tricky because the strings are supposed to be static, but
    we also cannot return the unix strings directly either.
    
    So instead we keep track, on the unix side, of known unix / wow64 string
    associations, and return the known wow64 string if the unix string was
    already requested before.
    
    If the string wasn't found, the syscall returns STATUS_BUFFER_TOO_SMALL,
    and the PE side allocates the required memory, calling the syscall once
    again with the wow64 string pointer to copy the string to.
    
    On concurrent calls, the syscall may return a different wow64 string, in
    which case the PE side uses it instead and frees the one it allocated.
    
    Lastly, the PE side also keeps record of wow64 strings it had allocated,
    so that we can free them on process detach. The unix side also does some
    cleanup of its mapping buffer, as there's no guarantee that it will be
    completely unloaded.
    17abb6f4
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...