[SHELL32][SDK] Implement Activate_RunDLL (#5840)

- Add Activate_RunDLL function implementation.
- Add Activate_RunDLL prototype to <undocshell.h>.
This commit is contained in:
Katayama Hirofumi MZ 2023-10-28 14:56:27 +09:00 committed by GitHub
parent 2ccdd87809
commit ad5df2d199
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 11 deletions

View file

@ -801,17 +801,6 @@ SHIsBadInterfacePtr(LPVOID pv, UINT ucb)
return FALSE;
}
/*
* Unimplemented
*/
EXTERN_C BOOL
WINAPI
Activate_RunDLL(DWORD dwProcessId, LPVOID lpUnused1, LPVOID lpUnused2, LPVOID lpUnused3)
{
FIXME("Activate_RunDLL() stub\n");
return FALSE;
}
/*
* Unimplemented
*/

View file

@ -577,3 +577,30 @@ SHOpenPropSheetA(
return SHOpenPropSheetW(pszCaptionW, ahKeys, cKeys, pclsidDefault,
pDataObject, pShellBrowser, pszStartPageW);
}
/*************************************************************************
* Activate_RunDLL [SHELL32.105]
*
* Unlocks the foreground window and allows the shell window to become the
* foreground window. Every parameter is unused.
*/
EXTERN_C
BOOL WINAPI
Activate_RunDLL(
_In_ DWORD dwUnused1,
_In_ LPVOID lpUnused2,
_In_ LPVOID lpUnused3,
_In_ LPVOID lpUnused4)
{
DWORD dwPID;
UNREFERENCED_PARAMETER(dwUnused1);
UNREFERENCED_PARAMETER(lpUnused2);
UNREFERENCED_PARAMETER(lpUnused3);
UNREFERENCED_PARAMETER(lpUnused4);
TRACE("(%lu, %p, %p, %p)\n", dwUnused1, lpUnused2, lpUnused3, lpUnused4);
GetWindowThreadProcessId(GetShellWindow(), &dwPID);
return AllowSetForegroundWindow(dwPID);
}

View file

@ -720,6 +720,13 @@ BOOL WINAPI
SHTestTokenPrivilegeW(_In_opt_ HANDLE hToken, _In_z_ LPCWSTR lpName);
BOOL WINAPI IsSuspendAllowed(VOID);
BOOL WINAPI
Activate_RunDLL(
_In_ DWORD dwUnused1,
_In_ LPVOID lpUnused2,
_In_ LPVOID lpUnused3,
_In_ LPVOID lpUnused4);
/*****************************************************************************
* Shell32 resources
*/