• Hilko Bengen's avatar
    windows: add GetProcAddressByOrdinal · 8dbc5d05
    Hilko Bengen authored
    The current GetProcAddress implementation only resolves functions in
    DLLs by name. Add GetProcAddressByOrdinal that allows resolving
    functions by ordinal number, using the same GetProcAddress call from
    kernel32.dll in the background.
    
    This is particularly useful for some functions (e.g. IsOS from
    shlwapi.dll in some older versions of Windows) that cannot be found by
    name.
    
    Fixes golang/go#16507
    
    Change-Id: Ib5fba7568c365a0aa2491c1261876b3a3929ec3d
    Reviewed-on: https://go-review.googlesource.com/70690Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
    Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    8dbc5d05
syscall_windows.go 38.1 KB