[SHLWAPI][SDK][BOOTDATA] Implement SHGetAppCompatFlags (#8137)

Compatibility is a key that the system
works well.
JIRA issue: CORE-19278
- Add appcompat.c.
- Implement SHGetAppCompatFlags
  function.
- Add Str_SetPtrA prototype to
  <commctrl.h>.
- Add SHACF_... flags to
  <shlwapi_undoc.h>.
- Add comctl32 delay import
  (for Str_SetPtrA).
- Modify boot/bootdata/hivesft.inf
  for registry key
  HRESULTKLM\SOFTWARE\Microsoft\
  Windows\CurrentVersion\
  ShellCompatibility\Applications.
This commit is contained in:
Katayama Hirofumi MZ 2025-06-22 09:52:37 +09:00 committed by GitHub
parent 1a11aa059f
commit b199e9d05f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 595 additions and 5 deletions

View file

@ -4879,12 +4879,24 @@ typedef struct {
_In_ LPARAM lParam,
_In_ UINT options);
WINCOMMCTRLAPI
BOOL
WINAPI Str_SetPtrA(
_Inout_ LPSTR *ppsz,
_In_opt_ LPCSTR psz);
WINCOMMCTRLAPI
BOOL
WINAPI Str_SetPtrW(
_Inout_ LPWSTR *ppsz,
_In_opt_ LPCWSTR psz);
#ifdef UNICODE
#define Str_SetPtr Str_SetPtrW
#else
#define Str_SetPtr Str_SetPtrA
#endif
typedef struct _DPASTREAMINFO {
int iPos;
void *pvItem;

View file

@ -397,8 +397,34 @@ HRESULT WINAPI SHRunIndirectRegClientCommand(_In_ HWND hWnd, _In_ PCWSTR pszClie
DWORD WINAPI SHGetObjectCompatFlags(IUnknown *pUnk, const CLSID *clsid);
#define SHACF_WIN95SHLEXEC 0x00000200 /* Geoff Chappell */
DWORD WINAPI SHGetAppCompatFlags(DWORD dwMask);
/* Flags for SHGetAppCompatFlags */
#define SHACF_CONTEXTMENU 0x00000001
#define SHACF_FLUSHNOWAITALWAYS SHACF_CONTEXTMENU
#define SHACF_DOCOBJECT 0x00000002
#define SHACF_CORELINTERNETENUM 0x00000004
#define SHACF_OLDCREATEVIEWWND SHACF_CORELINTERNETENUM
#define SHACF_WIN95DEFVIEW SHACF_CORELINTERNETENUM
#define SHACF_MYCOMPUTERFIRST 0x00000008
#define SHACF_OLDREGITEMGDN 0x00000010
// 0x00000020
#define SHACF_LOADCOLUMNHANDLER 0x00000040
#define SHACF_ANSI 0x00000080
#define SHACF_UNKNOWN1 0x00000100
#define SHACF_WIN95SHLEXEC 0x00000200
#define SHACF_STAROFFICE5PRINTER 0x00000400
#define SHACF_NOVALIDATEFSIDS 0x00000800
#define SHACF_FILEOPENNEEDSEXT 0x00001000
#define SHACF_WIN95BINDTOOBJECT 0x00002000
#define SHACF_IGNOREENUMRESET 0x00004000
// 0x00008000
#define SHACF_ANSIDISPLAYNAMES 0x00010000
#define SHACF_FILEOPENBOGUSCTRLID 0x00020000
#define SHACF_FORCELFNIDLIST 0x00040000
// 0x00080000
#define SHACF_UNKNOWN2 0x01000000
#define SHACF_UNKNOWN3 0x80000000
DWORD WINAPI SHGetAppCompatFlags(_In_ DWORD dwMask);
/*****************************************************************************
* IAssociationElementOld interface