• K
    std::dynamic_lib: Fix Windows error handling · d053ccb4
    klutzy 提交于
    This is a [breaking-change] since `std::dynamic_lib::dl` is now
    private.
    
    When `LoadLibraryW()` fails, original code called `errno()` to get error
    code.  However, there was local allocation of `Vec` before
    `LoadLibraryW()`, and it drops before `errno()`, and the drop
    (deallocation) changed `errno`! Therefore `dynamic_lib::open()` thought
    it always succeeded.
    This commit fixes the issue.
    
    This commit also sets Windows error mode during `LoadLibrary()` to
    prevent "dll load failed" dialog.
    d053ccb4
c.rs 10.4 KB