InitializeCriticalSectionEx

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, xnview

Post Reply
herb
Posts: 174
Joined: Sat Jul 18, 2009 3:19 pm

InitializeCriticalSectionEx

Post by herb »

Hello Pierre,

today I updated XnViewMP to version 0.78 on my Windows XP 32-bit system.
Starting the application I get the popup message: Entrypoint "InitializeCriticalSectionEx" in DLL KERNEL32.dll not found.
After clicking ok XnViewMP starts and it looks to have started properly.
But I am afraid that it will crash when really a critical section is entered.

With the previous version 0.76.1 I did not get that error message.

Please help.
Best regards
Herb
Mixer
Posts: 166
Joined: Fri Aug 28, 2015 6:24 am

Re: InitializeCriticalSectionEx

Post by Mixer »

I'm not Pierre (what a relief), but maybe you'd like to hear my opinion? Even if you don't, I'm going to post it anyway.

Of all .dll and .exe files included in .zip package with XnView MP 0.78 only two (if I didn't miss something) import function InitializeCriticalSectionEx() from kernel32.dll according to Dependency Walker. These two are vccorlib120.dll from base folder and webp.dll from plugins directory. They also have headers marking them as versions for Vista and up, but I think if they didn't want from kernel32.dll function they can not get, they could be used as fine as dll's for XP.
Vccorlib120.dll seems to be part of Visual C++ Redistributable Package for Visual Studio 2013 which you can download from here: https://www.microsoft.com/en-us/downloa ... x?id=40784
It may as well happen that you already have this package installed, please check Add/Remove Programs in Control Panel. Then to see if it Vista version of vccorlib120.dll causes error, after installing redistributable on XP you can move msvcp120.dll, msvcr120.dll, vccorlib120.dll and vcomp120.dll from XnViewMP base folder to some place where xnviewmp.exe won't look for them. This way first copy of vccorlib120.dll it should find will be the one from Windows\system32. But most likely .dll installed on XP will be the same as installed on any other Windows.
To see if error is caused by webp.dll try to temporarily rename this file, or even move it outside of plugins directory in case XnViewMP loads everything he sees there. No more ideas. Can't test this myself since I have currently no access to XP.
herb
Posts: 174
Joined: Sat Jul 18, 2009 3:19 pm

Re: InitializeCriticalSectionEx

Post by herb »

Hello,

Thanks Mixer, you are right, webp.dll caused the problem.
Thanks for your help.

I will work with previous version of this dll meanwhile.

Best regards
Herb
toriatama
Posts: 13
Joined: Sun Jul 12, 2009 4:25 pm

Re: InitializeCriticalSectionEx

Post by toriatama »

I had the same problem with XnviewMP running on a virtual XP machine.
Renaming webp.dll (inside plugins directory) solved the problem.
Many many thanks Mixer! :)
JFCeci
Posts: 1
Joined: Sat Sep 21, 2019 2:35 pm

Re: InitializeCriticalSectionEx

Post by JFCeci »

Hi,
in news versions of xnview the file is libwebp.dll.
rename it (e.g. _libwebp.dll) and xnview don't read it. So the error disapear.
thanks for the tips
Post Reply