mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
implemented GetWindowModuleFileName()
svn path=/trunk/; revision=8955
This commit is contained in:
parent
1c5f3e5775
commit
bb7b8e638e
5 changed files with 37 additions and 22 deletions
|
@ -171,6 +171,7 @@ NtUserCallNoParam(
|
|||
#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
|
||||
|
|
|
@ -85,6 +85,9 @@ void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
|
|||
#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);
|
||||
|
|
|
@ -372,7 +372,7 @@ GetWindowDC=GetWindowDC@4
|
|||
GetWindowInfo=GetWindowInfo@8
|
||||
GetWindowLongA=GetWindowLongA@8
|
||||
GetWindowLongW=GetWindowLongW@8
|
||||
GetWindowModuleFileName=GetWindowModuleFileName@12
|
||||
GetWindowModuleFileName=GetWindowModuleFileNameA@12
|
||||
GetWindowModuleFileNameA=GetWindowModuleFileNameA@12
|
||||
GetWindowModuleFileNameW=GetWindowModuleFileNameW@12
|
||||
GetWindowPlacement=GetWindowPlacement@8
|
||||
|
|
|
@ -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 @@ GetWindowInfo(HWND hwnd,
|
|||
|
||||
|
||||
/*
|
||||
* @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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 @@ NtUserCallOneParam(
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue