mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[SHELL32] Minimal SHRunControlPanel implementation (#3095)
CORE-9215 Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
This commit is contained in:
parent
ab115e30fe
commit
da36f799c7
2 changed files with 30 additions and 1 deletions
|
@ -1472,10 +1472,29 @@ HRESULT WINAPI SHWinHelp(HWND hwnd, LPCWSTR pszHelp, UINT uCommand, ULONG_PTR dw
|
|||
* SHRunControlPanel [SHELL32.161]
|
||||
*
|
||||
*/
|
||||
BOOL WINAPI SHRunControlPanel (LPCWSTR commandLine, HWND parent)
|
||||
BOOL WINAPI SHRunControlPanel (_In_ LPCWSTR commandLine, _In_opt_ HWND parent)
|
||||
{
|
||||
#ifdef __REACTOS__
|
||||
/*
|
||||
* TODO: Run in-process when possible, using
|
||||
* HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\InProcCPLs
|
||||
* and possibly some extra rules.
|
||||
* See also https://docs.microsoft.com/en-us/windows/win32/api/shlobj/nf-shlobj-shruncontrolpanel
|
||||
* "If the specified Control Panel item is already running, SHRunControlPanel
|
||||
* attempts to switch to that instance rather than opening a new instance."
|
||||
* This function is not supported as of Windows Vista, where it always returns FALSE.
|
||||
* However we need to keep it "alive" even when ReactOS is compliled as NT6+
|
||||
* in order to keep control panel elements launch commands.
|
||||
*/
|
||||
TRACE("(%s, %p)n", debugstr_w(commandLine), parent);
|
||||
WCHAR parameters[MAX_PATH] = L"shell32.dll,Control_RunDLL ";
|
||||
wcscat(parameters, commandLine);
|
||||
|
||||
return ((INT_PTR)ShellExecuteW(parent, L"open", L"rundll32.exe", parameters, NULL, SW_SHOWNORMAL) > 32);
|
||||
#else
|
||||
FIXME("(%s, %p): stub\n", debugstr_w(commandLine), parent);
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
static LPUNKNOWN SHELL32_IExplorerInterface=0;
|
||||
|
|
|
@ -2466,6 +2466,16 @@ HRESULT WINAPI CIDLData_CreateFromIDArray(
|
|||
_In_reads_opt_(cidl) PCUIDLIST_RELATIVE_ARRAY apidl,
|
||||
_Outptr_ IDataObject **ppdtobj);
|
||||
|
||||
/****************************************************************************
|
||||
* SHRunControlPanel
|
||||
*/
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
SHRunControlPanel(
|
||||
_In_ LPCWSTR commandLine,
|
||||
_In_opt_ HWND parent);
|
||||
|
||||
/****************************************************************************
|
||||
* SHOpenWithDialog
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue