Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SHLWAPI][SDK] Add IShellFolder_... helper functions #6893

Merged
merged 18 commits into from
May 18, 2024

Conversation

katahiromz
Copy link
Contributor

@katahiromz katahiromz commented May 15, 2024

Purpose

Implementing missing features...
JIRA issue: CORE-19278

Proposed changes

  • Implement IShellFolder_GetDisplayNameOf, IShellFolder_ParseDisplayName, and IShellFolder_CompareIDs functions.
  • Add them to <shlwapi_undoc.h>.
  • Modify shlwapi.spec.
  • Add some SHCIDS_... macros into shobjidl.idl.
  • Provide a macro option SHLWAPI_ISHELLFOLDER_HELPERS to avoid conflict with <shobjidl.h> IShellFolder_... inline functions. Ugly hack but effective!

TODO

  • Do build.

@katahiromz katahiromz added the enhancement For PRs with an enhancement/new feature. label May 15, 2024
@katahiromz katahiromz added the hackfix PRs that look like hacks/workarounds for deeper problems label May 15, 2024
dll/win32/shlwapi/utils.cpp Show resolved Hide resolved
dll/win32/shlwapi/utils.cpp Outdated Show resolved Hide resolved
dll/win32/shlwapi/utils.cpp Outdated Show resolved Hide resolved
dll/win32/shlwapi/utils.cpp Outdated Show resolved Hide resolved
dll/win32/shlwapi/utils.cpp Show resolved Hide resolved
dll/win32/shlwapi/utils.cpp Show resolved Hide resolved
dll/win32/shlwapi/utils.cpp Outdated Show resolved Hide resolved
dll/win32/shlwapi/utils.cpp Outdated Show resolved Hide resolved
sdk/include/psdk/shobjidl.idl Outdated Show resolved Hide resolved
dll/win32/shlwapi/utils.cpp Outdated Show resolved Hide resolved
dll/win32/shlwapi/utils.cpp Outdated Show resolved Hide resolved
@HBelusca
Copy link
Contributor

Why is the PR tagged as "hackfix"?

#undef IShellFolder_ParseDisplayName
#undef IShellFolder_CompareIDs

#define SHLWAPI_ISHELLFOLDER_HELPERS /* HACK! */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding "HACK": Well, it's kind of fine, because those exported IShellFolder functions from shlwapi seem to be quick-handly helpers for code that don't otherwise use a full-blown IShellFolder_.... interface, it seems to me at least. It's kind of undocumented, so it should be fine, in our undocumented header, to have a specific define to enable or disable definition of stuff.

Copy link
Contributor

@whindsaks whindsaks May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that don't otherwise use a full-blown IShellFolder_.... interface

No, it seems to be for the shell to use when interacting with 3rd-party IShellFolders that it does not fully trust to behave correctly.

@katahiromz katahiromz removed the hackfix PRs that look like hacks/workarounds for deeper problems label May 18, 2024
@katahiromz katahiromz merged commit 6c2d1c3 into reactos:master May 18, 2024
34 checks passed
@katahiromz katahiromz deleted the sf-helper branch May 18, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For PRs with an enhancement/new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants