mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
More user work
svn path=/trunk/; revision=2567
This commit is contained in:
parent
c4a09186d3
commit
8dff4a88dc
20 changed files with 874 additions and 890 deletions
|
@ -1,5 +1,5 @@
|
|||
|
||||
/* $Id: rw.c,v 1.36 2002/01/15 21:54:51 hbirr Exp $
|
||||
/* $Id: rw.c,v 1.37 2002/01/27 01:11:23 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -309,6 +309,7 @@ VfatReadFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
ULONG TempLength;
|
||||
LARGE_INTEGER FileOffset;
|
||||
IO_STATUS_BLOCK IoStatus;
|
||||
ULONG BytesDone;
|
||||
|
||||
/* PRECONDITION */
|
||||
assert (DeviceExt != NULL);
|
||||
|
@ -325,7 +326,7 @@ VfatReadFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
Ccb = (PVFATCCB)FileObject->FsContext2;
|
||||
Fcb = Ccb->pFcb;
|
||||
|
||||
// Is this a read of the FAT ?
|
||||
/* Is this a read of the FAT? */
|
||||
if (Fcb->Flags & FCB_IS_FAT)
|
||||
{
|
||||
if (!NoCache)
|
||||
|
@ -333,7 +334,8 @@ VfatReadFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
DbgPrint ("Cached FAT read outside from VFATFS.SYS\n");
|
||||
KeBugCheck (0);
|
||||
}
|
||||
if (ReadOffset >= Fcb->RFCB.FileSize.QuadPart || ReadOffset % BLOCKSIZE != 0 || Length % BLOCKSIZE != 0)
|
||||
if (ReadOffset >= Fcb->RFCB.FileSize.QuadPart ||
|
||||
ReadOffset % BLOCKSIZE != 0 || Length % BLOCKSIZE != 0)
|
||||
{
|
||||
DbgPrint ("Start or end of FAT read is not on a sector boundary\n");
|
||||
KeBugCheck (0);
|
||||
|
@ -344,7 +346,8 @@ VfatReadFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
}
|
||||
|
||||
Status = VfatReadSectors(DeviceExt->StorageDevice,
|
||||
DeviceExt->FATStart + ReadOffset / BLOCKSIZE, Length / BLOCKSIZE, Buffer);
|
||||
DeviceExt->FATStart + ReadOffset / BLOCKSIZE,
|
||||
Length / BLOCKSIZE, Buffer);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
*LengthRead = Length;
|
||||
|
@ -359,7 +362,8 @@ VfatReadFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
/*
|
||||
* Find the first cluster
|
||||
*/
|
||||
FirstCluster = CurrentCluster = vfatDirEntryGetFirstCluster (DeviceExt, &Fcb->entry);
|
||||
FirstCluster = CurrentCluster =
|
||||
vfatDirEntryGetFirstCluster (DeviceExt, &Fcb->entry);
|
||||
|
||||
/*
|
||||
* Truncate the read if necessary
|
||||
|
@ -378,14 +382,14 @@ VfatReadFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
|
||||
if (FirstCluster == 1)
|
||||
{
|
||||
// root directory of FAT12 od FAT16
|
||||
/* root directory of FAT12 or FAT16 */
|
||||
if (ReadOffset + Length > DeviceExt->rootDirectorySectors * BLOCKSIZE)
|
||||
{
|
||||
Length = DeviceExt->rootDirectorySectors * BLOCKSIZE - ReadOffset;
|
||||
}
|
||||
}
|
||||
|
||||
// using the Cc-interface if possible
|
||||
/* Using the Cc-interface if possible. */
|
||||
if (!NoCache)
|
||||
{
|
||||
FileOffset.QuadPart = ReadOffset;
|
||||
|
@ -417,11 +421,13 @@ VfatReadFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
*/
|
||||
if ((ReadOffset % DeviceExt->BytesPerCluster) != 0 )
|
||||
{
|
||||
TempLength = min (Length, DeviceExt->BytesPerCluster - (ReadOffset % DeviceExt->BytesPerCluster));
|
||||
TempLength = min (Length, DeviceExt->BytesPerCluster -
|
||||
(ReadOffset % DeviceExt->BytesPerCluster));
|
||||
Ccb->LastCluster = CurrentCluster;
|
||||
Ccb->LastOffset = ROUND_DOWN(ReadOffset, DeviceExt->BytesPerCluster);
|
||||
Status = VfatReadCluster(DeviceExt, Fcb, FirstCluster, &CurrentCluster,
|
||||
Buffer, ReadOffset % DeviceExt->BytesPerCluster,
|
||||
Buffer,
|
||||
ReadOffset % DeviceExt->BytesPerCluster,
|
||||
TempLength);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -432,23 +438,32 @@ VfatReadFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
}
|
||||
}
|
||||
|
||||
while (Length >= DeviceExt->BytesPerCluster && CurrentCluster != 0xffffffff && NT_SUCCESS(Status))
|
||||
while (Length >= DeviceExt->BytesPerCluster &&
|
||||
CurrentCluster != 0xffffffff && NT_SUCCESS(Status))
|
||||
{
|
||||
StartCluster = CurrentCluster;
|
||||
ClusterCount = 0;
|
||||
// search for continous clusters
|
||||
BytesDone = 0;
|
||||
/* Search for continous clusters. */
|
||||
do
|
||||
{
|
||||
ClusterCount++;
|
||||
Status = NextCluster(DeviceExt, Fcb, FirstCluster, &CurrentCluster, FALSE);
|
||||
BytesDone += DeviceExt->BytesPerCluster;
|
||||
Status = NextCluster(DeviceExt, Fcb, FirstCluster, &CurrentCluster,
|
||||
FALSE);
|
||||
}
|
||||
while (StartCluster + ClusterCount == CurrentCluster && NT_SUCCESS(Status) &&
|
||||
Length - ClusterCount * DeviceExt->BytesPerCluster >= DeviceExt->BytesPerCluster);
|
||||
DPRINT("Count %d, Start %x Next %x\n", ClusterCount, StartCluster, CurrentCluster);
|
||||
Ccb->LastCluster = StartCluster + (ClusterCount - 1);
|
||||
Ccb->LastOffset = ReadOffset + (ClusterCount - 1) * DeviceExt->BytesPerCluster;
|
||||
while (StartCluster + ClusterCount == CurrentCluster &&
|
||||
NT_SUCCESS(Status) &&
|
||||
Length - BytesDone >= DeviceExt->BytesPerCluster);
|
||||
|
||||
Status = VfatRawReadCluster(DeviceExt, FirstCluster, Buffer, StartCluster, ClusterCount);
|
||||
DPRINT("Count %d, Start %x Next %x\n", ClusterCount, StartCluster,
|
||||
CurrentCluster);
|
||||
Ccb->LastCluster = StartCluster + (ClusterCount - 1);
|
||||
Ccb->LastOffset = ReadOffset +
|
||||
(ClusterCount - 1) * DeviceExt->BytesPerCluster;
|
||||
|
||||
Status = VfatRawReadCluster(DeviceExt, FirstCluster, Buffer,
|
||||
StartCluster, ClusterCount);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
ClusterCount *= DeviceExt->BytesPerCluster;
|
||||
|
@ -881,7 +896,8 @@ NTSTATUS vfatExtendSpace (PDEVICE_EXTENSION pDeviceExt, PFILE_OBJECT pFileObject
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS VfatRead(PVFAT_IRP_CONTEXT IrpContext)
|
||||
NTSTATUS
|
||||
VfatRead(PVFAT_IRP_CONTEXT IrpContext)
|
||||
{
|
||||
PVFATFCB Fcb;
|
||||
PVFATCCB Ccb;
|
||||
|
@ -900,14 +916,16 @@ NTSTATUS VfatRead(PVFAT_IRP_CONTEXT IrpContext)
|
|||
|
||||
if (IrpContext->Irp->Flags & IRP_PAGING_IO)
|
||||
{
|
||||
if (!ExAcquireResourceSharedLite(&Fcb->PagingIoResource, IrpContext->Flags & IRPCONTEXT_CANWAIT))
|
||||
if (!ExAcquireResourceSharedLite(&Fcb->PagingIoResource,
|
||||
IrpContext->Flags & IRPCONTEXT_CANWAIT))
|
||||
{
|
||||
return VfatQueueRequest (IrpContext);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ExAcquireResourceSharedLite(&Fcb->MainResource, IrpContext->Flags & IRPCONTEXT_CANWAIT))
|
||||
if (!ExAcquireResourceSharedLite(&Fcb->MainResource,
|
||||
IrpContext->Flags & IRPCONTEXT_CANWAIT))
|
||||
{
|
||||
return VfatQueueRequest (IrpContext);
|
||||
}
|
||||
|
@ -918,16 +936,20 @@ NTSTATUS VfatRead(PVFAT_IRP_CONTEXT IrpContext)
|
|||
Buffer = MmGetSystemAddressForMdl (IrpContext->Irp->MdlAddress);
|
||||
|
||||
/* fail if file is a directory and no paged read */
|
||||
if (Fcb->entry.Attrib & FILE_ATTRIBUTE_DIRECTORY && !(IrpContext->Irp->Flags & IRP_PAGING_IO))
|
||||
if (Fcb->entry.Attrib & FILE_ATTRIBUTE_DIRECTORY &&
|
||||
!(IrpContext->Irp->Flags & IRP_PAGING_IO))
|
||||
{
|
||||
Status = STATUS_FILE_IS_A_DIRECTORY;
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOLEAN NoCache;
|
||||
NoCache = IrpContext->FileObject->Flags & FO_NO_INTERMEDIATE_BUFFERING
|
||||
|| IrpContext->Irp->Flags & IRP_PAGING_IO;
|
||||
Status = VfatReadFile (IrpContext->DeviceExt, IrpContext->FileObject,
|
||||
Buffer, ReadLength, ReadOffset.u.LowPart, &ReturnedReadLength,
|
||||
IrpContext->FileObject->Flags & FO_NO_INTERMEDIATE_BUFFERING
|
||||
|| IrpContext->Irp->Flags & IRP_PAGING_IO);
|
||||
Buffer, ReadLength, ReadOffset.u.LowPart,
|
||||
&ReturnedReadLength,
|
||||
NoCache);
|
||||
}
|
||||
|
||||
if (IrpContext->Irp->Flags & IRP_PAGING_IO)
|
||||
|
@ -941,9 +963,11 @@ NTSTATUS VfatRead(PVFAT_IRP_CONTEXT IrpContext)
|
|||
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
if (IrpContext->FileObject->Flags & FO_SYNCHRONOUS_IO && !(IrpContext->Irp->Flags & IRP_PAGING_IO))
|
||||
if (IrpContext->FileObject->Flags & FO_SYNCHRONOUS_IO &&
|
||||
!(IrpContext->Irp->Flags & IRP_PAGING_IO))
|
||||
{
|
||||
IrpContext->FileObject->CurrentByteOffset.QuadPart = ReadOffset.QuadPart + ReturnedReadLength;
|
||||
IrpContext->FileObject->CurrentByteOffset.QuadPart =
|
||||
ReadOffset.QuadPart + ReturnedReadLength;
|
||||
}
|
||||
IrpContext->Irp->IoStatus.Information = ReturnedReadLength;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: psfuncs.h,v 1.19 2002/01/26 21:22:48 dwelch Exp $
|
||||
/* $Id: psfuncs.h,v 1.20 2002/01/27 01:11:22 dwelch Exp $
|
||||
*/
|
||||
#ifndef _INCLUDE_DDK_PSFUNCS_H
|
||||
#define _INCLUDE_DDK_PSFUNCS_H
|
||||
|
@ -38,7 +38,8 @@ NTSTATUS STDCALL PsCreateSystemProcess(PHANDLE ProcessHandle,
|
|||
ACCESS_MASK DesiredAccess,
|
||||
POBJECT_ATTRIBUTES ObjectAttributes);
|
||||
|
||||
NTSTATUS STDCALL PsCreateWin32Process(PEPROCESS Process);
|
||||
NTSTATUS STDCALL PsCreateWin32Process(struct _EPROCESS* Process);
|
||||
NTSTATUS STDCALL PsCreateWin32Thread(struct _ETHREAD* Thread);
|
||||
|
||||
VOID STDCALL PsEstablishWin32Callouts(PVOID Param1,
|
||||
PVOID Param2,
|
||||
|
@ -70,8 +71,6 @@ BOOLEAN STDCALL PsGetVersion (PULONG MajorVersion OPTIONAL,
|
|||
PULONG BuildNumber OPTIONAL,
|
||||
PUNICODE_STRING CSDVersion OPTIONAL);
|
||||
|
||||
VOID STDCALL PsDispatchThread(ULONG NewThreadStatus);
|
||||
|
||||
LARGE_INTEGER STDCALL PsGetProcessExitTime(VOID);
|
||||
BOOLEAN STDCALL PsIsThreadTerminating(struct _ETHREAD* Thread);
|
||||
|
||||
|
|
23
reactos/include/napi/win32.h
Normal file
23
reactos/include/napi/win32.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef __INCLUDE_NAPI_WIN32_H
|
||||
#define __INCLUDE_NAPI_WIN32_H
|
||||
|
||||
typedef struct _W32THREAD
|
||||
{
|
||||
PVOID MessageQueue;
|
||||
} __attribute__((packed)) W32THREAD, *PW32THREAD;
|
||||
|
||||
typedef struct _W32PROCESS
|
||||
{
|
||||
FAST_MUTEX ClassListLock;
|
||||
LIST_ENTRY ClassListHead;
|
||||
FAST_MUTEX WindowListLock;
|
||||
LIST_ENTRY WindowListHead;
|
||||
struct _USER_HANDLE_TABLE* HandleTable;
|
||||
} W32PROCESS, *PW32PROCESS;
|
||||
|
||||
PW32THREAD STDCALL
|
||||
PsGetWin32Thread(VOID);
|
||||
PW32PROCESS STDCALL
|
||||
PsGetWin32Process(VOID);
|
||||
|
||||
#endif /* __INCLUDE_NAPI_WIN32_H */
|
19
reactos/include/user32/callback.h
Normal file
19
reactos/include/user32/callback.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef __INCLUDE_USER32_CALLBACK_H
|
||||
#define __INCLUDE_USER32_CALLBACK_H
|
||||
|
||||
#define USER32_CALLBACK_WINDOWPROC (0)
|
||||
#define USER32_CALLBACK_MAXIMUM (1)
|
||||
|
||||
typedef struct _WINDOWPROC_CALLBACK_ARGUMENTS
|
||||
{
|
||||
WNDPROC Proc;
|
||||
HWND Wnd;
|
||||
UINT Msg;
|
||||
WPARAM wParam;
|
||||
LPARAM lParam;
|
||||
} WINDOWPROC_CALLBACK_ARGUMENTS, *PWINDOWPROC_CALLBACK_ARGUMENTS;
|
||||
|
||||
NTSTATUS STDCALL
|
||||
User32CallWindowProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
|
||||
|
||||
#endif /* __INCLUDE_USER32_CALLBACK_H */
|
|
@ -2,5 +2,5 @@
|
|||
/sbin/modprobe loop
|
||||
echo "Installing to disk."
|
||||
mount -t vfat /mnt/hda3/bochs/10M.vga.dos /mnt/floppy -o loop,offset=8704,rw
|
||||
./install.sh /mnt/floppy
|
||||
cp -rv reactos/system32 /mnt/floppy/reactos
|
||||
umount /mnt/floppy
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <windows.h>
|
||||
#include <debug.h>
|
||||
#include <user32/callback.h>
|
||||
|
||||
#ifdef DBG
|
||||
|
||||
|
@ -21,6 +22,10 @@ Init(VOID)
|
|||
|
||||
ProcessHeap = RtlGetProcessHeap();
|
||||
|
||||
/* Set up the kernel callbacks. */
|
||||
NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_WINDOWPROC] =
|
||||
(PVOID)User32CallWindowProcFromKernel;
|
||||
|
||||
//ProcessWindowStation = CreateWindowStationW(L"WinStaName",0,GENERIC_ALL,NULL);
|
||||
//Desktop = CreateDesktopA(NULL,NULL,NULL,0,0,NULL);
|
||||
|
||||
|
@ -41,13 +46,10 @@ Cleanup(VOID)
|
|||
return Status;
|
||||
}
|
||||
|
||||
INT
|
||||
STDCALL
|
||||
DllMain(
|
||||
PVOID hinstDll,
|
||||
INT STDCALL
|
||||
DllMain(PVOID hinstDll,
|
||||
ULONG dwReason,
|
||||
PVOID reserved
|
||||
)
|
||||
PVOID reserved)
|
||||
{
|
||||
D(MAX_TRACE, ("hinstDll (0x%X) dwReason (0x%X)\n", hinstDll, dwReason));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: window.c,v 1.3 2002/01/13 22:52:07 dwelch Exp $
|
||||
/* $Id: window.c,v 1.4 2002/01/27 01:11:23 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -15,9 +15,27 @@
|
|||
#include <user32.h>
|
||||
#include <window.h>
|
||||
#include <debug.h>
|
||||
#include <user32/callback.h>
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS STDCALL
|
||||
User32CallWindowProcFromKernel(PVOID Arguments, ULONG ArgumentLength)
|
||||
{
|
||||
PWINDOWPROC_CALLBACK_ARGUMENTS CallbackArgs;
|
||||
LRESULT Result;
|
||||
|
||||
CallbackArgs = (PWINDOWPROC_CALLBACK_ARGUMENTS)Arguments;
|
||||
if (ArgumentLength != sizeof(WINDOWPROC_CALLBACK_ARGUMENTS))
|
||||
{
|
||||
return(STATUS_INFO_LENGTH_MISMATCH);
|
||||
}
|
||||
Result = CallbackArgs->Proc(CallbackArgs->Wnd, CallbackArgs->Msg,
|
||||
CallbackArgs->wParam, CallbackArgs->lParam);
|
||||
ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS);
|
||||
/* Doesn't return. */
|
||||
}
|
||||
|
||||
WINBOOL STDCALL
|
||||
AdjustWindowRect(LPRECT lpRect,
|
||||
DWORD dwStyle,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: ps.h,v 1.29 2002/01/26 21:21:02 dwelch Exp $
|
||||
/* $Id: ps.h,v 1.30 2002/01/27 01:11:23 dwelch Exp $
|
||||
*
|
||||
* FILE: ntoskrnl/ke/kthread.c
|
||||
* PURPOSE: Process manager definitions
|
||||
|
@ -585,6 +585,9 @@ PiTimeoutThread(struct _KDPC *dpc,
|
|||
PVOID arg1,
|
||||
PVOID arg2);
|
||||
|
||||
VOID STDCALL
|
||||
PsDispatchThread(ULONG NewThreadStatus);
|
||||
|
||||
#endif /* ASSEMBLER */
|
||||
|
||||
#endif /* __INCLUDE_INTERNAL_PS_H */
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: trap.s,v 1.11 2001/09/24 00:51:17 chorns Exp $
|
||||
/* $Id: trap.s,v 1.12 2002/01/27 01:11:23 dwelch Exp $
|
||||
*
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: ntoskrnl/ke/i386/trap.s
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntoskrnl.def,v 1.125 2002/01/13 22:52:07 dwelch Exp $
|
||||
; $Id: ntoskrnl.def,v 1.126 2002/01/27 01:11:23 dwelch Exp $
|
||||
;
|
||||
; reactos/ntoskrnl/ntoskrnl.def
|
||||
;
|
||||
|
@ -551,6 +551,7 @@ NtSetSecurityObject@12
|
|||
NtSetSystemTime@8
|
||||
NtUnlockFile@20
|
||||
NtVdmControl@8
|
||||
NtW32Call@20
|
||||
NtWaitForSingleObject@12
|
||||
NtWriteFile@36
|
||||
;ObAssignSecurity@16
|
||||
|
@ -593,9 +594,12 @@ PsAssignImpersonationToken@8
|
|||
;PsChargePoolQuota@12
|
||||
PsCreateSystemProcess@12
|
||||
PsCreateSystemThread@28
|
||||
PsCreateWin32Thread@4
|
||||
PsCreateWin32Process@4
|
||||
PsGetWin32Thread@0
|
||||
PsGetWin32Process@0
|
||||
PsEstablishWin32Callouts@24
|
||||
PsGetCurrentProcess@0
|
||||
PsGetCurrentProcessId@0
|
||||
PsGetCurrentThreadId@0
|
||||
PsGetCurrentThread@0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntoskrnl.edf,v 1.111 2002/01/13 22:52:07 dwelch Exp $
|
||||
; $Id: ntoskrnl.edf,v 1.112 2002/01/27 01:11:23 dwelch Exp $
|
||||
;
|
||||
; reactos/ntoskrnl/ntoskrnl.def
|
||||
;
|
||||
|
@ -551,6 +551,7 @@ NtSetSecurityObject=NtSetSecurityObject@12
|
|||
NtSetSystemTime=NtSetSystemTime@8
|
||||
NtUnlockFile=NtUnlockFile@20
|
||||
NtVdmControl=NtVdmControl@8
|
||||
NtW32Call=NtW32Call@20
|
||||
NtWaitForSingleObject=NtWaitForSingleObject@12
|
||||
NtWriteFile=NtWriteFile@36
|
||||
;ObAssignSecurity=ObAssignSecurity@16
|
||||
|
@ -593,9 +594,12 @@ PsAssignImpersonationToken=PsAssignImpersonationToken@8
|
|||
;PsChargePoolQuota=PsChargePoolQuota@12
|
||||
PsCreateSystemProcess=PsCreateSystemProcess@12
|
||||
PsCreateSystemThread=PsCreateSystemThread@28
|
||||
PsCreateWin32Thread=PsCreateWin32Thread@4
|
||||
PsCreateWin32Process=PsCreateWin32Process@4
|
||||
PsGetWin32Thread=PsGetWin32Thread@0
|
||||
PsGetWin32Process=PsGetWin32Process@0
|
||||
PsEstablishWin32Callouts=PsEstablishWin32Callouts@24
|
||||
PsGetCurrentProcess=PsGetCurrentProcess@0
|
||||
PsGetCurrentProcessId=PsGetCurrentProcessId@0
|
||||
PsGetCurrentThreadId=PsGetCurrentThreadId@0
|
||||
PsGetCurrentThread=PsGetCurrentThread@0
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <napi/win32.h>
|
||||
|
||||
#define IS_ATOM(x) \
|
||||
(((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
|
||||
|
||||
|
||||
typedef struct _WNDCLASS_OBJECT
|
||||
{
|
||||
WNDCLASSEX Class;
|
||||
|
@ -15,7 +15,6 @@ typedef struct _WNDCLASS_OBJECT
|
|||
LIST_ENTRY ListEntry;
|
||||
} WNDCLASS_OBJECT, *PWNDCLASS_OBJECT;
|
||||
|
||||
|
||||
NTSTATUS
|
||||
InitClassImpl(VOID);
|
||||
|
||||
|
@ -23,18 +22,16 @@ NTSTATUS
|
|||
CleanupClassImpl(VOID);
|
||||
|
||||
NTSTATUS
|
||||
ClassReferenceClassByName(
|
||||
ClassReferenceClassByName(PW32PROCESS Process,
|
||||
PWNDCLASS_OBJECT *Class,
|
||||
LPWSTR ClassName);
|
||||
|
||||
NTSTATUS
|
||||
ClassReferenceClassByAtom(
|
||||
PWNDCLASS_OBJECT *Class,
|
||||
ClassReferenceClassByAtom(PWNDCLASS_OBJECT *Class,
|
||||
RTL_ATOM ClassAtom);
|
||||
|
||||
NTSTATUS
|
||||
ClassReferenceClassByNameOrAtom(
|
||||
PWNDCLASS_OBJECT *Class,
|
||||
ClassReferenceClassByNameOrAtom(PWNDCLASS_OBJECT *Class,
|
||||
LPWSTR ClassNameOrAtom);
|
||||
|
||||
#endif /* __WIN32K_CLASS_H */
|
||||
|
|
|
@ -20,7 +20,6 @@ typedef struct _USER_OBJECT_HEADER
|
|||
CSHORT Size;
|
||||
} USER_OBJECT_HEADER, *PUSER_OBJECT_HEADER;
|
||||
|
||||
|
||||
typedef struct _USER_HANDLE
|
||||
{
|
||||
PVOID ObjectBody;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: dllmain.c,v 1.22 2002/01/13 22:52:08 dwelch Exp $
|
||||
/* $Id: dllmain.c,v 1.23 2002/01/27 01:11:24 dwelch Exp $
|
||||
*
|
||||
* Entry Point for win32k.sys
|
||||
*/
|
||||
|
@ -10,6 +10,7 @@
|
|||
#include <ddk/winddi.h>
|
||||
#include <ddk/service.h>
|
||||
|
||||
#include <napi/win32.h>
|
||||
#include <win32k/win32k.h>
|
||||
|
||||
#include <include/winsta.h>
|
||||
|
@ -50,6 +51,11 @@ DllMain (
|
|||
|
||||
DbgPrint("System services added successfully!\n");
|
||||
|
||||
/*
|
||||
* Register our per-process and per-thread structures.
|
||||
*/
|
||||
PsEstablishWin32Callouts(0, 0, 0, 0, sizeof(W32THREAD), sizeof(W32PROCESS));
|
||||
|
||||
Status = InitWindowStationImpl();
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.41 2002/01/13 22:52:08 dwelch Exp $
|
||||
# $Id: makefile,v 1.42 2002/01/27 01:11:24 dwelch Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
|
@ -24,7 +24,7 @@ LDR_OBJECTS = ldr/loader.o
|
|||
NTUSER_OBJECTS = ntuser/class.o ntuser/guicheck.o ntuser/hook.o \
|
||||
ntuser/message.o ntuser/msgqueue.o ntuser/stubs.o \
|
||||
ntuser/userobj.o ntuser/window.o ntuser/winsta.o \
|
||||
ntuser/input.o
|
||||
ntuser/input.o ntuser/keyboard.o ntuser/callback.o
|
||||
OBJECTS_OBJECTS = objects/bitmaps.o objects/brush.o objects/cliprgn.o \
|
||||
objects/color.o objects/coord.o objects/dc.o \
|
||||
objects/fillshap.o objects/gdiobj.o objects/icm.o \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: object.c,v 1.1 2001/06/12 17:51:51 chorns Exp $
|
||||
/* $Id: object.c,v 1.2 2002/01/27 01:11:24 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,42 +9,42 @@
|
|||
* UPDATE HISTORY:
|
||||
* 06-06-2001 CSH Ported kernel object manager
|
||||
*/
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <include/object.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
PVOID
|
||||
HEADER_TO_BODY(
|
||||
PUSER_OBJECT_HEADER ObjectHeader)
|
||||
HEADER_TO_BODY(PUSER_OBJECT_HEADER ObjectHeader)
|
||||
{
|
||||
return (((PUSER_OBJECT_HEADER)ObjectHeader) + 1);
|
||||
}
|
||||
|
||||
PUSER_OBJECT_HEADER BODY_TO_HEADER(
|
||||
PVOID ObjectBody)
|
||||
PUSER_OBJECT_HEADER
|
||||
BODY_TO_HEADER(PVOID ObjectBody)
|
||||
{
|
||||
return (((PUSER_OBJECT_HEADER)ObjectBody) - 1);
|
||||
}
|
||||
|
||||
static VOID
|
||||
ObmpLockHandleTable(
|
||||
PUSER_HANDLE_TABLE HandleTable)
|
||||
VOID STATIC
|
||||
ObmpLockHandleTable(PUSER_HANDLE_TABLE HandleTable)
|
||||
{
|
||||
// ExAcquireFastMutex(HandleTable->ListLock);
|
||||
ExAcquireFastMutex(HandleTable->ListLock);
|
||||
}
|
||||
|
||||
static VOID
|
||||
ObmpUnlockHandleTable(
|
||||
PUSER_HANDLE_TABLE HandleTable)
|
||||
VOID STATIC
|
||||
ObmpUnlockHandleTable(PUSER_HANDLE_TABLE HandleTable)
|
||||
{
|
||||
// ExReleaseFastMutex(AtomTable->ListLock);
|
||||
ExReleaseFastMutex(HandleTable->ListLock);
|
||||
}
|
||||
|
||||
VOID
|
||||
ObmpPerformRetentionChecks(
|
||||
PUSER_OBJECT_HEADER ObjectHeader)
|
||||
ObmpPerformRetentionChecks(PUSER_OBJECT_HEADER ObjectHeader)
|
||||
{
|
||||
if (ObjectHeader->RefCount < 0)
|
||||
{
|
||||
|
@ -65,8 +65,7 @@ ObmpPerformRetentionChecks(
|
|||
}
|
||||
|
||||
PUSER_HANDLE
|
||||
ObmpGetObjectByHandle(
|
||||
PUSER_HANDLE_TABLE HandleTable,
|
||||
ObmpGetObjectByHandle(PUSER_HANDLE_TABLE HandleTable,
|
||||
HANDLE Handle)
|
||||
/*
|
||||
* FUNCTION: Get the data structure for a handle
|
||||
|
@ -100,8 +99,7 @@ ObmpGetObjectByHandle(
|
|||
}
|
||||
|
||||
VOID
|
||||
ObmpCloseAllHandles(
|
||||
PUSER_HANDLE_TABLE HandleTable)
|
||||
ObmpCloseAllHandles(PUSER_HANDLE_TABLE HandleTable)
|
||||
{
|
||||
PLIST_ENTRY CurrentEntry;
|
||||
PUSER_HANDLE_BLOCK Current;
|
||||
|
@ -145,8 +143,7 @@ ObmpCloseAllHandles(
|
|||
}
|
||||
|
||||
VOID
|
||||
ObmpDeleteHandleTable(
|
||||
PUSER_HANDLE_TABLE HandleTable)
|
||||
ObmpDeleteHandleTable(PUSER_HANDLE_TABLE HandleTable)
|
||||
{
|
||||
PUSER_HANDLE_BLOCK Current;
|
||||
PLIST_ENTRY CurrentEntry;
|
||||
|
@ -168,8 +165,7 @@ ObmpDeleteHandleTable(
|
|||
}
|
||||
|
||||
PVOID
|
||||
ObmpDeleteHandle(
|
||||
PUSER_HANDLE_TABLE HandleTable,
|
||||
ObmpDeleteHandle(PUSER_HANDLE_TABLE HandleTable,
|
||||
HANDLE Handle)
|
||||
{
|
||||
PUSER_OBJECT_HEADER ObjectHeader;
|
||||
|
@ -201,8 +197,7 @@ ObmpDeleteHandle(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
ObmpInitializeObject(
|
||||
PUSER_HANDLE_TABLE HandleTable,
|
||||
ObmpInitializeObject(PUSER_HANDLE_TABLE HandleTable,
|
||||
PUSER_OBJECT_HEADER ObjectHeader,
|
||||
PHANDLE Handle,
|
||||
USER_OBJECT_TYPE ObjectType,
|
||||
|
@ -217,8 +212,7 @@ ObmpInitializeObject(
|
|||
|
||||
if (Handle != NULL)
|
||||
{
|
||||
Status = ObmCreateHandle(
|
||||
HandleTable,
|
||||
Status = ObmCreateHandle(HandleTable,
|
||||
HEADER_TO_BODY(ObjectHeader),
|
||||
Handle);
|
||||
}
|
||||
|
@ -228,8 +222,7 @@ ObmpInitializeObject(
|
|||
|
||||
|
||||
ULONG
|
||||
ObmGetReferenceCount(
|
||||
PVOID ObjectBody)
|
||||
ObmGetReferenceCount(PVOID ObjectBody)
|
||||
{
|
||||
PUSER_OBJECT_HEADER ObjectHeader = BODY_TO_HEADER(ObjectBody);
|
||||
|
||||
|
@ -237,8 +230,7 @@ ObmGetReferenceCount(
|
|||
}
|
||||
|
||||
ULONG
|
||||
ObmGetHandleCount(
|
||||
PVOID ObjectBody)
|
||||
ObmGetHandleCount(PVOID ObjectBody)
|
||||
{
|
||||
PUSER_OBJECT_HEADER ObjectHeader = BODY_TO_HEADER(ObjectBody);
|
||||
|
||||
|
@ -246,8 +238,7 @@ ObmGetHandleCount(
|
|||
}
|
||||
|
||||
VOID
|
||||
ObmReferenceObject(
|
||||
PVOID ObjectBody)
|
||||
ObmReferenceObject(PVOID ObjectBody)
|
||||
/*
|
||||
* FUNCTION: Increments a given object's reference count and performs
|
||||
* retention checks
|
||||
|
@ -270,8 +261,7 @@ ObmReferenceObject(
|
|||
}
|
||||
|
||||
VOID
|
||||
ObmDereferenceObject(
|
||||
PVOID ObjectBody)
|
||||
ObmDereferenceObject(PVOID ObjectBody)
|
||||
/*
|
||||
* FUNCTION: Decrements a given object's reference count and performs
|
||||
* retention checks
|
||||
|
@ -294,8 +284,7 @@ ObmDereferenceObject(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
ObmReferenceObjectByPointer(
|
||||
PVOID ObjectBody,
|
||||
ObmReferenceObjectByPointer(PVOID ObjectBody,
|
||||
USER_OBJECT_TYPE ObjectType)
|
||||
/*
|
||||
* FUNCTION: Increments the pointer reference count for a given object
|
||||
|
@ -320,8 +309,7 @@ ObmReferenceObjectByPointer(
|
|||
}
|
||||
|
||||
PVOID
|
||||
ObmCreateObject(
|
||||
PUSER_HANDLE_TABLE HandleTable,
|
||||
ObmCreateObject(PUSER_HANDLE_TABLE HandleTable,
|
||||
PHANDLE Handle,
|
||||
USER_OBJECT_TYPE ObjectType,
|
||||
ULONG ObjectSize)
|
||||
|
@ -330,8 +318,8 @@ ObmCreateObject(
|
|||
PVOID ObjectBody;
|
||||
DWORD Status;
|
||||
|
||||
ObjectHeader = (PUSER_OBJECT_HEADER)ExAllocatePool(
|
||||
NonPagedPool, ObjectSize + sizeof(USER_OBJECT_HEADER));
|
||||
ObjectHeader = (PUSER_OBJECT_HEADER)ExAllocatePool(NonPagedPool,
|
||||
ObjectSize + sizeof(USER_OBJECT_HEADER));
|
||||
if (!ObjectHeader)
|
||||
{
|
||||
return NULL;
|
||||
|
@ -341,8 +329,7 @@ ObmCreateObject(
|
|||
|
||||
RtlZeroMemory(ObjectBody, ObjectSize);
|
||||
|
||||
Status = ObmpInitializeObject(
|
||||
HandleTable,
|
||||
Status = ObmpInitializeObject(HandleTable,
|
||||
ObjectHeader,
|
||||
Handle,
|
||||
ObjectType,
|
||||
|
@ -358,8 +345,7 @@ ObmCreateObject(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
ObmCreateHandle(
|
||||
PUSER_HANDLE_TABLE HandleTable,
|
||||
ObmCreateHandle(PUSER_HANDLE_TABLE HandleTable,
|
||||
PVOID ObjectBody,
|
||||
PHANDLE HandleReturn)
|
||||
/*
|
||||
|
@ -375,7 +361,8 @@ ObmCreateHandle(
|
|||
ULONG Handle;
|
||||
ULONG i;
|
||||
|
||||
if (ObjectBody != NULL) {
|
||||
if (ObjectBody != NULL)
|
||||
{
|
||||
BODY_TO_HEADER(ObjectBody)->HandleCount++;
|
||||
}
|
||||
|
||||
|
@ -388,8 +375,8 @@ ObmCreateHandle(
|
|||
*/
|
||||
while (Current != &(HandleTable->ListHead))
|
||||
{
|
||||
PUSER_HANDLE_BLOCK Block = CONTAINING_RECORD(
|
||||
Current, USER_HANDLE_BLOCK, ListEntry);
|
||||
PUSER_HANDLE_BLOCK Block =
|
||||
CONTAINING_RECORD(Current, USER_HANDLE_BLOCK, ListEntry);
|
||||
|
||||
Handle = 1;
|
||||
for (i = 0; i < HANDLE_BLOCK_ENTRIES; i++)
|
||||
|
@ -410,8 +397,8 @@ ObmCreateHandle(
|
|||
/*
|
||||
* Add a new Handle block to the end of the list
|
||||
*/
|
||||
NewBlock = (PUSER_HANDLE_BLOCK)ExAllocatePool(
|
||||
NonPagedPool, sizeof(USER_HANDLE_BLOCK));
|
||||
NewBlock = (PUSER_HANDLE_BLOCK)ExAllocatePool(NonPagedPool,
|
||||
sizeof(USER_HANDLE_BLOCK));
|
||||
if (!NewBlock)
|
||||
{
|
||||
*HandleReturn = (PHANDLE)NULL;
|
||||
|
@ -428,8 +415,7 @@ ObmCreateHandle(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
ObmReferenceObjectByHandle(
|
||||
PUSER_HANDLE_TABLE HandleTable,
|
||||
ObmReferenceObjectByHandle(PUSER_HANDLE_TABLE HandleTable,
|
||||
HANDLE Handle,
|
||||
USER_OBJECT_TYPE ObjectType,
|
||||
PVOID* Object)
|
||||
|
@ -476,8 +462,7 @@ ObmReferenceObjectByHandle(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
ObmCloseHandle(
|
||||
PUSER_HANDLE_TABLE HandleTable,
|
||||
ObmCloseHandle(PUSER_HANDLE_TABLE HandleTable,
|
||||
HANDLE Handle)
|
||||
{
|
||||
PVOID ObjectBody;
|
||||
|
@ -493,18 +478,15 @@ ObmCloseHandle(
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
ObmInitializeHandleTable(
|
||||
PUSER_HANDLE_TABLE HandleTable)
|
||||
ObmInitializeHandleTable(PUSER_HANDLE_TABLE HandleTable)
|
||||
{
|
||||
InitializeListHead(&HandleTable->ListHead);
|
||||
//ExInitializeFastMutex(HandleTable->ListLock);
|
||||
ExInitializeFastMutex(HandleTable->ListLock);
|
||||
}
|
||||
|
||||
VOID
|
||||
ObmFreeHandleTable(
|
||||
PUSER_HANDLE_TABLE HandleTable)
|
||||
ObmFreeHandleTable(PUSER_HANDLE_TABLE HandleTable)
|
||||
{
|
||||
ObmpDeleteHandleTable(HandleTable);
|
||||
}
|
||||
|
@ -514,8 +496,8 @@ ObmCreateHandleTable(VOID)
|
|||
{
|
||||
PUSER_HANDLE_TABLE HandleTable;
|
||||
|
||||
HandleTable = (PUSER_HANDLE_TABLE)ExAllocatePool(
|
||||
NonPagedPool, sizeof(USER_HANDLE_TABLE));
|
||||
HandleTable = (PUSER_HANDLE_TABLE)ExAllocatePool(NonPagedPool,
|
||||
sizeof(USER_HANDLE_TABLE));
|
||||
if (!HandleTable)
|
||||
{
|
||||
return NULL;
|
||||
|
@ -527,8 +509,7 @@ ObmCreateHandleTable(VOID)
|
|||
}
|
||||
|
||||
VOID
|
||||
ObmDestroyHandleTable(
|
||||
PUSER_HANDLE_TABLE HandleTable)
|
||||
ObmDestroyHandleTable(PUSER_HANDLE_TABLE HandleTable)
|
||||
{
|
||||
ObmFreeHandleTable(HandleTable);
|
||||
ExFreePool(HandleTable);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: class.c,v 1.3 2002/01/13 22:52:08 dwelch Exp $
|
||||
/* $Id: class.c,v 1.4 2002/01/27 01:11:24 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -12,28 +12,20 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <win32k/win32k.h>
|
||||
#include <win32k/userobj.h>
|
||||
#include <napi/win32.h>
|
||||
#include <include/class.h>
|
||||
#include <include/error.h>
|
||||
#include <include/winsta.h>
|
||||
#include <include/object.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
/* List of system classes */
|
||||
static LIST_ENTRY SystemClassListHead;
|
||||
static FAST_MUTEX SystemClassListLock;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
InitClassImpl(VOID)
|
||||
{
|
||||
ExInitializeFastMutex(&SystemClassListLock);
|
||||
InitializeListHead(&SystemClassListHead);
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
|
@ -44,85 +36,35 @@ CleanupClassImpl(VOID)
|
|||
}
|
||||
|
||||
|
||||
DWORD
|
||||
CliFindClassByName(PWNDCLASS_OBJECT* Class,
|
||||
LPWSTR ClassName,
|
||||
PLIST_ENTRY ListHead)
|
||||
NTSTATUS
|
||||
ClassReferenceClassByName(PW32PROCESS Process,
|
||||
PWNDCLASS_OBJECT* Class,
|
||||
LPWSTR ClassName)
|
||||
{
|
||||
PWNDCLASS_OBJECT Current;
|
||||
PLIST_ENTRY CurrentEntry;
|
||||
|
||||
ExAcquireFastMutexUnsafe (&SystemClassListLock);
|
||||
CurrentEntry = ListHead->Flink;
|
||||
while (CurrentEntry != ListHead)
|
||||
ExAcquireFastMutexUnsafe (&Process->ClassListLock);
|
||||
CurrentEntry = Process->ClassListHead.Flink;
|
||||
while (CurrentEntry != &Process->ClassListHead)
|
||||
{
|
||||
Current = CONTAINING_RECORD(CurrentEntry, WNDCLASS_OBJECT, ListEntry);
|
||||
|
||||
if (_wcsicmp(ClassName, Current->Class.lpszClassName) == 0)
|
||||
{
|
||||
*Class = Current;
|
||||
ExReleaseFastMutexUnsafe (&SystemClassListLock);
|
||||
ObmReferenceObject(Current);
|
||||
ExReleaseFastMutexUnsafe (&Process->ClassListLock);
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
CurrentEntry = CurrentEntry->Flink;
|
||||
}
|
||||
ExReleaseFastMutexUnsafe (&SystemClassListLock);
|
||||
ExReleaseFastMutexUnsafe (&Process->ClassListLock);
|
||||
|
||||
return(STATUS_NOT_FOUND);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
CliReferenceClassByNameWinSta(PWINSTATION_OBJECT WinStaObject,
|
||||
PWNDCLASS_OBJECT *Class,
|
||||
LPWSTR ClassName)
|
||||
{
|
||||
/*
|
||||
if (NT_SUCCESS(CliFindClassByName(Class, ClassName, &LocalClassListHead)))
|
||||
{
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (NT_SUCCESS(CliFindClassByName(Class, ClassName, &GlobalClassListHead)))
|
||||
{
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
*/
|
||||
return(CliFindClassByName(Class, ClassName, &SystemClassListHead));
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
ClassReferenceClassByName(PWNDCLASS_OBJECT *Class,
|
||||
LPWSTR ClassName)
|
||||
{
|
||||
PWINSTATION_OBJECT WinStaObject;
|
||||
NTSTATUS Status;
|
||||
|
||||
if (!ClassName)
|
||||
{
|
||||
return(STATUS_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
Status = ValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
|
||||
KernelMode,
|
||||
0,
|
||||
&WinStaObject);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("Validation of window station handle (0x%X) failed\n",
|
||||
PROCESS_WINDOW_STATION());
|
||||
return(STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
|
||||
Status = CliReferenceClassByNameWinSta(WinStaObject,
|
||||
Class,
|
||||
ClassName);
|
||||
|
||||
ObDereferenceObject(WinStaObject);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
ClassReferenceClassByAtom(PWNDCLASS_OBJECT *Class,
|
||||
RTL_ATOM ClassAtom)
|
||||
|
@ -156,7 +98,7 @@ ClassReferenceClassByAtom(PWNDCLASS_OBJECT *Class,
|
|||
&ClassName[0],
|
||||
&ClassNameLength);
|
||||
|
||||
Status = CliReferenceClassByNameWinSta(WinStaObject,
|
||||
Status = ClassReferenceClassByName(PsGetWin32Process(),
|
||||
Class,
|
||||
&ClassName[0]);
|
||||
|
||||
|
@ -178,7 +120,8 @@ ClassReferenceClassByNameOrAtom(PWNDCLASS_OBJECT *Class,
|
|||
}
|
||||
else
|
||||
{
|
||||
Status = ClassReferenceClassByName(Class, ClassNameOrAtom);
|
||||
Status = ClassReferenceClassByName(PsGetWin32Process(), Class,
|
||||
ClassNameOrAtom);
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
@ -190,11 +133,11 @@ ClassReferenceClassByNameOrAtom(PWNDCLASS_OBJECT *Class,
|
|||
}
|
||||
|
||||
DWORD STDCALL
|
||||
NtUserGetClassInfo(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3,
|
||||
DWORD Unknown4)
|
||||
NtUserGetClassInfo(IN LPWSTR ClassName,
|
||||
IN ULONG InfoClass,
|
||||
OUT PVOID Info,
|
||||
IN ULONG InfoLength,
|
||||
OUT PULONG ReturnedLength)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
|
||||
|
@ -220,6 +163,13 @@ NtUserGetWOWClass(DWORD Unknown0,
|
|||
return(0);
|
||||
}
|
||||
|
||||
RTL_ATOM STDCALL
|
||||
NtUserRegisterClassExWOW(LPWNDCLASSEX lpwcx,
|
||||
BOOL bUnicodeClass,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3,
|
||||
DWORD Unknown4,
|
||||
DWORD Unknown5)
|
||||
/*
|
||||
* FUNCTION:
|
||||
* Registers a new class with the window manager
|
||||
|
@ -230,13 +180,6 @@ NtUserGetWOWClass(DWORD Unknown0,
|
|||
* RETURNS:
|
||||
* Atom identifying the new class
|
||||
*/
|
||||
RTL_ATOM STDCALL
|
||||
NtUserRegisterClassExWOW(LPWNDCLASSEX lpwcx,
|
||||
BOOL bUnicodeClass,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3,
|
||||
DWORD Unknown4,
|
||||
DWORD Unknown5)
|
||||
{
|
||||
PWINSTATION_OBJECT WinStaObject;
|
||||
PWNDCLASS_OBJECT ClassObject;
|
||||
|
@ -275,7 +218,7 @@ NtUserRegisterClassExWOW(LPWNDCLASSEX lpwcx,
|
|||
objectSize = sizeof(WNDCLASS_OBJECT) +
|
||||
(lpwcx->lpszMenuName != 0 ? wcslen (lpwcx->lpszMenuName) + 1 : 0) +
|
||||
wcslen (lpwcx->lpszClassName) + 1;
|
||||
ClassObject = USEROBJ_AllocObject (objectSize, UO_CLASS_MAGIC);
|
||||
ClassObject = ObmCreateObject(NULL, NULL, otClass, objectSize);
|
||||
if (ClassObject == 0)
|
||||
{
|
||||
RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Atom);
|
||||
|
@ -297,16 +240,9 @@ NtUserRegisterClassExWOW(LPWNDCLASSEX lpwcx,
|
|||
}
|
||||
ClassObject->Class.lpszClassName = namePtr;
|
||||
wcscpy (namePtr, lpwcx->lpszClassName);
|
||||
|
||||
if (lpwcx->style & CS_GLOBALCLASS)
|
||||
{
|
||||
InsertTailList(&SystemClassListHead, &ClassObject->ListEntry);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: Put on local list */
|
||||
InsertTailList(&SystemClassListHead, &ClassObject->ListEntry);
|
||||
}
|
||||
ExAcquireFastMutex(&PsGetWin32Process()->ClassListLock);
|
||||
InsertTailList(&PsGetWin32Process()->ClassListHead, &ClassObject->ListEntry);
|
||||
ExReleaseFastMutex(&PsGetWin32Process()->ClassListLock);
|
||||
|
||||
ObDereferenceObject(WinStaObject);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: guicheck.c,v 1.3 2002/01/13 22:52:08 dwelch Exp $
|
||||
/* $Id: guicheck.c,v 1.4 2002/01/27 01:11:24 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -20,6 +20,8 @@
|
|||
#include <win32k/win32k.h>
|
||||
#include <include/guicheck.h>
|
||||
#include <include/msgqueue.h>
|
||||
#include <include/object.h>
|
||||
#include <napi/win32.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
@ -29,10 +31,22 @@
|
|||
VOID
|
||||
W32kGuiCheck(VOID)
|
||||
{
|
||||
if (PsGetWin32Thread()->MessageQueue != NULL)
|
||||
return;
|
||||
if (PsGetWin32Process() == NULL)
|
||||
{
|
||||
PsCreateWin32Process(PsGetCurrentProcess());
|
||||
|
||||
InitializeListHead(&PsGetWin32Process()->ClassListHead);
|
||||
ExInitializeFastMutex(&PsGetWin32Process()->ClassListLock);
|
||||
InitializeListHead(&PsGetWin32Process()->WindowListHead);
|
||||
ExInitializeFastMutex(&PsGetWin32Process()->WindowListLock);
|
||||
PsGetWin32Process()->HandleTable = ObmCreateHandleTable();
|
||||
}
|
||||
|
||||
if (PsGetWin32Thread() == NULL)
|
||||
{
|
||||
PsCreateWin32Thread(PsGetCurrentThread());
|
||||
PsGetWin32Thread()->MessageQueue = MsqCreateMessageQueue();
|
||||
}
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: message.c,v 1.3 2002/01/13 22:52:08 dwelch Exp $
|
||||
/* $Id: message.c,v 1.4 2002/01/27 01:11:24 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -20,6 +20,7 @@
|
|||
#include <include/error.h>
|
||||
#include <include/object.h>
|
||||
#include <include/winsta.h>
|
||||
#include <include/callback.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
@ -40,11 +41,43 @@ W32kCleanupMessageImpl(VOID)
|
|||
|
||||
|
||||
LRESULT STDCALL
|
||||
NtUserDispatchMessage(LPMSG lpmsg)
|
||||
NtUserDispatchMessage(LPMSG lpMsg)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
LRESULT Result;
|
||||
|
||||
return 0;
|
||||
/* Process timer messages. */
|
||||
if (lpMsg->message == WM_TIMER)
|
||||
{
|
||||
if (lpMsg->lParam)
|
||||
{
|
||||
/* FIXME: Call hooks. */
|
||||
|
||||
/* FIXME: Check for continuing validity of timer. */
|
||||
|
||||
return(W32kCallWindowProc((WNDPROC)lpMsg->lParam,
|
||||
lpMsg->hwnd,
|
||||
lpMsg->message,
|
||||
lpMsg->wParam,
|
||||
0 /* GetTickCount() */));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: Check for valid window handle, valid window and valid window
|
||||
* proc.
|
||||
*/
|
||||
|
||||
/* FIXME: Check for paint message. */
|
||||
|
||||
Result = W32kCallWindowProc(NULL /* WndProc */,
|
||||
lpMsg->hwnd,
|
||||
lpMsg->message,
|
||||
lpMsg->wParam,
|
||||
lpMsg->lParam);
|
||||
|
||||
/* FIXME: Check for paint message. */
|
||||
|
||||
return(Result);
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
|
@ -68,6 +101,7 @@ NtUserGetMessage(LPMSG lpMsg,
|
|||
PUSER_MESSAGE Message;
|
||||
NTSTATUS Status;
|
||||
|
||||
/* Initialize the thread's win32 state if necessary. */
|
||||
W32kGuiCheck();
|
||||
|
||||
ThreadQueue = (PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue;
|
||||
|
@ -211,15 +245,6 @@ NtUserSendNotifyMessage(HWND hWnd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
NtUserTranslateMessage(LPMSG lpMsg,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
NtUserWaitMessage(VOID)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: window.c,v 1.4 2002/01/13 22:52:08 dwelch Exp $
|
||||
/* $Id: window.c,v 1.5 2002/01/27 01:11:24 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -8,9 +8,11 @@
|
|||
* REVISION HISTORY:
|
||||
* 06-06-2001 CSH Created
|
||||
*/
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <win32k/win32k.h>
|
||||
#include <win32k/userobj.h>
|
||||
#include <include/object.h>
|
||||
#include <include/guicheck.h>
|
||||
#include <include/window.h>
|
||||
#include <include/class.h>
|
||||
|
@ -20,59 +22,44 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
|
||||
/* List of windows created by the process */
|
||||
static LIST_ENTRY WindowListHead;
|
||||
static FAST_MUTEX WindowListLock;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
InitWindowImpl(VOID)
|
||||
{
|
||||
ExInitializeFastMutex(&WindowListLock);
|
||||
InitializeListHead(&WindowListHead);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
CleanupWindowImpl(VOID)
|
||||
{
|
||||
//ExReleaseFastMutex(&WindowListLock);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserAlterWindowStyle(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserAlterWindowStyle(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
return(0);
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserChildWindowFromPointEx(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserChildWindowFromPointEx(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
return(0);
|
||||
}
|
||||
|
||||
HWND
|
||||
STDCALL
|
||||
NtUserCreateWindowEx(
|
||||
DWORD dwExStyle,
|
||||
HWND STDCALL
|
||||
NtUserCreateWindowEx(DWORD dwExStyle,
|
||||
PUNICODE_STRING lpClassName,
|
||||
PUNICODE_STRING lpWindowName,
|
||||
DWORD dwStyle,
|
||||
|
@ -108,8 +95,7 @@ NtUserCreateWindowEx(
|
|||
return (HWND)0;
|
||||
}
|
||||
|
||||
Status = ValidateWindowStationHandle(
|
||||
PROCESS_WINDOW_STATION(),
|
||||
Status = ValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
|
||||
KernelMode,
|
||||
0,
|
||||
&WinStaObject);
|
||||
|
@ -122,8 +108,9 @@ NtUserCreateWindowEx(
|
|||
return (HWND)0;
|
||||
}
|
||||
|
||||
WindowObject = (PWINDOW_OBJECT) USEROBJ_AllocObject (sizeof (WINDOW_OBJECT),
|
||||
UO_WINDOW_MAGIC);
|
||||
WindowObject = (PWINDOW_OBJECT)
|
||||
ObmCreateObject(PsGetWin32Process()->HandleTable, &Handle, otWindow,
|
||||
sizeof(WINDOW_OBJECT));
|
||||
if (!WindowObject)
|
||||
{
|
||||
ObDereferenceObject(WinStaObject);
|
||||
|
@ -149,17 +136,16 @@ NtUserCreateWindowEx(
|
|||
|
||||
RtlInitUnicodeString(&WindowObject->WindowName, WindowName.Buffer);
|
||||
|
||||
ExAcquireFastMutexUnsafe (&WindowListLock);
|
||||
InsertTailList (&WindowListHead, &WindowObject->ListEntry);
|
||||
ExReleaseFastMutexUnsafe (&WindowListLock);
|
||||
ExAcquireFastMutexUnsafe (&PsGetWin32Process()->WindowListLock);
|
||||
InsertTailList (&PsGetWin32Process()->WindowListHead,
|
||||
&WindowObject->ListEntry);
|
||||
ExReleaseFastMutexUnsafe (&PsGetWin32Process()->WindowListLock);
|
||||
|
||||
return (HWND)Handle;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserDeferWindowPos(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserDeferWindowPos(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3,
|
||||
|
@ -173,20 +159,16 @@ NtUserDeferWindowPos(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserDestroyWindow(
|
||||
DWORD Unknown0)
|
||||
DWORD STDCALL
|
||||
NtUserDestroyWindow(DWORD Unknown0)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserEndDeferWindowPosEx(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserEndDeferWindowPosEx(DWORD Unknown0,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
@ -194,10 +176,8 @@ NtUserEndDeferWindowPosEx(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserFillWindow(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserFillWindow(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3)
|
||||
|
@ -207,10 +187,8 @@ NtUserFillWindow(
|
|||
return 0;
|
||||
}
|
||||
|
||||
HWND
|
||||
STDCALL
|
||||
NtUserFindWindowEx(
|
||||
HWND hwndParent,
|
||||
HWND STDCALL
|
||||
NtUserFindWindowEx(HWND hwndParent,
|
||||
HWND hwndChildAfter,
|
||||
PUNICODE_STRING ucClassName,
|
||||
PUNICODE_STRING ucWindowName,
|
||||
|
@ -230,43 +208,43 @@ NtUserFindWindowEx(
|
|||
return (HWND)0;
|
||||
}
|
||||
|
||||
ExAcquireFastMutexUnsafe (&WindowListLock);
|
||||
currentEntry = WindowListHead.Flink;
|
||||
while (currentEntry != &WindowListHead)
|
||||
ExAcquireFastMutexUnsafe (&PsGetWin32Process()->WindowListLock);
|
||||
currentEntry = PsGetWin32Process()->WindowListHead.Flink;
|
||||
while (currentEntry != &PsGetWin32Process()->WindowListHead)
|
||||
{
|
||||
windowObject = CONTAINING_RECORD (currentEntry, WINDOW_OBJECT, ListEntry);
|
||||
windowObject = CONTAINING_RECORD (currentEntry, WINDOW_OBJECT,
|
||||
ListEntry);
|
||||
|
||||
if (classObject == windowObject->Class &&
|
||||
RtlCompareUnicodeString (ucWindowName, &windowObject->WindowName, TRUE) == 0)
|
||||
RtlCompareUnicodeString (ucWindowName, &windowObject->WindowName,
|
||||
TRUE) == 0)
|
||||
{
|
||||
windowHandle = (HWND) UserObjectHeaderToHandle (
|
||||
UserObjectBodyToHeader (windowObject));
|
||||
ExReleaseFastMutexUnsafe (&WindowListLock);
|
||||
ObDereferenceObject (classObject);
|
||||
ObmCreateHandle(PsGetWin32Process()->HandleTable,
|
||||
windowObject,
|
||||
&windowHandle);
|
||||
ExReleaseFastMutexUnsafe (&PsGetWin32Process()->WindowListLock);
|
||||
ObmDereferenceObject (classObject);
|
||||
|
||||
return windowHandle;
|
||||
}
|
||||
currentEntry = currentEntry->Flink;
|
||||
}
|
||||
ExReleaseFastMutexUnsafe (&WindowListLock);
|
||||
ExReleaseFastMutexUnsafe (&PsGetWin32Process()->WindowListLock);
|
||||
|
||||
ObDereferenceObject (classObject);
|
||||
ObmDereferenceObject (classObject);
|
||||
|
||||
return (HWND)0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserFlashWindowEx(
|
||||
DWORD Unknown0)
|
||||
DWORD STDCALL
|
||||
NtUserFlashWindowEx(DWORD Unknown0)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
DWORD STDCALL
|
||||
NtUserGetForegroundWindow(VOID)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
@ -274,10 +252,8 @@ NtUserGetForegroundWindow(VOID)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserGetInternalWindowPos(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserGetInternalWindowPos(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2)
|
||||
{
|
||||
|
@ -286,8 +262,7 @@ NtUserGetInternalWindowPos(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
DWORD STDCALL
|
||||
NtUserGetOpenClipboardWindow(VOID)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
@ -295,20 +270,16 @@ NtUserGetOpenClipboardWindow(VOID)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserGetWindowDC(
|
||||
DWORD Unknown0)
|
||||
DWORD STDCALL
|
||||
NtUserGetWindowDC(DWORD Unknown0)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserGetWindowPlacement(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserGetWindowPlacement(DWORD Unknown0,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
@ -316,10 +287,8 @@ NtUserGetWindowPlacement(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserInternalGetWindowText(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserInternalGetWindowText(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2)
|
||||
{
|
||||
|
@ -328,20 +297,16 @@ NtUserInternalGetWindowText(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserLockWindowUpdate(
|
||||
DWORD Unknown0)
|
||||
DWORD STDCALL
|
||||
NtUserLockWindowUpdate(DWORD Unknown0)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserMoveWindow(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserMoveWindow(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3,
|
||||
|
@ -353,10 +318,8 @@ NtUserMoveWindow(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserQueryWindow(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserQueryWindow(DWORD Unknown0,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
@ -364,10 +327,8 @@ NtUserQueryWindow(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserRealChildWindowFromPoint(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserRealChildWindowFromPoint(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2)
|
||||
{
|
||||
|
@ -376,10 +337,8 @@ NtUserRealChildWindowFromPoint(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserRedrawWindow(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserRedrawWindow(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3)
|
||||
|
@ -389,20 +348,16 @@ NtUserRedrawWindow(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserRegisterWindowMessage(
|
||||
DWORD Unknown0)
|
||||
DWORD STDCALL
|
||||
NtUserRegisterWindowMessage(DWORD Unknown0)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserScrollWindowEx(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserScrollWindowEx(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3,
|
||||
|
@ -416,20 +371,16 @@ NtUserScrollWindowEx(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetActiveWindow(
|
||||
DWORD Unknown0)
|
||||
DWORD STDCALL
|
||||
NtUserSetActiveWindow(DWORD Unknown0)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetImeOwnerWindow(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserSetImeOwnerWindow(DWORD Unknown0,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
@ -437,10 +388,8 @@ NtUserSetImeOwnerWindow(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetInternalWindowPos(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserSetInternalWindowPos(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3)
|
||||
|
@ -450,10 +399,8 @@ NtUserSetInternalWindowPos(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetLayeredWindowAttributes(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserSetLayeredWindowAttributes(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3)
|
||||
|
@ -463,20 +410,16 @@ NtUserSetLayeredWindowAttributes(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetLogonNotifyWindow(
|
||||
DWORD Unknown0)
|
||||
DWORD STDCALL
|
||||
NtUserSetLogonNotifyWindow(DWORD Unknown0)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetShellWindowEx(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserSetShellWindowEx(DWORD Unknown0,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
@ -484,10 +427,8 @@ NtUserSetShellWindowEx(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetWindowFNID(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserSetWindowFNID(DWORD Unknown0,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
@ -495,10 +436,8 @@ NtUserSetWindowFNID(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetWindowLong(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserSetWindowLong(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3)
|
||||
|
@ -508,10 +447,8 @@ NtUserSetWindowLong(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetWindowPlacement(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserSetWindowPlacement(DWORD Unknown0,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
@ -519,10 +456,8 @@ NtUserSetWindowPlacement(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetWindowPos(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserSetWindowPos(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3,
|
||||
|
@ -535,10 +470,8 @@ NtUserSetWindowPos(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetWindowRgn(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserSetWindowRgn(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2)
|
||||
{
|
||||
|
@ -547,10 +480,8 @@ NtUserSetWindowRgn(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetWindowWord(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserSetWindowWord(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2)
|
||||
{
|
||||
|
@ -559,26 +490,29 @@ NtUserSetWindowWord(
|
|||
return 0;
|
||||
}
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
NtUserShowWindow(
|
||||
HWND hWnd,
|
||||
BOOL STDCALL
|
||||
NtUserShowWindow(HWND hWnd,
|
||||
LONG nCmdShow)
|
||||
{
|
||||
PWINDOW_OBJECT WindowObject;
|
||||
NTSTATUS Status;
|
||||
|
||||
W32kGuiCheck();
|
||||
|
||||
WindowObject = USEROBJ_HandleToPtr (hWnd, UO_WINDOW_MAGIC);
|
||||
|
||||
Status = ObmReferenceObjectByHandle(PsGetWin32Process()->HandleTable,
|
||||
hWnd,
|
||||
otWindow,
|
||||
(PVOID*)&WindowObject);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserShowWindowAsync(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserShowWindowAsync(DWORD Unknown0,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
@ -586,10 +520,8 @@ NtUserShowWindowAsync(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserUpdateLayeredWindow(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserUpdateLayeredWindow(DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3,
|
||||
|
@ -604,10 +536,8 @@ NtUserUpdateLayeredWindow(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserWindowFromPoint(
|
||||
DWORD Unknown0,
|
||||
DWORD STDCALL
|
||||
NtUserWindowFromPoint(DWORD Unknown0,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
|
Loading…
Reference in a new issue