mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[ZIPFLDR] Fix ShellExecute opening a .zip (#6714)
ShellExecute on a .zip file fails because the command in the registry
uses rundll32 that passes in an ANSI string, which is the default for
exported functions without a W suffix.
- This should also fix RAPPS not being able to open downloaded .zip files
- I made it use the full path to Explorer for good measure
Fixes regression introduced by 0.4.15-dev-6343-g bf2cec186c
(#5411)
CORE-19506
This commit is contained in:
parent
5f3554a40c
commit
dacdd80390
2 changed files with 8 additions and 3 deletions
|
@ -174,12 +174,17 @@ STDAPI DllUnregisterServer()
|
||||||
|
|
||||||
EXTERN_C
|
EXTERN_C
|
||||||
BOOL WINAPI
|
BOOL WINAPI
|
||||||
RouteTheCall(IN HWND hWndOwner, IN HINSTANCE hInstance, IN PCWSTR lpStringArg, IN INT Show)
|
RouteTheCallW(IN HWND hWndOwner, IN HINSTANCE hInstance, IN PCWSTR lpStringArg, IN INT Show)
|
||||||
{
|
{
|
||||||
CStringW path = lpStringArg;
|
CStringW path = lpStringArg;
|
||||||
PathRemoveBlanksW(path.GetBuffer());
|
PathRemoveBlanksW(path.GetBuffer());
|
||||||
path.ReleaseBuffer();
|
path.ReleaseBuffer();
|
||||||
path = L"\"" + path + L"\"";
|
path = L"\"" + path + L"\"";
|
||||||
ShellExecuteW(NULL, L"open", L"explorer.exe", path.GetString(), NULL, SW_SHOWNORMAL);
|
|
||||||
|
WCHAR app[MAX_PATH];
|
||||||
|
GetWindowsDirectoryW(app, _countof(app));
|
||||||
|
PathAppendW(app, L"explorer.exe");
|
||||||
|
|
||||||
|
ShellExecuteW(NULL, L"open", app, path.GetString(), NULL, Show ? Show : SW_SHOWNORMAL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||||
@ stdcall -private DllRegisterServer()
|
@ stdcall -private DllRegisterServer()
|
||||||
@ stdcall -private DllUnregisterServer()
|
@ stdcall -private DllUnregisterServer()
|
||||||
@ stdcall RouteTheCall(ptr ptr wstr long)
|
@ stdcall RouteTheCallW(ptr ptr wstr long)
|
||||||
|
|
Loading…
Reference in a new issue