I found that the tlhelp32.h does compile under c89 (since that is the latest that VS2010 supports) so I have at least achieved the main goal, I'll later try on Win95 compatibility mode to see if it still operates fine (after I finish typing the reliant functions).
As Awsdert posted Tlhelp32.h it does work under c98.
I would rather suggest you use NT\ZW functions via exporting them through ntdll.dll although it would require advanced knowledge about Windows API but apart from that it would be great deal better it would work in almost all windows this includes all the NT windows family it would be even better but Windows 95 is not NT so sadly it would not work there, although if TlHelp32 works it would be better to use it.
Thanks, I did not consider .NET purely because it cannot be used on Win95 and I'm making a custom framework that I want to support as far back as that system (even if I don't believe it'll be in use for much longer). My knowledge of the Windows API is still newbie grade so I'd rather stick to the simpler stuff for now.
Actually, a lot of the Windows headers require Microsoft specific extensions, so it's not compliant to C89 either.
Compiling with the /Za switch (disable language extension) has been no go for some time. I happen to still have Visual Studio 5 (from 1997) on my oldest PC, and windows.h wouldn't compile with the /Za switch even back then.
(Output of compile: VC97 with old SDK from the same year.)
C:\MSSDK97\Include\winnt.h(287) : error C2467: illegal declaration of anonymous 'struct'
C:\MSSDK97\Include\winnt.h(306) : error C2467: illegal declaration of anonymous 'struct'
C:\MSSDK97\Include\winnt.h(1389) : error C2501: '_inline' : missing decl-specifiers
C:\MSSDK97\Include\winnt.h(1389) : error C2239: unexpected token 'identifier' following declaration of '_inline'
C:\MSSDK97\Include\winnt.h(1389) : error C2061: syntax error : identifier 'PVOID'
C:\MSSDK97\Include\winnt.h(1396) : warning C4616: #pragma warning : warning number '0' out of range, must be between '4001' and '4999'
C:\MSSDK97\Include\winnt.h(1431) : error C2204: '_FLOATING_SAVE_AREA' : type definition found within parentheses
C:\MSSDK97\Include\winnt.h(1441) : error C2501: 'FLOATING_SAVE_AREA' : missing decl-specifiers
C:\MSSDK97\Include\winnt.h(1443) : error C2378: 'FLOATING_SAVE_AREA' : redefinition; symbol cannot be overloaded with a typedef
C:\MSSDK97\Include\winnt.h(1443) : error C2239: unexpected token '*' following declaration of 'FLOATING_SAVE_AREA'
C:\MSSDK97\Include\winnt.h(1443) : error C2059: syntax error : '*'
C:\MSSDK97\Include\winnt.h(1495) : error C2501: 'FLOATING_SAVE_AREA' : missing decl-specifiers
C:\MSSDK97\Include\winnt.h(1495) : error C2146: syntax error : missing ';' before identifier 'FloatSave'
(the compiler gives up when it gets to the 100th error.)
To be honest, I'm not sure windows.h has ever compiled with the /Za switch.
I'm not too worried about the /Za switch as long as the /TC switch works, windows.h is after all OS specific so code is written to match the system (in the event system is not detected the code defaults to "do nothing" code with warnings).