diff --git a/dll/win32/shell32/utils.cpp b/dll/win32/shell32/utils.cpp index de7c84184e9..ef461aff193 100644 --- a/dll/win32/shell32/utils.cpp +++ b/dll/win32/shell32/utils.cpp @@ -2189,3 +2189,31 @@ SHELL32_AliasTranslatePidl( { return SHELL32_ReparentAsAliasPidl(NULL, NULL, pidl, ppidlNew, dwFlags) ? S_OK : E_FAIL; } + +/************************************************************************* + * LinkWindow_RegisterClass (SHELL32.258) + * + * https://learn.microsoft.com/en-us/windows/win32/shell/linkwindow-registerclass + */ +EXTERN_C BOOL WINAPI LinkWindow_RegisterClass(VOID) +{ + INITCOMMONCONTROLSEX iccx = { sizeof(iccx), ICC_LINK_CLASS }; + InitCommonControlsEx(&iccx); + + WNDCLASSEXW wcx = { sizeof(wcx) }; + if (!GetClassInfoExW(NULL, L"SysLink", &wcx)) + return FALSE; + + /* Superclassing! */ + wcx.lpszClassName = L"Link Window"; + return RegisterClassExW(&wcx) || (GetLastError() == ERROR_CLASS_ALREADY_EXISTS); +} + +/************************************************************************* + * LinkWindow_UnregisterClass (SHELL32.259) + */ +EXTERN_C BOOL WINAPI LinkWindow_UnregisterClass(_In_ DWORD dwUnused) +{ + /* Do nothing. This is correct. */ + return TRUE; +} diff --git a/dll/win32/shell32/wine/shellord.c b/dll/win32/shell32/wine/shellord.c index db31c9f1134..1a39573a372 100644 --- a/dll/win32/shell32/wine/shellord.c +++ b/dll/win32/shell32/wine/shellord.c @@ -2640,6 +2640,7 @@ HRESULT WINAPI SHSetLocalizedName(LPCWSTR pszPath, LPCWSTR pszResModule, int ids return S_OK; } +#ifndef __REACTOS__ // See ../utils.cpp /************************************************************************* * LinkWindow_RegisterClass (SHELL32.258) */ @@ -2657,6 +2658,7 @@ BOOL WINAPI LinkWindow_UnregisterClass(DWORD dwUnused) FIXME("()\n"); return TRUE; } +#endif /************************************************************************* * SHFlushSFCache (SHELL32.526) diff --git a/sdk/include/reactos/undocshell.h b/sdk/include/reactos/undocshell.h index 82017390187..02660883c71 100644 --- a/sdk/include/reactos/undocshell.h +++ b/sdk/include/reactos/undocshell.h @@ -910,6 +910,9 @@ Activate_RunDLL( BOOL WINAPI SHSettingsChanged(LPCVOID unused, LPCWSTR pszKey); +BOOL WINAPI LinkWindow_RegisterClass(VOID); +BOOL WINAPI LinkWindow_UnregisterClass(_In_ DWORD dwUnused); + /***************************************************************************** * Shell32 resources */