https://bugs.winehq.org/show_bug.cgi?id=53781
Bug ID: 53781 Summary: cfgmgr32.dll missing function CM_MapCrToWin32Err Product: Wine Version: 7.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: janne.kekkonen@gmail.com Distribution: ---
Created attachment 73270 --> https://bugs.winehq.org/attachment.cgi?id=73270 attached file contain terminal logs run in windows and wine. File also has source for testcode.
cfgmgr32.dll might be missing function CM_MapCrToWin32Err.
When trying to get address of this function with GetProcAddress return value is null. After failed address retrieving GetLastError() gives error code 127.
https://bugs.winehq.org/show_bug.cgi?id=53781
--- Comment #1 from Janne janne.kekkonen@gmail.com --- Based on the logs, here is my proposal for the implementation of CM_MapCrToWin32Err.
DWORD WINAPI CM_MapCrToWin32Err(DWORD CmReturnCode, DWORD DefaultErr) { FIXME("stub\n"); DWORD conversiontable[22][2] = { {CR_SUCCESS,ERROR_SUCCESS}, {CR_OUT_OF_MEMORY,ERROR_NOT_ENOUGH_MEMORY}, {CR_INVALID_POINTER,ERROR_INVALID_USER_BUFFER}, {CR_INVALID_FLAG,ERROR_INVALID_FLAGS}, {CR_INVALID_DEVNODE,ERROR_INVALID_DATA}, {CR_NO_SUCH_DEVNODE,ERROR_NOT_FOUND}, {CR_ALREADY_SUCH_DEVNODE,ERROR_ALREADY_EXISTS}, {CR_BUFFER_SMALL,ERROR_INSUFFICIENT_BUFFER}, {CR_NO_REGISTRY_HANDLE,ERROR_INVALID_HANDLE}, {CR_REGISTRY_ERROR,ERROR_REGISTRY_CORRUPT}, {CR_INVALID_DEVICE_ID,ERROR_INVALID_DATA}, {CR_NO_SUCH_VALUE,ERROR_NOT_FOUND}, {CR_NO_SUCH_REGISTRY_KEY,ERROR_FILE_NOT_FOUND}, {CR_INVALID_MACHINENAME,ERROR_INVALID_DATA}, {CR_REMOTE_COMM_FAILURE,ERROR_SERVICE_NOT_ACTIVE}, {CR_MACHINE_UNAVAILABLE,ERROR_SERVICE_NOT_ACTIVE}, {CR_ACCESS_DENIED,ERROR_ACCESS_DENIED}, {CR_NO_CM_SERVICES,ERROR_SERVICE_NOT_ACTIVE}, {CR_CALL_NOT_IMPLEMENTED,ERROR_CALL_NOT_IMPLEMENTED}, {CR_INVALID_PROPERTY,ERROR_INVALID_DATA}, {CR_NO_SUCH_DEVICE_INTERFACE,ERROR_NOT_FOUND}, {CR_INVALID_REFERENCE_STRING,ERROR_INVALID_DATA}, }; int i=0;
for(i=0;i<22;i++) { if (conversiontable[i][0]==CmReturnCode) { return conversiontable[i][1]; } }
return DefaultErr; }
https://bugs.winehq.org/show_bug.cgi?id=53781
Janne janne.kekkonen@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |setupapi
https://bugs.winehq.org/show_bug.cgi?id=53781
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |download Ever confirmed|0 |1 CC| |austinenglish@gmail.com
--- Comment #2 from Austin English austinenglish@gmail.com --- https://www.dsogaming.com/news/the-matrix-awakens-megacity-unreal-engine-5-1...
The Matrix Awakens MegaCity Unreal Engine 5.1 demo also needs this function.
https://bugs.winehq.org/show_bug.cgi?id=53781
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sagar.ghuge@intel.com
--- Comment #3 from Gijs Vermeulen gijsvrm@gmail.com --- *** Bug 54513 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=53781
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|cfgmgr32.dll missing |Multiple apps crash on |function CM_MapCrToWin32Err |unimplemented function | |CFGMGR32.dll.CM_MapCrToWin3 | |2Err (Matrix Awakens | |MegaCity Unreal Engine 5.1 | |demo, Hogwarts Legacy)
https://bugs.winehq.org/show_bug.cgi?id=53781
--- Comment #4 from Janne janne.kekkonen@gmail.com --- Tested wine version 8.0 and it is missing the CM_MapCrToWin32Err function also.
https://bugs.winehq.org/show_bug.cgi?id=53781
Mohamad Al-Jaf mowinebugs@mail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mowinebugs@mail.com
--- Comment #5 from Mohamad Al-Jaf mowinebugs@mail.com --- Fixed in commit 4fab9ff230f497499da223ade9bbe3633a657f05
https://gitlab.winehq.org/wine/wine/-/commit/4fab9ff230f497499da223ade9bbe36...
https://bugs.winehq.org/show_bug.cgi?id=53781
--- Comment #6 from Janne janne.kekkonen@gmail.com --- I pulled commit and compiled wine.
I copied newly created cfgmgr32.dll to syswow64 folder. My test program fails in GetProcAddress. GetLastError gives errorcode 127.
After this i made another test program which uses renamed dll that is located in same folder than exe is. In this case function works.
In both programs LoadLibrary seems to load dll into memory.
Difference in my test programs are these two rows:
Doesent work: HMODULE dll = LoadLibrary("cfgmgr32.dll");
Works: HMODULE dll = LoadLibrary("cfgmgr32_wine.dll");
I'll attach both test programs.
https://bugs.winehq.org/show_bug.cgi?id=53781
--- Comment #7 from Janne janne.kekkonen@gmail.com --- Created attachment 74275 --> https://bugs.winehq.org/attachment.cgi?id=74275 test programm that seems to work
https://bugs.winehq.org/show_bug.cgi?id=53781
--- Comment #8 from Janne janne.kekkonen@gmail.com --- Created attachment 74276 --> https://bugs.winehq.org/attachment.cgi?id=74276 test programm that doesent work
https://bugs.winehq.org/show_bug.cgi?id=53781
temp82@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |temp82@luukku.com
--- Comment #9 from temp82@luukku.com --- (In reply to Janne from comment #8)
Created attachment 74276 [details] test programm that doesent work
there is no crash. wine 8.4.
https://bugs.winehq.org/show_bug.cgi?id=53781
--- Comment #10 from Janne janne.kekkonen@gmail.com --- I updated my wine to version 8.5 Now both test programs are working.
To me it seems that this bug is fixed.
https://bugs.winehq.org/show_bug.cgi?id=53781
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |4fab9ff230f497499da223ade9b | |be3633a657f05
--- Comment #11 from Austin English austinenglish@gmail.com --- Fixed
https://bugs.winehq.org/show_bug.cgi?id=53781
--- Comment #12 from temp82@luukku.com --- (In reply to temp82 from comment #9)
(In reply to Janne from comment #8)
Created attachment 74276 [details] test programm that doesent work
there is no crash. wine 8.4.
actually I have wine 8.5.
https://bugs.winehq.org/show_bug.cgi?id=53781
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.6.
https://bugs.winehq.org/show_bug.cgi?id=53781
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |8.0.x
https://bugs.winehq.org/show_bug.cgi?id=53781
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|8.0.x |---
--- Comment #14 from Michael Stefaniuc mstefani@winehq.org --- Removing the 8.0.x milestone from bug fixes included in 8.0.2.