The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: James Ladd on May 22, 2005, 05:21:03 AM

Title: Where is InitializeCriticalSection ?
Post by: James Ladd on May 22, 2005, 05:21:03 AM
When I try to compile my code containing a call to InitializeCriticalSection I get the following error:
fastutil.asm(56) : error A2006: undefined symbol : InitializeCreaticalSection
Yet I include kernel32 and other masm libraries.
When I do a search through all the INC files in MASM I cant find the API. Surely it isnt left out ????

Help on finding and linking with the API would be appreciated.

rgs, striker.
Title: Re: Where is InitializeCriticalSection ?
Post by: MichaelW on May 22, 2005, 05:54:45 AM
InitializeCreaticalSection ?

\masm32\include\kernel32.inc

InitializeCriticalSection PROTO :DWORD


Title: Re: Where is InitializeCriticalSection ?
Post by: James Ladd on May 22, 2005, 06:35:31 AM
Dang, a spelling error !!!
Thanks for pointing out my stupid typing. :)
Title: Re: Where is InitializeCriticalSection ?
Post by: Mark Jones on May 22, 2005, 11:45:46 PM
Perhaps a useful tip, whenever I get a message "error A2006: undefined symbol : Blah Blah Blah" I open up windows explorer, and do a file-contents search of C:\MASM32 for the offending word. It will turn up at least one .inc and .lib file, then you know what files to include. :)
Title: Re: Where is InitializeCriticalSection ?
Post by: James Ladd on May 23, 2005, 03:29:06 AM
I did the search as you suggest. I guess it helps if you dont keep on typing the wrong spelling each time :(
Doh !!
Title: Re: Where is InitializeCriticalSection ?
Post by: pbrennick on May 23, 2005, 11:30:55 AM
'Copy and Paste' will also perpetuate an error.

Paul
Title: Re: Where is InitializeCriticalSection ?
Post by: Infro_X on May 23, 2005, 05:47:23 PM
i find it easiest to search for word intersections,  lizeCrit or calSect