[PATCH] [WinHlp32]: added support for some keyword support in external DLL support (RegisterRoutine parameters)

Eric Pouech eric.pouech at orange.fr
Fri Feb 10 14:38:03 CST 2012


Implemented hwndAdpp and hwndContext, and added a FIXME for the others.
Partial fix to #29579

A+
---

 programs/winhlp32/macro.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)


diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c
index ea6ecbd..94e16db 100644
--- a/programs/winhlp32/macro.c
+++ b/programs/winhlp32/macro.c
@@ -1029,6 +1029,32 @@ int MACRO_Lookup(const char* name, struct lexret* lr)
         return ret;
     if (MACRO_Loaded && (ret = MACRO_DoLookUp(MACRO_Loaded, name, lr, MACRO_NumLoaded)) != EMPTY)
         return ret;
+    if (!strcmp(name, "hwndApp"))
+    {
+        WINHELP_WINDOW* win;
+        lr->integer = 0;
+        for (win = Globals.win_list; win; win = win->next)
+        {
+            if (!strcmp(win->info->name, "main"))
+            {
+                lr->integer = (long)win->hMainWnd;
+                break;
+            }
+        }
+        return INTEGER;
+    }
+    if (!strcmp(name, "hwndContext"))
+    {
+        lr->integer = Globals.active_win ?
+            (long)Globals.active_win->hMainWnd : 0;
+        return INTEGER;
+    }
+    if (!strcmp(name, "qchPath") || !strcmp(name, "qError") || !strcmp(name, "lTopicNo") ||
+        !strcmp(name, "hfs") || !strcmp(name, "coForeground") || !strcmp(name, "coBackground"))
+    {
+        WINE_FIXME("keyword %s not substituted in macro parsing\n", name);
+        return EMPTY;
+    }
 
     lr->string = name;
     return IDENTIFIER;




More information about the wine-patches mailing list