• Jiaye Wu's avatar
    Fix UNICODE issue of dlerror() · 8dc460b8
    Jiaye Wu authored
    Current implementation is conflicting. If `UNICODE` is defined, `FormatMessage()` will be `FormatMessageW()`, and variable `win_errormsg` with type `char` can not be passed to it, which should be changed to `TCHAR` instead. Since we don't use UNICODE here, we can use `FormatMessageA()` directly to avoid conversion error.
    ```
    my_global.h(1092): error C2664: 'DWORD FormatMessageW(D
    WORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list *)' : cannot convert argument 5 from 'char [2048]' to 'LPWSTR'
    ```
    8dc460b8
my_global.h 33 KB