Using SHGetSpecialFolderPath() to get the localized name of the "Program Files" folder

Someone asked this:

What is the proper way to find the localised name of the "Program Files" directory?
The SHGetSpecialFolderPath have no constant for this folder.
I currently use the registry setting:

HKLM/Pmail/Attachments/TopDir value

This works for all platforms from HPC Pro to WindowMoble 2003. I suppose this can be subject to change in the future.

There is a constant that was added in Ozone: CSIDL_PROGRAM_FILES. You may need a newer version of the SDK.

James Drage
Microsoft Windows Mobile Shell Team