Okay, I need a certain API call that exists in Windows98 or later. Unfortunately some of my users only have Windows95. This particular API is in user32.dll of Win98. I have an alternative procedure for Windows95 but it won't be quite as pretty. Since prettiness counts for my users, and compatibility counts for maybe twice as much, I want to have the prettier solution on Win98 and a compatible solution on Win95. Now, my question is, would it be possible to link to a Windows-provided API routine using LoadLibrary() and GetProcAddress()? That way I can determine if I have Windows98 or not, use the API on Win98 or later, and use my ugly alternative on Win95.
And please, please, please, I don't want to answer my own questions again.... "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
Code:
if(hLibrary=(LoadLibrary("user32.dll")!=NULL)
{
if((ProcAddress=
GetProcAddress(hLibrary,"Win98orLaterProc"))
!=NULL)
(ProcAddress)();
FreeLibrary(hLibrary);
}
And please, please, please, I don't want to answer my own questions again.... "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."