Eric Pouech : winhelp: Implemented ExecFile macro.
Alexandre Julliard
julliard at winehq.org
Thu Jun 10 12:22:49 CDT 2010
Module: wine
Branch: master
Commit: d18d25115bf4a17976cea51ded33c022989feacf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d18d25115bf4a17976cea51ded33c022989feacf
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Wed Jun 9 21:22:22 2010 +0200
winhelp: Implemented ExecFile macro.
---
programs/winhlp32/macro.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c
index 0e48ca8..cd497ef 100644
--- a/programs/winhlp32/macro.c
+++ b/programs/winhlp32/macro.c
@@ -25,6 +25,7 @@
#include "windows.h"
#include "commdlg.h"
+#include "shellapi.h"
#include "winhelp.h"
#include "wine/debug.h"
@@ -64,6 +65,9 @@ static WINHELP_BUTTON** MACRO_LookupButton(WINHELP_WINDOW* win, LPCSTR na
return b;
}
+/******* some forward declarations *******/
+static void CALLBACK MACRO_JumpID(LPCSTR lpszPathWindow, LPCSTR topic_id);
+
/******* real macro implementation *******/
void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
@@ -352,9 +356,20 @@ static void CALLBACK MACRO_EndMPrint(void)
WINE_FIXME("()\n");
}
-static void CALLBACK MACRO_ExecFile(LPCSTR str1, LPCSTR str2, LONG u, LPCSTR str3)
+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);
+ HINSTANCE ret;
+
+ WINE_TRACE("(%s, %s, %u, %s)\n",
+ wine_dbgstr_a(pgm), wine_dbgstr_a(args), cmd_show, wine_dbgstr_a(topic));
+
+ ret = ShellExecuteA(Globals.active_win ? Globals.active_win->hMainWnd : NULL, "open",
+ pgm, args, ".", cmd_show);
+ if ((DWORD_PTR)ret < 32)
+ {
+ WINE_WARN("Failed with %p\n", ret);
+ if (topic) MACRO_JumpID(NULL, topic);
+ }
}
static void CALLBACK MACRO_ExecProgram(LPCSTR str, LONG u)
More information about the wine-cvs
mailing list