Are you #including Windows.h? Sounds like you aren't, at least not in the code file containing that function call. That would also explain why you are declaring the LIST_MODULES_32BIT constant, which is unnecessary as Windows.h would include a proper definition for it.
Forth line from the top of main.cpp, also im using CodeBlocks. windows.h is already being included correctly i know for a fact because im using other functions from the same header and they are working fine.
1 2 3 4 5
//Coded by h4344
Then you must be working with an old Windows SDK. You need the SDK v6.0 for Windows Vista as a minimum.
I only use Visual Studio so I am unsure as to where you can look up the version of your SDK. The one that is downloaded directly from Microsoft is installed in a folder with the version number in the folder's name. I guess the version is in the files themselves elsewhere, I just don't know where exactly.
I find a windows.h in C:\Program Files\CodeBlocks\MinGW\include , which is probably what Code::Blocks uses. The Code::Blocks version I have installed is pretty old as I currently use Visual Studio, but inside the file I read:
windows.h - main header file for the Win32 API
Written by Anders Norlander <firstname.lastname@example.org>
This file is part of a free library for the Win32 API.
It doesn't specify a version.
I guess you could get a newer version of the SDK (I currently have 7.1 in my system but 6.0 should be a minimum like webJose mentioned), manually add the path in your Code::Blocks project and include that instead.
Use Mingw-w64 from http://tdragon.net/recentgcc/ as your compiler, this came with latest version of windows sdk ported to MinGW.
Don't forget to add -m32 command line switch if you want x86 binaries.
And define WINVER and other necessary macros before including windows.h