Commit in reactos on MAIN
include/win32k/ntuser.h+11.121 -> 1.122
lib/user32/include/user32.h+31.20 -> 1.21
lib/user32/user32.edf+1-11.33 -> 1.34
lib/user32/windows/window.c+20-201.103 -> 1.104
subsys/win32k/ntuser/misc.c+12-11.57 -> 1.58
+37-22
5 modified files
implemented GetWindowModuleFileName()

reactos/include/win32k
ntuser.h 1.121 -> 1.122
diff -u -r1.121 -r1.122
--- ntuser.h	2 Apr 2004 20:51:07 -0000	1.121
+++ ntuser.h	2 Apr 2004 22:16:08 -0000	1.122
@@ -171,6 +171,7 @@
 #define ONEPARAM_ROUTINE_GETCARETINFO         0x07
 #define ONEPARAM_ROUTINE_SWITCHCARETSHOWING   0x08
 #define ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS 0x09
+#define ONEPARAM_ROUTINE_GETWINDOWINSTANCE    0x10
 #define ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO  0x0a
 DWORD
 STDCALL

reactos/lib/user32/include
user32.h 1.20 -> 1.21
diff -u -r1.20 -r1.21
--- user32.h	2 Apr 2004 20:51:07 -0000	1.20
+++ user32.h	2 Apr 2004 22:16:09 -0000	1.21
@@ -85,6 +85,9 @@
 #define NtUserGetWindowContextHelpId(hwnd) \
   NtUserCallOneParam((DWORD)hwnd, ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID)
 
+#define NtUserGetWindowInstance(hwnd) \
+  (HINSTANCE)NtUserCallOneParam((DWORD)hwnd, ONEPARAM_ROUTINE_GETWINDOWINSTANCE)
+
 LONG WINAPI RegCloseKey(HKEY);
 LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
 LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);

reactos/lib/user32
user32.edf 1.33 -> 1.34
diff -u -r1.33 -r1.34
--- user32.edf	7 Dec 2003 23:02:57 -0000	1.33
+++ user32.edf	2 Apr 2004 22:16:09 -0000	1.34
@@ -372,7 +372,7 @@
 GetWindowInfo=GetWindowInfo@8
 GetWindowLongA=GetWindowLongA@8
 GetWindowLongW=GetWindowLongW@8
-GetWindowModuleFileName=GetWindowModuleFileName@12
+GetWindowModuleFileName=GetWindowModuleFileNameA@12
 GetWindowModuleFileNameA=GetWindowModuleFileNameA@12
 GetWindowModuleFileNameW=GetWindowModuleFileNameW@12
 GetWindowPlacement=GetWindowPlacement@8

reactos/lib/user32/windows
window.c 1.103 -> 1.104
diff -u -r1.103 -r1.104
--- window.c	2 Apr 2004 20:51:07 -0000	1.103
+++ window.c	2 Apr 2004 22:16:09 -0000	1.104
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.103 2004/04/02 20:51:07 weiden Exp $
+/* $Id: window.c,v 1.104 2004/04/02 22:16:09 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -15,6 +15,7 @@
 #include <user32.h>
 #include <window.h>
 #include <string.h>
+#include <strpool.h>
 #include <user32/callback.h>
 #include <user32/regcontrol.h>
 
@@ -901,41 +902,40 @@
 
 
 /*
- * @unimplemented
- */
-UINT STDCALL
-GetWindowModuleFileName(HWND hwnd,
-			LPSTR lpszFileName,
-			UINT cchFileNameMax)
-{
-  UNIMPLEMENTED;
-  return 0;
-}
-
-
-/*
- * @unimplemented
+ * @implemented
  */
 UINT STDCALL
 GetWindowModuleFileNameA(HWND hwnd,
 			 LPSTR lpszFileName,
 			 UINT cchFileNameMax)
 {
-  UNIMPLEMENTED;
-  return 0;
+  HINSTANCE hWndInst;
+  
+  if(!(hWndInst = NtUserGetWindowInstance(hwnd)))
+  {
+    return 0;
+  }
+  
+  return GetModuleFileNameA(hWndInst, lpszFileName, cchFileNameMax);
 }
 
 
 /*
- * @unimplemented
+ * @implemented
  */
 UINT STDCALL
 GetWindowModuleFileNameW(HWND hwnd,
 			 LPWSTR lpszFileName,
 			 UINT cchFileNameMax)
 {
-  UNIMPLEMENTED;
-  return 0;
+  HINSTANCE hWndInst;
+  
+  if(!(hWndInst = NtUserGetWindowInstance(hwnd)))
+  {
+    return 0;
+  }
+  
+  return GetModuleFileNameW(hWndInst, lpszFileName, cchFileNameMax);
 }
 
 

reactos/subsys/win32k/ntuser
misc.c 1.57 -> 1.58
diff -u -r1.57 -r1.58
--- misc.c	2 Apr 2004 21:03:25 -0000	1.57
+++ misc.c	2 Apr 2004 22:16:09 -0000	1.58
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.57 2004/04/02 21:03:25 weiden Exp $
+/* $Id: misc.c,v 1.58 2004/04/02 22:16:09 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -169,6 +169,17 @@
     case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
       return (DWORD)IntEnumClipboardFormats((UINT)Param);
     
+    case ONEPARAM_ROUTINE_GETWINDOWINSTANCE:
+      if(!(WindowObject = IntGetWindowObject((HWND)Param)))
+      {
+        SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
+        return FALSE;
+      }
+      
+      Result = (DWORD)WindowObject->Instance;
+      IntReleaseWindowObject(WindowObject);
+      return Result;
+    
     case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO:
       return (DWORD)MsqSetMessageExtraInfo((LPARAM)Param);
   }
CVSspam 0.2.8