fix: https://bugs.winehq.org/show_bug.cgi?id=52094 tests: ``` #include <Windows.h> #ifdef FROM_IMPORT #pragma comment(lib, "python3.lib") extern "C" int Py_IsInitialized(); #endif int main() { #ifdef FROM_IMPORT // test from import table Py_IsInitialized( ); #else // //Test ref count int (*Py_IsInitialized)(); HMODULE hmod_310 = LoadLibraryA( "C:\\Python310\\python310.dll" ); HMODULE hmod = LoadLibraryA( "C:\\Python310\\python3.dll" ); if ( !hmod ) return 0; *(FARPROC*)&Py_IsInitialized = GetProcAddress( hmod, "Py_IsInitialized" ); FreeLibrary( hmod_310 ); Py_IsInitialized( ); FreeLibrary( hmod ); // test dependencies hmod = LoadLibraryA( "C:\\Python310\\python3.dll" ); if ( !hmod ) return 0; *(FARPROC*)&Py_IsInitialized = GetProcAddress( hmod, "Py_IsInitialized" ); Py_IsInitialized(); FreeLibrary( hmod ); #endif return 0; } ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4662