How to get Program Files folder path (not Program Files (x86)) from 32bit WOW process?

前端 未结 6 2391
我寻月下人不归
我寻月下人不归 2021-02-19 05:42

I need to get the path to the native (rather than the WOW) program files directory from a 32bit WOW process.

When I pass CSIDL_PROGRAM_FILES (or CSIDL_PROGRAM_FILESX86)

6条回答
  •  逝去的感伤
    2021-02-19 05:55

    You're on the right path - Use the KNOWNFOLDERID of FOLDERID_ProgramFilesX64

    The SHGetKnownFolderPath function can be used to retrieve the full path of a given KnownFolder.

提交回复
热议问题