[PATCH] [WinHelp]: implemented ExecFile macro (fix for #23054)
Alexandre Julliard
julliard at winehq.org
Wed Jun 9 13:14:01 CDT 2010
Eric Pouech <eric.pouech at orange.fr> writes:
> +static void CALLBACK MACRO_ExecFile(LPCSTR pgm, LPCSTR args, LONG cmd_show, LPCSTR topic)
> {
> - WINE_FIXME("(\"%s\", \"%s\", %u, \"%s\")\n", str1, str2, u, str3);
> + static HINSTANCE (WINAPI *shell_exec)(HWND, LPCSTR, LPCSTR, LPCSTR, LPCSTR, INT);
> + HINSTANCE ret = 0;
> +
> + WINE_TRACE("(\"%s\", \"%s\", %u, \"%s\")\n", pgm, args, cmd_show, topic);
> + if (!shell_exec)
> + {
> + HANDLE h;
> +
> + if ((!(h = GetModuleHandle("shell32.dll")) && !(h = LoadLibraryA("shell32.dll"))) ||
> + !(shell_exec = (void*)GetProcAddress(h, "ShellExecuteA")))
> + {
> + WINE_ERR("Couldn't load shell32.ShellExecute\n");
> + }
> + }
Why not call ShellExecuteA directly?
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list