Skip to main content
GameDev.net gamedev.net
🔒 Locked

MakeCriticalSectionGlobal

Started by krumms Dec 17, 2002 at 4:28 AM 5 replies 15.4k views
Original Post
krumms
krumms
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 );
S1CA
S1CA
"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
krumms
krumms
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 );
S1CA
S1CA
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
Shannon Barber
Shannon Barber
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
RuneLancer
RuneLancer
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.