MakeCriticalSectionGlobal

Started by
5 comments, last by krumms 19 years, 11 months ago
Compiling a simple OpenGL app for ClanLib 0.7.x on WinXP Pro w/ DX8.1 (if thats relevant). Sent it off to a friend and he got the following error: "the procedure entry point MakeCriticalSectionGlobal could not be located in the dynamic link library KERNEL32.dll" Can anybody shed some light as to why MakeCriticalSectionGlobal would be missing from Kernel32.dll???? He''s running XP/DX8.1 also. Thanks heaps, Tom L
refrain_from_stupidity( &me );
Advertisement
"MakeCriticalSectionGlobal" ?

There isn''t a function called that in the Microsoft Win32 API!!, so nothing should be referring to that.

Unless the author has been using undocumented calls (maybe created by making an IMPLIB from a DLL rather than using the official one from the Platform SDK).

I think "MakeCriticalSectionGlobal" once existed as an ***undocumented*** call in an old version of Kernel32 prior to Windows2000, if someone has used it, then they''ve just learnt why using undocumented calls isn''t a good idea.


Aha - just did a bit of checking: "MakeCriticalSectionGlobal" also exists in WINE (Windows emulator for *NIX platforms), some documentation people using that have online makes no mention of the fact that it isn''t a public API call.



--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

How strange!

I had a look after I posted and I came up virtually empty too. I imagine your guess at it being undocumented would be a best bet - but I''m wondering what would be calling it now. Perhaps ClanLib is making use of it, somewhere deep within the depths of its code ... other than that ... uh ... *shrugs*

Tom L
refrain_from_stupidity( &me );
I just did a find in files on the source to clanlib 0.7.1 and didn''t find any instances of MakeCriticalSectionGlobal


1) Are you using MSVC? or another compiler ?

2) Are you linking with any other 3rd party libraries apart from ClanLib, you mention OpenGL. Are the headers and lib files from those the correct versions for all OS''s ?

3) Are you including any DLLs in the package that you''re sending to your friend - for example if you included the version of say USER32.DLL in the same folder as the application you may get a problem like this. Try getting him to strip out any DLLs you haven''t used from the folder.


You can run Dependency Walker (Depends.exe, comes with MSVC) on your .exe to see which DLL functions its trying to link with, and what the DLLs its loading are in turn trying to link with.

Also you can change the project settings to generate a mapfile to get similar information.

500x1

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

this isn''t really insightful or helpful, but i got the exact same error message after trying to install bontago

bontago also had a few other missing dll that i downloaded and put them in the folder and i would get past one message onto the next one

i got a new copy of kernel32.dll by doing a google search, and in theory it should work, but i have no idea where to put it and/or to have it replace a pre-existing copy or not
Do NOT replace kernel32.dll.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
quote:Original post by Magmai Kai Holmlor
Do NOT replace kernel32.dll.


Seconded. Especially if you just grabbed a copy of it somewhere on the net. Chances are you''re a few steps away from killing your PC.

This topic is closed to new replies.

Advertisement