2 ShellAPI problems: if(n)def UNICODE typos and some WindowsXP specific functions
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
- ShellAPI unit defines some functions that are not present in shell32.dll under Windows 2000 Professional. Namely, these are WinExecError[AW], SHSetLocalizedName, SHEnumerateUnreadMailAccounts[AW], SHGetUnreadMailCount[AW], SHSetUnreadMailCount[AW], SHGetImageList. About all these functions msdn.microsoft.com says that "Minimum operating systems: Windows XP". So, according to msdn, those functions are only available on Windows XP.
Patch linked at the end of this report fixes this problem by commenting out such functions inside {ifdef WINDOWS_XP} ... {
endif} clauses. Of course, maybe you will want to fix this in some other way (like creating a unit ShellAPIWindowsXP ?). Delphi does not define any of these functions in ShellAPI unit, so compatibility is not a problem here. The point is that those functions should not be included in default ShellAPI unit, since they are not available on many Windowses.
- A few times {
ifdef UNICODE} was used where {
ifndef UNICODE} was needed. In effect many functions with UNICODE-style params are defined instead of appropriate non-UNICODE versions. Patch linked below fixes these problems.
Patch is here:
http://www.camelot.homedns.org/~michalis/tmp/shellapi.patch
Additional information:
Reporter: Michalis Kamburelis
EMail: michalis at camelot dot homedns dot org
Mantis conversion info:
- Mantis ID: 5176
- OS: WIN32
- Version: 1.9.5
- Fixed in version: 1.9.5