The toolhelp functions (CreateToolhelp32Snapshot) are available on 95/98/ME/2000/XP but not NT4.0.
>> The big disadvantage is that non winnt versions dont have a GetModuleFileNameEx so you have to check the windows versions if its winnt or not <<
I assume you already know this but not calling a function is not enough to ensure the program will work on platforms where that function does not exist. For example, this program will fail to load on Windows 9x:
Code:
if (isWinNT)
{
EnumProcessModules(...);
}
You can get true backwards compatibility you must use dynamic function loading. VC also has a feature that allows one to call a function normally but dynamic loading is used in the background called delayed loading.