Checking for existence of Windows API Functions

前端 未结 8 1800
鱼传尺愫
鱼传尺愫 2021-01-05 14:17

I am new to Windows programming and I\'m trying to discover the best way to check for the existence of Windows Shell API functions. I want to use some of the new taskbar fea

8条回答
  •  星月不相逢
    2021-01-05 14:54

    If you want to find out at compile time so as to get a build break if the function is not available on the OS you are targetting (eg Win 95), then you can define some macros, documented here:NTDDI_VERSION, _WIN32_WINNT, WINVER.

    If you want your app to work fine when the functionality is not available (eg JumpLists on OSes older than Win7), then you should do combination of LoadLibrary/GetProcAddress to figure out whether the function you are looking for is available.

提交回复
热议问题