[fpc-devel] End of support for Win XP?

Denis Kozlov dezlov at gmail.com
Tue Feb 6 03:24:07 CET 2018


Improved windirs.GetWindowsSpecialDir is ready:
https://bugs.freepascal.org/view.php?id=33133

The submitted patch contains the following changes:
1. Added FOLDERID_* constants, required for SHGetKnownFolderPath.
2. Added mapping of legacy CSIDL_* constants to FOLDERID_* constants.
3. Overloaded GetWindowsSpecialDir to work with both CSIDL_* or 
FOLDERID_* constants.
4. Changed GetWindowsSpecialDir to fallback to an alternative API (using 
appropriate remapping of parameters) when the default API function is 
not available.

Existing code that uses GetWindowsSpecialDir(CSIDL_*) should not be 
affected, except for an improved forward compatibility when the 
deprecated SHGetFolderPath is finally removed from Windows API, in which 
case a newer API function will be used automatically.

Denis


On 01/02/2018 13:31, Sven Barth via fpc-devel wrote:
> Am 01.02.2018 14:08 schrieb "Denis Kozlov" <dezlov at gmail.com 
> <mailto:dezlov at gmail.com>>:
>
>     A proposal:
>     1) Use windirs.GetWindowsSpecialDir in fpttf.pp, which already
>     uses a more backwards compatible SHGetFolderPath().
>     2) Optionally, improve windirs.GetWindowsSpecialDir to use a newer
>     SHGetKnownFolderPath() when it is available.
>
>     If this is suitable, I can produce a patch for both.
>
>
> I would be in favor of this, especially as it hides the gritty details 
> from fpttf.pp.
> Report them as two separate issues, please.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180206/c284ca7c/attachment.html>


More information about the fpc-devel mailing list