SHGetSpecialFolderPath how to access 64bit CSIDL from 32bit application

Is there a way from a 32-bit application running on a 64-bit system to access the default folders for 64-bit applications?

For example, using SHGetSpecialFolderPath with CSIDL_PROGRAM_FILES from a 32-bit application returns "C: \ Program Files (x86)" If the same call was used from a 64-bit application, I would get "C: \ Program Files". a way to get this "C: \ Program Files" from a 32 bit application?

The related question does not help SHGetFolderPath () 32bit and 64bit and does not reassign wow64 filesystem redirection before calling SHGetSpecialFolderPath

+2


source to share


2 answers


Answering my own question, it looks like this is not possible with SHGetSpecialFolderPath. On Vista and later, using the replace function SHGetKnownFolderPath allows you to use FOLDERID_ProgramFilesX64



+2


source


I believe the whole reason for having separate folders was to prevent mixing 32 and 64 bit applications. Therefore, you will not need to see the folder owned by another bit from your application.



You may have a very good reason, but I don't see it as posted in your answer.

+1


source







All Articles