ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
477 discussions
Start a n
N
ew thread
[ekohl] 14683: Disable ControlService() because of a bug in WIDL.
by ekohl@svn.reactos.com
Disable ControlService() because of a bug in WIDL. Modified: trunk/reactos/include/idl/svcctl.idl Modified: trunk/reactos/lib/advapi32/service/scm.c Modified: trunk/reactos/subsys/system/services/rpcserver.c _____ Modified: trunk/reactos/include/idl/svcctl.idl --- trunk/reactos/include/idl/svcctl.idl 2005-04-18 21:03:33 UTC (rev 14682) +++ trunk/reactos/include/idl/svcctl.idl 2005-04-18 21:34:11 UTC (rev 14683) @@ -39,10 +39,10 @@ [in] SC_HANDLE hSCObject); /* Function 1 */ - BOOL ScmrControlService([in] handle_t BindingHandle, - [in] SC_HANDLE hService, - [in] DWORD dwControl, - [out] LPSERVICE_STATUS lpServiceStatus); +// BOOL ScmrControlService([in] handle_t BindingHandle, +// [in] SC_HANDLE hService, +// [in] DWORD dwControl, +// [out] LPSERVICE_STATUS lpServiceStatus); /* Function 2 */ DWORD ScmrDeleteService([in] handle_t BindingHandle, _____ Modified: trunk/reactos/lib/advapi32/service/scm.c --- trunk/reactos/lib/advapi32/service/scm.c 2005-04-18 21:03:33 UTC (rev 14682) +++ trunk/reactos/lib/advapi32/service/scm.c 2005-04-18 21:34:11 UTC (rev 14683) @@ -169,6 +169,7 @@ DWORD dwControl, LPSERVICE_STATUS lpServiceStatus) { +#if 0 DWORD dwError; DPRINT("ControlService(%x, %x, %p)\n", @@ -191,6 +192,10 @@ DPRINT("ControlService() done\n"); return TRUE; +#endif + DPRINT1("ControlService is unimplemented\n"); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; } _____ Modified: trunk/reactos/subsys/system/services/rpcserver.c --- trunk/reactos/subsys/system/services/rpcserver.c 2005-04-18 21:03:33 UTC (rev 14682) +++ trunk/reactos/subsys/system/services/rpcserver.c 2005-04-18 21:34:11 UTC (rev 14683) @@ -272,6 +272,7 @@ /* Function 1 */ +#if 0 unsigned long ScmrControlService(handle_t BindingHandle, unsigned int hService, @@ -295,6 +296,7 @@ return ERROR_SUCCESS; } +#endif /* Function 2 */
19 years, 8 months
1
0
0
0
[weiden] 14682: don't query additional information for the system idle process (which doesn't work anyway)
by weiden@svn.reactos.com
don't query additional information for the system idle process (which doesn't work anyway) Modified: trunk/reactos/subsys/system/taskmgr/perfdata.c _____ Modified: trunk/reactos/subsys/system/taskmgr/perfdata.c --- trunk/reactos/subsys/system/taskmgr/perfdata.c 2005-04-18 20:18:06 UTC (rev 14681) +++ trunk/reactos/subsys/system/taskmgr/perfdata.c 2005-04-18 21:03:33 UTC (rev 14682) @@ -260,15 +260,16 @@ pPerfData[Idx].ThreadCount = pSPI->NumberOfThreads; pPerfData[Idx].SessionId = pSPI->SessionId; - hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, (DWORD)pSPI->UniqueProcessId); - if (hProcess) { - if (OpenProcessToken(hProcess, TOKEN_QUERY|TOKEN_DUPLICATE|TOKEN_IMPERSONATE, &hProcessToken)) { - ImpersonateLoggedOnUser(hProcessToken); - memset(szTemp, 0, sizeof(TCHAR[MAX_PATH])); - dwSize = MAX_PATH; - GetUserName(szTemp, &dwSize); + if (pSPI->UniqueProcessId != NULL) { + hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, (DWORD)pSPI->UniqueProcessId); + if (hProcess) { + if (OpenProcessToken(hProcess, TOKEN_QUERY|TOKEN_DUPLICATE|TOKEN_IMPERSONATE, &hProcessToken)) { + ImpersonateLoggedOnUser(hProcessToken); + memset(szTemp, 0, sizeof(TCHAR[MAX_PATH])); + dwSize = MAX_PATH; + GetUserName(szTemp, &dwSize); #ifndef UNICODE - MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, szTemp, -1, pPerfData[Idx].UserName, MAX_PATH); + MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, szTemp, -1, pPerfData[Idx].UserName, MAX_PATH); /* int MultiByteToWideChar( UINT CodePage, // code page @@ -280,13 +281,25 @@ ); */ #endif - RevertToSelf(); - CloseHandle(hProcessToken); + RevertToSelf(); + CloseHandle(hProcessToken); + } else { + pPerfData[Idx].UserName[0] = _T('\0'); + } + pPerfData[Idx].USERObjectCount = GetGuiResources(hProcess, GR_USEROBJECTS); + pPerfData[Idx].GDIObjectCount = GetGuiResources(hProcess, GR_GDIOBJECTS); + GetProcessIoCounters(hProcess, &pPerfData[Idx].IOCounters); + CloseHandle(hProcess); + } else { + goto ClearInfo; } - pPerfData[Idx].USERObjectCount = GetGuiResources(hProcess, GR_USEROBJECTS); - pPerfData[Idx].GDIObjectCount = GetGuiResources(hProcess, GR_GDIOBJECTS); - GetProcessIoCounters(hProcess, &pPerfData[Idx].IOCounters); - CloseHandle(hProcess); + } else { +ClearInfo: + /* clear information we were unable to fetch */ + pPerfData[Idx].UserName[0] = _T('\0'); + pPerfData[Idx].USERObjectCount = 0; + pPerfData[Idx].GDIObjectCount = 0; + ZeroMemory(&pPerfData[Idx].IOCounters, sizeof(IO_COUNTERS)); } pPerfData[Idx].UserTime.QuadPart = pSPI->UserTime.QuadPart; pPerfData[Idx].KernelTime.QuadPart = pSPI->KernelTime.QuadPart;
19 years, 8 months
1
0
0
0
[hpoussin] 14681: Implement IOCTL_VIDEO_QUERY_AVAIL_MODES, IOCTL_VIDEO_QUERY_CURRENT_MODE, IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
by hpoussin@svn.reactos.com
Implement IOCTL_VIDEO_QUERY_AVAIL_MODES, IOCTL_VIDEO_QUERY_CURRENT_MODE, IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES Add checks to input/output structure sizes Move prototypes to new file vgamp.h Modified: trunk/reactos/drivers/video/miniport/vga/vgamp.c Added: trunk/reactos/drivers/video/miniport/vga/vgamp.h _____ Modified: trunk/reactos/drivers/video/miniport/vga/vgamp.c --- trunk/reactos/drivers/video/miniport/vga/vgamp.c 2005-04-18 19:56:45 UTC (rev 14680) +++ trunk/reactos/drivers/video/miniport/vga/vgamp.c 2005-04-18 20:18:06 UTC (rev 14681) @@ -3,64 +3,10 @@ * */ -#include <ddk/miniport.h> -#include <ddk/video.h> -#include <ddk/ntddvdeo.h> +// ------------------------------------------------------- Includes -#define UNIMPLEMENTED do {DbgPrint("%s:%d: Function not implemented", __FILE__, __LINE__); for(;;);} while (0) +#include "vgamp.h" -#define VERSION "0.0.0" -void InitVGAMode(); -// ---------------------------------------------------- Forward Declarations -static VP_STATUS STDCALL -VGAFindAdapter(PVOID DeviceExtension, - PVOID Context, - PWSTR ArgumentString, - PVIDEO_PORT_CONFIG_INFO ConfigInfo, - PUCHAR Again); -static BOOLEAN STDCALL -VGAInitialize(PVOID DeviceExtension); -static BOOLEAN STDCALL -VGAStartIO(PVOID DeviceExtension, - PVIDEO_REQUEST_PACKET RequestPacket); -/* -static BOOLEAN STDCALL -VGAInterrupt(PVOID DeviceExtension);*/ -static BOOLEAN STDCALL -VGAResetHw(PVOID DeviceExtension, - ULONG Columns, - ULONG Rows); -/*static VOID STDCALL -VGATimer(PVOID DeviceExtension); -*/ - -/* Mandatory IoControl routines */ -VOID VGAMapVideoMemory(IN PVOID DeviceExtension, - IN PVIDEO_MEMORY RequestedAddress, - OUT PVIDEO_MEMORY_INFORMATION MapInformation, - OUT PSTATUS_BLOCK StatusBlock); -VOID VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes, - OUT PSTATUS_BLOCK StatusBlock); -VOID VGAQueryCurrentMode(OUT PVIDEO_MODE_INFORMATION CurrentMode, - OUT PSTATUS_BLOCK StatusBlock); -VOID VGAQueryNumAvailModes(OUT PVIDEO_NUM_MODES NumberOfModes, - OUT PSTATUS_BLOCK StatusBlock); -VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock); -VOID VGASetColorRegisters(IN PVIDEO_CLUT ColorLookUpTable, - OUT PSTATUS_BLOCK StatusBlock); -VOID VGASetPaletteRegisters(IN PWORD PaletteRegisters, - OUT PSTATUS_BLOCK StatusBlock); -VOID VGASetCurrentMode(IN PVIDEO_MODE RequestedMode, - OUT PSTATUS_BLOCK StatusBlock); -VOID VGAShareVideoMemory(IN PVIDEO_SHARE_MEMORY RequestedMemory, - OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory, - OUT PSTATUS_BLOCK StatusBlock); -VOID VGAUnmapVideoMemory(IN PVOID DeviceExtension, - IN PVIDEO_MEMORY MemoryToUnmap, - OUT PSTATUS_BLOCK StatusBlock); -VOID VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare, - OUT PSTATUS_BLOCK StatusBlock); - // ------------------------------------------------------- Public Interface // DriverEntry @@ -219,63 +165,117 @@ VGAStartIO(PVOID DeviceExtension, PVIDEO_REQUEST_PACKET RequestPacket) { + BOOL Result; + + RequestPacket->StatusBlock->Status = STATUS_UNSUCCESSFUL; + switch (RequestPacket->IoControlCode) { case IOCTL_VIDEO_MAP_VIDEO_MEMORY: - VGAMapVideoMemory(DeviceExtension, + if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) || + RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY)) + { + RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER; + return TRUE; + } + Result = VGAMapVideoMemory(DeviceExtension, (PVIDEO_MEMORY) RequestPacket->InputBuffer, - (PVIDEO_MEMORY_INFORMATION) - RequestPacket->OutputBuffer, - RequestPacket->StatusBlock); + (PVIDEO_MEMORY_INFORMATION) + RequestPacket->OutputBuffer, + RequestPacket->StatusBlock); break; case IOCTL_VIDEO_QUERY_AVAIL_MODES: - VGAQueryAvailModes((PVIDEO_MODE_INFORMATION) RequestPacket->OutputBuffer, + if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION)) + { + RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER; + return TRUE; + } + Result = VGAQueryAvailModes((PVIDEO_MODE_INFORMATION) RequestPacket->OutputBuffer, RequestPacket->StatusBlock); break; case IOCTL_VIDEO_QUERY_CURRENT_MODE: - VGAQueryCurrentMode((PVIDEO_MODE_INFORMATION) RequestPacket->OutputBuffer, + if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION)) + { + RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER; + return TRUE; + } + Result = VGAQueryCurrentMode((PVIDEO_MODE_INFORMATION) RequestPacket->OutputBuffer, RequestPacket->StatusBlock); break; case IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES: - VGAQueryNumAvailModes((PVIDEO_NUM_MODES) RequestPacket->OutputBuffer, + if (RequestPacket->OutputBufferLength < sizeof(VIDEO_NUM_MODES)) + { + RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER; + return TRUE; + } + Result = VGAQueryNumAvailModes((PVIDEO_NUM_MODES) RequestPacket->OutputBuffer, RequestPacket->StatusBlock); break; case IOCTL_VIDEO_RESET_DEVICE: - VGAResetDevice(RequestPacket->StatusBlock); + Result = VGAResetDevice(RequestPacket->StatusBlock); break; case IOCTL_VIDEO_SET_COLOR_REGISTERS: - VGASetColorRegisters((PVIDEO_CLUT) RequestPacket->InputBuffer, + if (RequestPacket->InputBufferLength < sizeof(VIDEO_CLUT) || + RequestPacket->InputBufferLength < + (((PVIDEO_CLUT)RequestPacket->InputBuffer)->NumEntries * sizeof(ULONG)) + + sizeof(VIDEO_CLUT)) + { + RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER; + return TRUE; + } + Result = VGASetColorRegisters((PVIDEO_CLUT) RequestPacket->InputBuffer, RequestPacket->StatusBlock); break; case IOCTL_VIDEO_SET_CURRENT_MODE: - VGASetCurrentMode((PVIDEO_MODE) RequestPacket->InputBuffer, + if (RequestPacket->InputBufferLength < sizeof(VIDEO_MODE)) + { + RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER; + return TRUE; + } + Result = VGASetCurrentMode((PVIDEO_MODE) RequestPacket->InputBuffer, RequestPacket->StatusBlock); break; case IOCTL_VIDEO_SHARE_VIDEO_MEMORY: - VGAShareVideoMemory((PVIDEO_SHARE_MEMORY) RequestPacket->InputBuffer, + if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) || + RequestPacket->InputBufferLength < sizeof(VIDEO_SHARE_MEMORY)) + { + RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER; + return TRUE; + } + Result = VGAShareVideoMemory((PVIDEO_SHARE_MEMORY) RequestPacket->InputBuffer, (PVIDEO_MEMORY_INFORMATION) RequestPacket->OutputBuffer, RequestPacket->StatusBlock); break; case IOCTL_VIDEO_UNMAP_VIDEO_MEMORY: - VGAUnmapVideoMemory(DeviceExtension, + if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY)) + { + RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER; + return TRUE; + } + Result = VGAUnmapVideoMemory(DeviceExtension, (PVIDEO_MEMORY) RequestPacket->InputBuffer, RequestPacket->StatusBlock); break; case IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY: - VGAUnshareVideoMemory((PVIDEO_MEMORY) RequestPacket->InputBuffer, + if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY)) + { + RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER; + return TRUE; + } + Result = VGAUnshareVideoMemory((PVIDEO_MEMORY) RequestPacket->InputBuffer, RequestPacket->StatusBlock); break; case IOCTL_VIDEO_SET_PALETTE_REGISTERS: - VGASetPaletteRegisters((PWORD) RequestPacket->InputBuffer, + Result = VGASetPaletteRegisters((PWORD) RequestPacket->InputBuffer, RequestPacket->StatusBlock); break; @@ -319,8 +319,11 @@ default: RequestPacket->StatusBlock->Status = STATUS_NOT_IMPLEMENTED; - break; + return FALSE; } + + if (Result) + RequestPacket->StatusBlock->Status = STATUS_SUCCESS; return TRUE; } @@ -362,7 +365,7 @@ // ULONG Rows to reset to. // RETURNS: // BOOLEAN TRUE if no further action is necessary, FALSE if the system -// needs to still do a BOIS int 10 reset. +// needs to still do a BIOS int 10 reset. static BOOLEAN STDCALL VGAResetHw(PVOID DeviceExtension, @@ -394,7 +397,7 @@ #endif -VOID VGAMapVideoMemory(IN PVOID DeviceExtension, +BOOL VGAMapVideoMemory(IN PVOID DeviceExtension, IN PVIDEO_MEMORY RequestedAddress, OUT PVIDEO_MEMORY_INFORMATION MapInformation, OUT PSTATUS_BLOCK StatusBlock) @@ -415,34 +418,62 @@ if (StatusBlock->Status != 0) { StatusBlock->Information = 0; - return; + return TRUE; } MapInformation->VideoRamBase = MapInformation->FrameBufferBase = ReturnedAddress; MapInformation->VideoRamLength = MapInformation->FrameBufferLength = ReturnedLength; StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION); + return TRUE; } -VOID VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes, +BOOL VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes, OUT PSTATUS_BLOCK StatusBlock) { - UNIMPLEMENTED; + /* Only one mode exists in VGA (640x480), so use VGAQueryCurrentMode */ + return VGAQueryCurrentMode(ReturnedModes, StatusBlock); } -VOID VGAQueryCurrentMode(OUT PVIDEO_MODE_INFORMATION CurrentMode, +BOOL VGAQueryCurrentMode(OUT PVIDEO_MODE_INFORMATION CurrentMode, OUT PSTATUS_BLOCK StatusBlock) { - UNIMPLEMENTED; + CurrentMode->Length = sizeof(VIDEO_MODE_INFORMATION); + CurrentMode->ModeIndex = 12; + CurrentMode->VisScreenWidth = 640; + CurrentMode->VisScreenHeight = 480; + CurrentMode->ScreenStride = 320; + CurrentMode->NumberOfPlanes = 1; + CurrentMode->BitsPerPlane = 4; + CurrentMode->Frequency = 60; + CurrentMode->XMillimeter = 0; /* FIXME */ + CurrentMode->YMillimeter = 0; /* FIXME */ + CurrentMode->NumberRedBits = + CurrentMode->NumberGreenBits = + CurrentMode->NumberBlueBits = 6; + CurrentMode->RedMask = + CurrentMode->GreenMask = + CurrentMode->BlueMask = 0; /* FIXME */ + CurrentMode->VideoMemoryBitmapWidth = 640; + CurrentMode->VideoMemoryBitmapHeight = 480; + CurrentMode->AttributeFlags = VIDEO_MODE_GRAPHICS | VIDEO_MODE_COLOR | + VIDEO_MODE_NO_OFF_SCREEN; + CurrentMode->DriverSpecificAttributeFlags = 0; + + StatusBlock->Information = sizeof(VIDEO_MODE_INFORMATION); + return TRUE; } -VOID VGAQueryNumAvailModes(OUT PVIDEO_NUM_MODES NumberOfModes, +BOOL VGAQueryNumAvailModes(OUT PVIDEO_NUM_MODES NumberOfModes, OUT PSTATUS_BLOCK StatusBlock) { - UNIMPLEMENTED; + NumberOfModes->NumModes = 1; + NumberOfModes->ModeInformationLength = sizeof(VIDEO_MODE_INFORMATION); + StatusBlock->Information = sizeof(VIDEO_NUM_MODES); + return TRUE; } -VOID VGASetPaletteRegisters(IN PWORD PaletteRegisters, +BOOL VGASetPaletteRegisters(IN PWORD PaletteRegisters, OUT PSTATUS_BLOCK StatusBlock) { ; @@ -468,9 +499,10 @@ tmp = VideoPortReadPortUchar(0x03da); VideoPortWritePortUchar(0x03d0, v | 0x20); */ + return TRUE; } -VOID VGASetColorRegisters(IN PVIDEO_CLUT ColorLookUpTable, +BOOL VGASetColorRegisters(IN PVIDEO_CLUT ColorLookUpTable, OUT PSTATUS_BLOCK StatusBlock) { int i; @@ -482,37 +514,50 @@ VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Green); VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Blue); } + + return TRUE; } -VOID VGASetCurrentMode(IN PVIDEO_MODE RequestedMode, +BOOL VGASetCurrentMode(IN PVIDEO_MODE RequestedMode, OUT PSTATUS_BLOCK StatusBlock) { if(RequestedMode->RequestedMode == 12) { InitVGAMode(); + return TRUE; } else { - DbgPrint("Unrecognised mode for VGASetCurrentMode\n"); + DPRINT1("Unrecognised mode for VGASetCurrentMode\n"); + return FALSE; } } -VOID VGAShareVideoMemory(IN PVIDEO_SHARE_MEMORY RequestedMemory, +BOOL VGAShareVideoMemory(IN PVIDEO_SHARE_MEMORY RequestedMemory, OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory, OUT PSTATUS_BLOCK StatusBlock) { UNIMPLEMENTED; + + StatusBlock->Status = STATUS_NOT_IMPLEMENTED; + return FALSE; } -VOID VGAUnmapVideoMemory(IN PVOID DeviceExtension, +BOOL VGAUnmapVideoMemory(IN PVOID DeviceExtension, IN PVIDEO_MEMORY MemoryToUnmap, OUT PSTATUS_BLOCK StatusBlock) { - VideoPortUnmapMemory(DeviceExtension, + if (VideoPortUnmapMemory(DeviceExtension, MemoryToUnmap->RequestedVirtualAddress, - 0); + 0) == NO_ERROR) + return TRUE; + else + return FALSE; } -VOID VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare, +BOOL VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare, OUT PSTATUS_BLOCK StatusBlock) { UNIMPLEMENTED; + + StatusBlock->Status = STATUS_NOT_IMPLEMENTED; + return FALSE; } _____ Added: trunk/reactos/drivers/video/miniport/vga/vgamp.h --- trunk/reactos/drivers/video/miniport/vga/vgamp.h 2005-04-18 19:56:45 UTC (rev 14680) +++ trunk/reactos/drivers/video/miniport/vga/vgamp.h 2005-04-18 20:18:06 UTC (rev 14681) @@ -0,0 +1,124 @@ +/* + * ReactOS VGA miniport video driver + * + * Copyright (C) 2004 Filip Navara, Herve Poussineau + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef VGAMP_H +#define VGAMP_H + +/* INCLUDES *******************************************************************/ + +#include <ddk/miniport.h> +#include <ddk/video.h> +#include <ddk/ntddvdeo.h> +#include <debug.h> + +void +InitVGAMode(); + +static VP_STATUS STDCALL +VGAFindAdapter( + PVOID DeviceExtension, + PVOID Context, + PWSTR ArgumentString, + PVIDEO_PORT_CONFIG_INFO ConfigInfo, + PUCHAR Again); + +static BOOLEAN STDCALL +VGAInitialize( + PVOID DeviceExtension); + +static BOOLEAN STDCALL +VGAStartIO( + PVOID DeviceExtension, + PVIDEO_REQUEST_PACKET RequestPacket); + +/*static BOOLEAN STDCALL +VGAInterrupt(PVOID DeviceExtension);*/ + +static BOOLEAN STDCALL +VGAResetHw( + PVOID DeviceExtension, + ULONG Columns, + ULONG Rows); + +/*static VOID STDCALL +VGATimer(PVOID DeviceExtension);*/ + +/* Mandatory IoControl routines */ +BOOL +VGAMapVideoMemory( + IN PVOID DeviceExtension, + IN PVIDEO_MEMORY RequestedAddress, + OUT PVIDEO_MEMORY_INFORMATION MapInformation, + OUT PSTATUS_BLOCK StatusBlock); + +BOOL +VGAQueryAvailModes( + OUT PVIDEO_MODE_INFORMATION ReturnedModes, + OUT PSTATUS_BLOCK StatusBlock); + +BOOL +VGAQueryCurrentMode( + OUT PVIDEO_MODE_INFORMATION CurrentMode, + OUT PSTATUS_BLOCK StatusBlock); + +BOOL +VGAQueryNumAvailModes( + OUT PVIDEO_NUM_MODES NumberOfModes, + OUT PSTATUS_BLOCK StatusBlock); + +BOOL +VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock); + +BOOL +VGASetColorRegisters( + IN PVIDEO_CLUT ColorLookUpTable, + OUT PSTATUS_BLOCK StatusBlock); + +BOOL +VGASetPaletteRegisters( + IN PWORD PaletteRegisters, + OUT PSTATUS_BLOCK StatusBlock); + +BOOL +VGASetCurrentMode( + IN PVIDEO_MODE RequestedMode, + OUT PSTATUS_BLOCK StatusBlock); + +BOOL +VGAShareVideoMemory( + IN PVIDEO_SHARE_MEMORY RequestedMemory, + OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory, + OUT PSTATUS_BLOCK StatusBlock); + +BOOL +VGAUnmapVideoMemory( + IN PVOID DeviceExtension, + IN PVIDEO_MEMORY MemoryToUnmap, + OUT PSTATUS_BLOCK StatusBlock); + +BOOL +VGAUnshareVideoMemory( + IN PVIDEO_MEMORY MemoryToUnshare, + OUT PSTATUS_BLOCK StatusBlock); + +/* Optional IoControl routines */ +/* None actually */ + +#endif /* VGAMP_H */ Property changes on: trunk/reactos/drivers/video/miniport/vga/vgamp.h ___________________________________________________________________ Name: svn:keywords + author date id revision Name: svn:eol-style + native
19 years, 8 months
1
0
0
0
[mbosma] 14680: PackageManager: Changed Makefiles
by mbosma@svn.reactos.com
PackageManager: Changed Makefiles Modified: trunk/rosapps/Makefile Deleted: trunk/rosapps/packmgr/makefile _____ Modified: trunk/rosapps/Makefile --- trunk/rosapps/Makefile 2005-04-18 19:41:15 UTC (rev 14679) +++ trunk/rosapps/Makefile 2005-04-18 19:56:45 UTC (rev 14680) @@ -20,7 +20,9 @@ hcalc \ mc \ notevil \ - packmgr \ + packmgr$(SEP)lib \ + packmgr$(SEP)cmd-line \ + packmgr$(SEP)gui \ sysutils \ sysutils$(SEP)ctm \ sysutils$(SEP)kill \ _____ Deleted: trunk/rosapps/packmgr/makefile --- trunk/rosapps/packmgr/makefile 2005-04-18 19:41:15 UTC (rev 14679) +++ trunk/rosapps/packmgr/makefile 2005-04-18 19:56:45 UTC (rev 14680) @@ -1,17 +0,0 @@ - -all: lib gui cmd-line - -lib: dummy - $(MAKE) -C lib - -gui: dummy - $(MAKE) -C gui - -cmd-line: dummy - $(MAKE) -C cmd-line - -dummy: - -clean: - $(MAKE) -C gui clean - $(MAKE) -C lib clean
19 years, 8 months
1
0
0
0
[mbosma] 14679: PackageManager: TARGET_INSTALLDIR = bin
by mbosma@svn.reactos.com
PackageManager: TARGET_INSTALLDIR = bin Modified: trunk/rosapps/packmgr/cmd-line/makefile Modified: trunk/rosapps/packmgr/gui/makefile Modified: trunk/rosapps/packmgr/lib/makefile _____ Modified: trunk/rosapps/packmgr/cmd-line/makefile --- trunk/rosapps/packmgr/cmd-line/makefile 2005-04-18 19:26:12 UTC (rev 14678) +++ trunk/rosapps/packmgr/cmd-line/makefile 2005-04-18 19:41:15 UTC (rev 14679) @@ -3,6 +3,7 @@ TARGET_TYPE = program TARGET_APPTYPE = console PATH_TO_TOP = ../../../reactos +TARGET_INSTALLDIR = bin TARGET_SDKLIBS = package.a _____ Modified: trunk/rosapps/packmgr/gui/makefile --- trunk/rosapps/packmgr/gui/makefile 2005-04-18 19:26:12 UTC (rev 14678) +++ trunk/rosapps/packmgr/gui/makefile 2005-04-18 19:41:15 UTC (rev 14679) @@ -3,6 +3,7 @@ TARGET_TYPE = program TARGET_APPTYPE = windows PATH_TO_TOP = ../../../reactos +TARGET_INSTALLDIR = bin TARGET_SDKLIBS = kernel32.a user32.a package.a gdi32.a comctl32.a shell32.a _____ Modified: trunk/rosapps/packmgr/lib/makefile --- trunk/rosapps/packmgr/lib/makefile 2005-04-18 19:26:12 UTC (rev 14678) +++ trunk/rosapps/packmgr/lib/makefile 2005-04-18 19:41:15 UTC (rev 14679) @@ -2,6 +2,7 @@ TARGET_TYPE = dynlink TARGET_NAME = package PATH_TO_TOP = ../../../reactos +TARGET_INSTALLDIR = bin TARGET_SDKLIBS = kernel32.a shell32.a user32.a package.a expat.a urlmon.a
19 years, 8 months
1
0
0
0
[weiden] 14678: fix uninitialized variable
by weiden@svn.reactos.com
fix uninitialized variable Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c _____ Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c --- trunk/reactos/ntoskrnl/ex/sysinfo.c 2005-04-18 19:22:50 UTC (rev 14677) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c 2005-04-18 19:26:12 UTC (rev 14678) @@ -587,12 +587,13 @@ SpiCur = (PSYSTEM_PROCESS_INFORMATION)pCur; - current_entry = pr->ThreadListHead.Flink; - while (current_entry != &pr->ThreadListHead) - { - nThreads++; - current_entry = current_entry->Flink; - } + nThreads = 0; + current_entry = pr->ThreadListHead.Flink; + while (current_entry != &pr->ThreadListHead) + { + nThreads++; + current_entry = current_entry->Flink; + } // size of the structure for every process curSize = sizeof(SYSTEM_PROCESS_INFORMATION)-sizeof(SYSTEM_THREAD_INFORMATION)+siz eof(SYSTEM_THREAD_INFORMATION)*nThreads;
19 years, 8 months
1
0
0
0
[mbosma] 14677: PackageManager: added missing package.h
by mbosma@svn.reactos.com
PackageManager: added missing package.h Added: trunk/rosapps/packmgr/lib/package.h _____ Added: trunk/rosapps/packmgr/lib/package.h --- trunk/rosapps/packmgr/lib/package.h 2005-04-18 18:24:06 UTC (rev 14676) +++ trunk/rosapps/packmgr/lib/package.h 2005-04-18 19:22:50 UTC (rev 14677) @@ -0,0 +1,47 @@ +//////////////////////////////////////////////// +// +// package.hpp +// Package C++ Header +//////////////////////////////////////////////// + +#include <windows.h> +#include "error.h" + + +/* Callbacks */ + +typedef int (*PML_AddItem) (int id, const char* name, int parent, int icon); +typedef int (*PML_SetStatus) (int status1, int status2, WCHAR* text); +typedef int (*PML_SetButton) (DWORD dwID, BOOL state); +typedef int (*PML_SetIcon) (int id, int icon); +typedef int (*PML_SetText) (const char* text); +typedef int (*PML_Ask) (const WCHAR* text); + + +/* Structs */ + +typedef void* pTree; + +#define MAXNODES 10000 + + +/* Prototypes */ + +void PML_Abort (void); +WCHAR* PML_TransError (int code); + +int PML_LoadTree (pTree*, char* url, PML_AddItem); +int PML_FindItem (pTree tree, const char* what); +int PML_LoadPackage (pTree, int id, PML_SetButton); +char* PML_GetDescription (pTree tree, int id); +int PML_SetAction (pTree, int package, int action, PML_SetIcon, PML_Ask); +int PML_DoIt (pTree, PML_SetStatus, PML_Ask); + +void PML_CloseTree (pTree); + + +/* Version */ + +#define PACKMGR_VERSION_MAJOR 0 +#define PACKMGR_VERSION_MINOR 3 +#define PACKMGR_VERSION_PATCH_LEVEL 1
19 years, 8 months
1
0
0
0
[ion] 14676: Fix remaining System Process information structure issues and fix compilation
by ion@svn.reactos.com
Fix remaining System Process information structure issues and fix compilation Modified: trunk/reactos/apps/utils/ps/ps.c Modified: trunk/reactos/lib/epsapi/enum/processes.c Modified: trunk/reactos/lib/ws2_32/include/ws2_32.h Modified: trunk/reactos/lib/ws2_32/misc/dllmain.c Modified: trunk/reactos/subsys/csrss/win32csr/desktopbg.c Modified: trunk/reactos/subsys/csrss/win32csr/guiconsole.c Modified: trunk/reactos/subsys/csrss/win32csr/tuiconsole.c _____ Modified: trunk/reactos/apps/utils/ps/ps.c --- trunk/reactos/apps/utils/ps/ps.c 2005-04-18 17:48:01 UTC (rev 14675) +++ trunk/reactos/apps/utils/ps/ps.c 2005-04-18 18:24:06 UTC (rev 14676) @@ -110,8 +110,8 @@ DWORD r; ANSI_STRING astring; HANDLE stdout = GetStdHandle(STD_OUTPUT_HANDLE); - PSYSTEM_PROCESSES SystemProcesses = NULL; - PSYSTEM_PROCESSES CurrentProcess; + PSYSTEM_PROCESS_INFORMATION SystemProcesses = NULL; + PSYSTEM_PROCESS_INFORMATION CurrentProcess; ULONG BufferSize, ReturnSize; NTSTATUS Status; char buf[256]; @@ -140,7 +140,7 @@ /* For every process print the information. */ CurrentProcess = SystemProcesses; - while (CurrentProcess->NextEntryDelta != 0) + while (CurrentProcess->NextEntryOffset != 0) { int hour, hour1, thour, thour1; unsigned char minute, minute1, tmin, tmin1; @@ -159,53 +159,53 @@ minute1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; seconds1 = (ptime.QuadPart / 10000000LL) % 60LL; - RtlUnicodeStringToAnsiString(&astring, &CurrentProcess->ProcessName, TRUE); + RtlUnicodeStringToAnsiString(&astring, &CurrentProcess->ImageName, TRUE); wsprintf(buf,"P%8d %8d %3d:%02d:%02d %3d:%02d:%02d ProcName: %s\n", - CurrentProcess->ProcessId, CurrentProcess->InheritedFromProcessId, + CurrentProcess->UniqueProcessId, CurrentProcess->InheritedFromUniqueProcessId, hour, minute, seconds, hour1, minute1, seconds1, astring.Buffer); WriteFile(stdout, buf, lstrlen(buf), &r, NULL); RtlFreeAnsiString(&astring); - for (ti = 0; ti < CurrentProcess->ThreadCount; ti++) + for (ti = 0; ti < CurrentProcess->NumberOfThreads; ti++) { struct status *statt; struct waitres *waitt; char szWindowName[30] = {" "}; - ptime = CurrentProcess->Threads[ti].KernelTime; + ptime = CurrentProcess->TH[ti].KernelTime; thour = (ptime.QuadPart / (10000000LL * 3600LL)); tmin = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; tsec = (ptime.QuadPart / 10000000LL) % 60LL; - ptime = CurrentProcess->Threads[ti].UserTime; + ptime = CurrentProcess->TH[ti].UserTime; thour1 = (ptime.QuadPart / (10000000LL * 3600LL)); tmin1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; tsec1 = (ptime.QuadPart / 10000000LL) % 60LL; statt = thread_stat; - while (statt->state != CurrentProcess->Threads[ti].State && statt->state >= 0) + while (statt->state != CurrentProcess->TH[ti].ThreadState && statt->state >= 0) statt++; waitt = waitreason; - while (waitt->state != CurrentProcess->Threads[ti].WaitReason && waitt->state >= 0) + while (waitt->state != CurrentProcess->TH[ti].WaitReason && waitt->state >= 0) waitt++; wsprintf (buf1, "t% %8d %3d:%02d:%02d %3d:%02d:%02d %s %s\n", - CurrentProcess->Threads[ti].ClientId.UniqueThread, + CurrentProcess->TH[ti].ClientId.UniqueThread, thour, tmin, tsec, thour1, tmin1, tsec1, statt->desc , waitt->desc); WriteFile(stdout, buf1, lstrlen(buf1), &r, NULL); - EnumThreadWindows((DWORD)CurrentProcess->Threads[ti].ClientId.UniqueThre ad, + EnumThreadWindows((DWORD)CurrentProcess->TH[ti].ClientId.UniqueThread, (ENUMWINDOWSPROC) EnumThreadProc, (LPARAM)(LPTSTR) szWindowName ); } - CurrentProcess = (PSYSTEM_PROCESSES)((ULONG_PTR)CurrentProcess + - CurrentProcess->NextEntryDelta); + CurrentProcess = (PSYSTEM_PROCESS_INFORMATION)((ULONG_PTR)CurrentProcess + + CurrentProcess->NextEntryOffset); } return (0); } _____ Modified: trunk/reactos/lib/epsapi/enum/processes.c --- trunk/reactos/lib/epsapi/enum/processes.c 2005-04-18 17:48:01 UTC (rev 14675) +++ trunk/reactos/lib/epsapi/enum/processes.c 2005-04-18 18:24:06 UTC (rev 14676) @@ -38,9 +38,9 @@ #include <epsapi.h> NTSTATUS NTAPI -PsaCaptureProcessesAndThreads(OUT PSYSTEM_PROCESSES *ProcessesAndThreads) +PsaCaptureProcessesAndThreads(OUT PSYSTEM_PROCESS_INFORMATION *ProcessesAndThreads) { - PSYSTEM_PROCESSES pInfoBuffer = NULL; + PSYSTEM_PROCESS_INFORMATION pInfoBuffer = NULL; SIZE_T nSize = 0x8000; NTSTATUS Status; @@ -94,7 +94,7 @@ } NTSTATUS NTAPI -PsaWalkProcessesAndThreads(IN PSYSTEM_PROCESSES ProcessesAndThreads, +PsaWalkProcessesAndThreads(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PPROC_ENUM_ROUTINE ProcessCallback, IN OUT PVOID ProcessCallbackContext, IN PTHREAD_ENUM_ROUTINE ThreadCallback, @@ -128,11 +128,11 @@ if(ThreadCallback) { ULONG i; - PSYSTEM_THREADS pCurThread; + PSYSTEM_THREAD_INFORMATION pCurThread; /* scan the current process's thread list */ for(i = 0, pCurThread = PsaWalkFirstThread(ProcessesAndThreads); - i < ProcessesAndThreads->ThreadCount; + i < ProcessesAndThreads->NumberOfThreads; i++, pCurThread = PsaWalkNextThread(pCurThread)) { Status = ThreadCallback(pCurThread, ThreadCallbackContext); @@ -158,7 +158,7 @@ IN PTHREAD_ENUM_ROUTINE ThreadCallback, IN OUT PVOID ThreadCallbackContext) { - PSYSTEM_PROCESSES pInfoBuffer; + PSYSTEM_PROCESS_INFORMATION pInfoBuffer; NTSTATUS Status; if(ProcessCallback == NULL && ThreadCallback == NULL) @@ -194,7 +194,7 @@ } NTSTATUS NTAPI -PsaWalkProcesses(IN PSYSTEM_PROCESSES ProcessesAndThreads, +PsaWalkProcesses(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PPROC_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext) { @@ -206,7 +206,7 @@ } NTSTATUS NTAPI -PsaWalkThreads(IN PSYSTEM_PROCESSES ProcessesAndThreads, +PsaWalkThreads(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PTHREAD_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext) { @@ -237,42 +237,42 @@ CallbackContext); } -PSYSTEM_PROCESSES FASTCALL -PsaWalkFirstProcess(IN PSYSTEM_PROCESSES ProcessesAndThreads) +PSYSTEM_PROCESS_INFORMATION FASTCALL +PsaWalkFirstProcess(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads) { return ProcessesAndThreads; } -PSYSTEM_PROCESSES FASTCALL -PsaWalkNextProcess(IN PSYSTEM_PROCESSES CurrentProcess) +PSYSTEM_PROCESS_INFORMATION FASTCALL +PsaWalkNextProcess(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess) { - if(CurrentProcess->NextEntryDelta == 0) + if(CurrentProcess->NextEntryOffset == 0) { return NULL; } else { - return (PSYSTEM_PROCESSES)((ULONG_PTR)CurrentProcess + CurrentProcess->NextEntryDelta); + return (PSYSTEM_PROCESS_INFORMATION)((ULONG_PTR)CurrentProcess + CurrentProcess->NextEntryOffset); } } -PSYSTEM_THREADS FASTCALL -PsaWalkFirstThread(IN PSYSTEM_PROCESSES CurrentProcess) +PSYSTEM_THREAD_INFORMATION FASTCALL +PsaWalkFirstThread(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess) { static SIZE_T nOffsetOfThreads = 0; /* get the offset of the Threads field */ - nOffsetOfThreads = offsetof(SYSTEM_PROCESSES, Threads); + nOffsetOfThreads = offsetof(SYSTEM_PROCESS_INFORMATION, TH); - return (PSYSTEM_THREADS)((ULONG_PTR)CurrentProcess + nOffsetOfThreads); + return (PSYSTEM_THREAD_INFORMATION)((ULONG_PTR)CurrentProcess + nOffsetOfThreads); } -PSYSTEM_THREADS FASTCALL -PsaWalkNextThread(IN PSYSTEM_THREADS CurrentThread) +PSYSTEM_THREAD_INFORMATION FASTCALL +PsaWalkNextThread(IN PSYSTEM_THREAD_INFORMATION CurrentThread) { - return (PSYSTEM_THREADS)((ULONG_PTR)CurrentThread + - (offsetof(SYSTEM_PROCESSES, Threads[1]) - - offsetof(SYSTEM_PROCESSES, Threads[0]))); + return (PSYSTEM_THREAD_INFORMATION)((ULONG_PTR)CurrentThread + + (offsetof(SYSTEM_PROCESS_INFORMATION, TH[1]) - + offsetof(SYSTEM_PROCESS_INFORMATION, TH[0]))); } /* EOF */ _____ Modified: trunk/reactos/lib/ws2_32/include/ws2_32.h --- trunk/reactos/lib/ws2_32/include/ws2_32.h 2005-04-18 17:48:01 UTC (rev 14675) +++ trunk/reactos/lib/ws2_32/include/ws2_32.h 2005-04-18 18:24:06 UTC (rev 14676) @@ -27,7 +27,7 @@ #define EXPORT STDCALL extern HANDLE GlobalHeap; -extern BOOL Initialized; /* TRUE if WSAStartup() has been successfully called */ +extern BOOL WsaInitialized; /* TRUE if WSAStartup() has been successfully called */ extern WSPUPCALLTABLE UpcallTable; #define WS2_INTERNAL_MAX_ALIAS 16 @@ -59,9 +59,9 @@ /* Macros */ -#define WSAINITIALIZED (Initialized) +#define WSAINITIALIZED (WsaInitialized) -#define WSASETINITIALIZED (Initialized = TRUE) +#define WSASETINITIALIZED (WsaInitialized = TRUE) /* ws2_32 internal Functions */ void check_hostent(struct hostent **he); _____ Modified: trunk/reactos/lib/ws2_32/misc/dllmain.c --- trunk/reactos/lib/ws2_32/misc/dllmain.c 2005-04-18 17:48:01 UTC (rev 14675) +++ trunk/reactos/lib/ws2_32/misc/dllmain.c 2005-04-18 18:24:06 UTC (rev 14676) @@ -28,7 +28,7 @@ HANDLE GlobalHeap; -BOOL Initialized = FALSE; /* TRUE if WSAStartup() has been successfully called */ +BOOL WsaInitialized = FALSE; /* TRUE if WSAStartup() has been successfully called */ WSPUPCALLTABLE UpcallTable; _____ Modified: trunk/reactos/subsys/csrss/win32csr/desktopbg.c --- trunk/reactos/subsys/csrss/win32csr/desktopbg.c 2005-04-18 17:48:01 UTC (rev 14675) +++ trunk/reactos/subsys/csrss/win32csr/desktopbg.c 2005-04-18 18:24:06 UTC (rev 14676) @@ -53,7 +53,7 @@ }; } PRIVATE_NOTIFY_DESKTOP, *PPRIVATE_NOTIFY_DESKTOP; -static BOOL Initialized = FALSE; +static BOOL BgInitialized = FALSE; static HWND VisibleDesktopWindow = NULL; static LRESULT CALLBACK @@ -220,9 +220,9 @@ Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY); Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE; - if (! Initialized) + if (! BgInitialized) { - Initialized = TRUE; + BgInitialized = TRUE; if (! DtbgInit()) { return Reply->Status = STATUS_UNSUCCESSFUL; _____ Modified: trunk/reactos/subsys/csrss/win32csr/guiconsole.c --- trunk/reactos/subsys/csrss/win32csr/guiconsole.c 2005-04-18 17:48:01 UTC (rev 14675) +++ trunk/reactos/subsys/csrss/win32csr/guiconsole.c 2005-04-18 18:24:06 UTC (rev 14676) @@ -45,7 +45,7 @@ #define CURSOR_BLINK_TIME 500 -static BOOL Initialized = FALSE; +static BOOL ConsInitialized = FALSE; static HWND NotifyWnd; /* FUNCTIONS *****************************************************************/ @@ -975,12 +975,12 @@ HANDLE GraphicsStartupEvent; HANDLE ThreadHandle; - if (! Initialized) + if (! ConsInitialized) { - Initialized = TRUE; + ConsInitialized = TRUE; if (! GuiInit()) { - Initialized = FALSE; + ConsInitialized = FALSE; return STATUS_UNSUCCESSFUL; } } _____ Modified: trunk/reactos/subsys/csrss/win32csr/tuiconsole.c --- trunk/reactos/subsys/csrss/win32csr/tuiconsole.c 2005-04-18 17:48:01 UTC (rev 14675) +++ trunk/reactos/subsys/csrss/win32csr/tuiconsole.c 2005-04-18 18:24:06 UTC (rev 14676) @@ -22,7 +22,7 @@ static HANDLE ConsoleDeviceHandle; static PCSRSS_CONSOLE ActiveConsole; -static BOOL Initialized = FALSE; +static BOOL ConsInitialized = FALSE; static BOOL FASTCALL TuiInit(VOID) @@ -234,12 +234,12 @@ NTSTATUS FASTCALL TuiInitConsole(PCSRSS_CONSOLE Console) { - if (! Initialized) + if (! ConsInitialized) { - Initialized = TRUE; + ConsInitialized = TRUE; if (! TuiInit()) { - Initialized = FALSE; + ConsInitialized = FALSE; return STATUS_UNSUCCESSFUL; } }
19 years, 8 months
1
0
0
0
[ion] 14675: Fix Process/Thread information structures to match Windows 2000 and have proper structure. Fix bug in ntdll related to OpenProcess
by ion@svn.reactos.com
Fix Process/Thread information structures to match Windows 2000 and have proper structure. Fix bug in ntdll related to OpenProcess Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c Modified: trunk/reactos/ntoskrnl/include/internal/ke.h Modified: trunk/reactos/ntoskrnl/ps/process.c _____ Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c --- trunk/reactos/ntoskrnl/ex/sysinfo.c 2005-04-18 17:46:59 UTC (rev 14674) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c 2005-04-18 17:48:01 UTC (rev 14675) @@ -562,12 +562,12 @@ /* scan the process list */ - PSYSTEM_PROCESSES Spi - = (PSYSTEM_PROCESSES) Buffer; + PSYSTEM_PROCESS_INFORMATION Spi + = (PSYSTEM_PROCESS_INFORMATION) Buffer; - *ReqSize = sizeof(SYSTEM_PROCESSES); + *ReqSize = sizeof(SYSTEM_PROCESS_INFORMATION); - if (Size < sizeof(SYSTEM_PROCESSES)) + if (Size < sizeof(SYSTEM_PROCESS_INFORMATION)) { return (STATUS_INFO_LENGTH_MISMATCH); // in case buffer size is too small } @@ -578,14 +578,14 @@ do { - PSYSTEM_PROCESSES SpiCur; + PSYSTEM_PROCESS_INFORMATION SpiCur; int curSize, i = 0; ANSI_STRING imgName; int inLen=32; // image name len in bytes PLIST_ENTRY current_entry; PETHREAD current; - SpiCur = (PSYSTEM_PROCESSES)pCur; + SpiCur = (PSYSTEM_PROCESS_INFORMATION)pCur; current_entry = pr->ThreadListHead.Flink; while (current_entry != &pr->ThreadListHead) @@ -595,7 +595,7 @@ } // size of the structure for every process - curSize = sizeof(SYSTEM_PROCESSES)-sizeof(SYSTEM_THREADS)+sizeof(SYSTEM_THREADS)*n Threads; + curSize = sizeof(SYSTEM_PROCESS_INFORMATION)-sizeof(SYSTEM_THREAD_INFORMATION)+siz eof(SYSTEM_THREAD_INFORMATION)*nThreads; ovlSize += curSize+inLen; if (ovlSize > Size) @@ -607,45 +607,45 @@ } // fill system information - SpiCur->NextEntryDelta = curSize+inLen; // relative offset to the beginnnig of the next structure - SpiCur->ThreadCount = nThreads; + SpiCur->NextEntryOffset = curSize+inLen; // relative offset to the beginnnig of the next structure + SpiCur->NumberOfThreads = nThreads; SpiCur->CreateTime = pr->CreateTime; SpiCur->UserTime.QuadPart = pr->Pcb.UserTime * 100000LL; SpiCur->KernelTime.QuadPart = pr->Pcb.KernelTime * 100000LL; - SpiCur->ProcessName.Length = strlen(pr->ImageFileName) * sizeof(WCHAR); - SpiCur->ProcessName.MaximumLength = inLen; - SpiCur->ProcessName.Buffer = (void*)(pCur+curSize); + SpiCur->ImageName.Length = strlen(pr->ImageFileName) * sizeof(WCHAR); + SpiCur->ImageName.MaximumLength = inLen; + SpiCur->ImageName.Buffer = (void*)(pCur+curSize); // copy name to the end of the struct if(pr != PsIdleProcess) { RtlInitAnsiString(&imgName, pr->ImageFileName); - RtlAnsiStringToUnicodeString(&SpiCur->ProcessName, &imgName, FALSE); + RtlAnsiStringToUnicodeString(&SpiCur->ImageName, &imgName, FALSE); } else { - RtlInitUnicodeString(&SpiCur->ProcessName, NULL); + RtlInitUnicodeString(&SpiCur->ImageName, NULL); } SpiCur->BasePriority = pr->Pcb.BasePriority; - SpiCur->ProcessId = pr->UniqueProcessId; - SpiCur->InheritedFromProcessId = pr->InheritedFromUniqueProcessId; + SpiCur->UniqueProcessId = pr->UniqueProcessId; + SpiCur->InheritedFromUniqueProcessId = pr->InheritedFromUniqueProcessId; SpiCur->HandleCount = (pr->ObjectTable ? ObpGetHandleCountByHandleTable(pr->ObjectTable) : 0); - SpiCur->VmCounters.PeakVirtualSize = pr->PeakVirtualSize; - SpiCur->VmCounters.VirtualSize = pr->VirtualSize.QuadPart; - SpiCur->VmCounters.PageFaultCount = pr->LastFaultCount; - SpiCur->VmCounters.PeakWorkingSetSize = pr->Vm.PeakWorkingSetSize; // Is this right using ->Vm. here ? - SpiCur->VmCounters.WorkingSetSize = pr->Vm.WorkingSetSize; // Is this right using ->Vm. here ? - SpiCur->VmCounters.QuotaPeakPagedPoolUsage = + SpiCur->PeakVirtualSize = pr->PeakVirtualSize; + SpiCur->VirtualSize = pr->VirtualSize.QuadPart; + SpiCur->PageFaultCount = pr->LastFaultCount; + SpiCur->PeakWorkingSetSize = pr->Vm.PeakWorkingSetSize; // Is this right using ->Vm. here ? + SpiCur->WorkingSetSize = pr->Vm.WorkingSetSize; // Is this right using ->Vm. here ? + SpiCur->QuotaPeakPagedPoolUsage = pr->QuotaPeakPoolUsage[0]; - SpiCur->VmCounters.QuotaPagedPoolUsage = + SpiCur->QuotaPagedPoolUsage = pr->QuotaPoolUsage[0]; - SpiCur->VmCounters.QuotaPeakNonPagedPoolUsage = + SpiCur->QuotaPeakNonPagedPoolUsage = pr->QuotaPeakPoolUsage[1]; - SpiCur->VmCounters.QuotaNonPagedPoolUsage = + SpiCur->QuotaNonPagedPoolUsage = pr->QuotaPoolUsage[1]; - SpiCur->VmCounters.PagefileUsage = pr->PagefileUsage; // FIXME - SpiCur->VmCounters.PeakPagefileUsage = pr->PeakPagefileUsage; + SpiCur->PagefileUsage = pr->PagefileUsage; // FIXME + SpiCur->PeakPagefileUsage = pr->PeakPagefileUsage; // KJK::Hyperion: I don't know what does this mean. VM_COUNTERS // doesn't seem to contain any equivalent field //SpiCur->TotalPrivateBytes = pr->NumberOfPrivatePages; //FIXME: bytes != pages @@ -656,17 +656,17 @@ current = CONTAINING_RECORD(current_entry, ETHREAD, ThreadListEntry); - SpiCur->Threads[i].KernelTime.QuadPart = current->Tcb.KernelTime * 100000LL; - SpiCur->Threads[i].UserTime.QuadPart = current->Tcb.UserTime * 100000LL; -// SpiCur->Threads[i].CreateTime = current->CreateTime; - SpiCur->Threads[i].WaitTime = current->Tcb.WaitTime; - SpiCur->Threads[i].StartAddress = (PVOID) current->StartAddress; - SpiCur->Threads[i].ClientId = current->Cid; - SpiCur->Threads[i].Priority = current->Tcb.Priority; - SpiCur->Threads[i].BasePriority = current->Tcb.BasePriority; - SpiCur->Threads[i].ContextSwitchCount = current->Tcb.ContextSwitches; - SpiCur->Threads[i].State = current->Tcb.State; - SpiCur->Threads[i].WaitReason = current->Tcb.WaitReason; + SpiCur->TH[i].KernelTime.QuadPart = current->Tcb.KernelTime * 100000LL; + SpiCur->TH[i].UserTime.QuadPart = current->Tcb.UserTime * 100000LL; +// SpiCur->TH[i].CreateTime = current->CreateTime; + SpiCur->TH[i].WaitTime = current->Tcb.WaitTime; + SpiCur->TH[i].StartAddress = (PVOID) current->StartAddress; + SpiCur->TH[i].ClientId = current->Cid; + SpiCur->TH[i].Priority = current->Tcb.Priority; + SpiCur->TH[i].BasePriority = current->Tcb.BasePriority; + SpiCur->TH[i].ContextSwitches = current->Tcb.ContextSwitches; + SpiCur->TH[i].ThreadState = current->Tcb.State; + SpiCur->TH[i].WaitReason = current->Tcb.WaitReason; i++; current_entry = current_entry->Flink; } @@ -675,7 +675,7 @@ nThreads = 0; if ((pr == syspr) || (pr == NULL)) { - SpiCur->NextEntryDelta = 0; + SpiCur->NextEntryOffset = 0; break; } else _____ Modified: trunk/reactos/ntoskrnl/include/internal/ke.h --- trunk/reactos/ntoskrnl/include/internal/ke.h 2005-04-18 17:46:59 UTC (rev 14674) +++ trunk/reactos/ntoskrnl/include/internal/ke.h 2005-04-18 17:48:01 UTC (rev 14675) @@ -49,6 +49,7 @@ #define IPI_REQUEST_DPC 2 #define IPI_REQUEST_FREEZE 3 +#ifndef __USE_W32API typedef enum _KTHREAD_STATE { Initialized, Ready, @@ -59,6 +60,7 @@ Transition, DeferredReady, } THREAD_STATE, *PTHREAD_STATE; +#endif /* MACROS ************************************************************************ */ _____ Modified: trunk/reactos/ntoskrnl/ps/process.c --- trunk/reactos/ntoskrnl/ps/process.c 2005-04-18 17:46:59 UTC (rev 14674) +++ trunk/reactos/ntoskrnl/ps/process.c 2005-04-18 17:48:01 UTC (rev 14675) @@ -363,7 +363,7 @@ Status = PsCreateCidHandle(Process, PsProcessType, &Process->UniqueProcessId); - DPRINT1("Created CID: %d\n", Process->UniqueProcessId); + DPRINT("Created CID: %d\n", Process->UniqueProcessId); if(!NT_SUCCESS(Status)) { DPRINT1("Failed to create CID handle (unique process ID)! Status: 0x%x\n", Status); @@ -873,7 +873,8 @@ if (ClientId->UniqueThread) { /* Get the Process */ - DPRINT1("Opening by Thread ID: %x\n", ClientId->UniqueThread); + if (ClientId->UniqueThread == (HANDLE)-1) KEBUGCHECK(0); + DPRINT("Opening by Thread ID: %x\n", ClientId->UniqueThread); Status = PsLookupProcessThreadByCid(ClientId, &Process, &Thread); @@ -882,7 +883,7 @@ else { /* Get the Process */ - DPRINT1("Opening by Process ID: %x\n", ClientId->UniqueProcess); + DPRINT("Opening by Process ID: %x\n", ClientId->UniqueProcess); Status = PsLookupProcessByProcessId(ClientId->UniqueProcess, &Process); DPRINT("Found: %x\n", Process);
19 years, 8 months
1
0
0
0
[ion] 14674: Fix Process/Thread information structures to match Windows 2000 and have proper structure. Fix bug in ntdll related to OpenProcess
by ion@svn.reactos.com
Fix Process/Thread information structures to match Windows 2000 and have proper structure. Fix bug in ntdll related to OpenProcess Modified: trunk/reactos/include/epsapi.h Modified: trunk/reactos/include/ntos/zwtypes.h Modified: trunk/reactos/lib/ntdll/rtl/dbgbuffer.c Modified: trunk/reactos/lib/psapi/psapi.c Modified: trunk/reactos/w32api/include/ddk/ntapi.h _____ Modified: trunk/reactos/include/epsapi.h --- trunk/reactos/include/epsapi.h 2005-04-18 16:25:53 UTC (rev 14673) +++ trunk/reactos/include/epsapi.h 2005-04-18 17:46:59 UTC (rev 14674) @@ -32,10 +32,10 @@ /* OBJECTS */ /* TYPES */ -typedef NTSTATUS (NTAPI *PPROC_ENUM_ROUTINE)(IN PSYSTEM_PROCESSES CurrentProcess, +typedef NTSTATUS (NTAPI *PPROC_ENUM_ROUTINE)(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess, IN OUT PVOID CallbackContext); -typedef NTSTATUS (NTAPI *PTHREAD_ENUM_ROUTINE)(IN PSYSTEM_THREADS CurrentThread, +typedef NTSTATUS (NTAPI *PTHREAD_ENUM_ROUTINE)(IN PSYSTEM_THREAD_INFORMATION CurrentThread, IN OUT PVOID CallbackContext); typedef NTSTATUS (NTAPI *PSYSMOD_ENUM_ROUTINE)(IN PSYSTEM_MODULE_INFORMATION_ENTRY CurrentModule, @@ -67,36 +67,36 @@ /* capturing & walking */ NTSTATUS NTAPI -PsaCaptureProcessesAndThreads(OUT PSYSTEM_PROCESSES * ProcessesAndThreads); +PsaCaptureProcessesAndThreads(OUT PSYSTEM_PROCESS_INFORMATION * ProcessesAndThreads); NTSTATUS NTAPI -PsaWalkProcessesAndThreads(IN PSYSTEM_PROCESSES ProcessesAndThreads, +PsaWalkProcessesAndThreads(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PPROC_ENUM_ROUTINE ProcessCallback, IN OUT PVOID ProcessCallbackContext, IN PTHREAD_ENUM_ROUTINE ThreadCallback, IN OUT PVOID ThreadCallbackContext); NTSTATUS NTAPI -PsaWalkProcesses(IN PSYSTEM_PROCESSES ProcessesAndThreads, +PsaWalkProcesses(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PPROC_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext); NTSTATUS NTAPI -PsaWalkThreads(IN PSYSTEM_PROCESSES ProcessesAndThreads, +PsaWalkThreads(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PTHREAD_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext); -PSYSTEM_PROCESSES FASTCALL -PsaWalkFirstProcess(IN PSYSTEM_PROCESSES ProcessesAndThreads); +PSYSTEM_PROCESS_INFORMATION FASTCALL +PsaWalkFirstProcess(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads); -PSYSTEM_PROCESSES FASTCALL -PsaWalkNextProcess(IN PSYSTEM_PROCESSES CurrentProcess); +PSYSTEM_PROCESS_INFORMATION FASTCALL +PsaWalkNextProcess(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess); -PSYSTEM_THREADS FASTCALL -PsaWalkFirstThread(IN PSYSTEM_PROCESSES CurrentProcess); +PSYSTEM_THREAD_INFORMATION FASTCALL +PsaWalkFirstThread(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess); -PSYSTEM_THREADS FASTCALL -PsaWalkNextThread(IN PSYSTEM_THREADS CurrentThread); +PSYSTEM_THREAD_INFORMATION FASTCALL +PsaWalkNextThread(IN PSYSTEM_THREAD_INFORMATION CurrentThread); /* System modules */ /* enumeration */ _____ Modified: trunk/reactos/include/ntos/zwtypes.h --- trunk/reactos/include/ntos/zwtypes.h 2005-04-18 16:25:53 UTC (rev 14673) +++ trunk/reactos/include/ntos/zwtypes.h 2005-04-18 17:46:59 UTC (rev 14674) @@ -326,53 +326,73 @@ ULONG SystemCalls; } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION; +#ifndef __USE_W32API + // SystemProcessThreadInfo (5) -typedef struct _SYSTEM_THREAD_INFORMATION +typedef struct _SYSTEM_THREAD_INFORMATION { - TIME KernelTime; - TIME UserTime; - TIME CreateTime; - ULONG WaitTime; - PVOID StartAddress; - CLIENT_ID ClientId; - KPRIORITY Priority; - LONG BasePriority; - ULONG ContextSwitches; - LONG ThreadState; - KWAIT_REASON WaitReason; + LARGE_INTEGER KernelTime; + LARGE_INTEGER UserTime; + LARGE_INTEGER CreateTime; + ULONG WaitTime; + PVOID StartAddress; + CLIENT_ID ClientId; + KPRIORITY Priority; + LONG BasePriority; + ULONG ContextSwitches; + ULONG ThreadState; + ULONG WaitReason; } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION; -typedef struct SYSTEM_PROCESS_INFORMATION +typedef struct _SYSTEM_PROCESS_INFORMATION { - ULONG NextEntryOffset; - ULONG NumberOfThreads; - LARGE_INTEGER SpareLi1; - LARGE_INTEGER SpareLi2; - LARGE_INTEGER SpareLi3; - TIME CreateTime; - TIME UserTime; - TIME KernelTime; - UNICODE_STRING ImageName; - ULONG BasePriority; - HANDLE UniqueProcessId; - HANDLE InheritedFromUniqueProcessId; - ULONG HandleCount; - ULONG SessionId; - ULONG SpareUl3; - ULONG PeakVirtualSize; - ULONG VirtualSize; - ULONG PageFaultCount; - ULONG PeakWorkingSetSize; - ULONG WorkingSetSize; - ULONG QuotaPeakPagedPoolUsage; - ULONG QuotaPagedPoolUsage; - ULONG QuotaPeakNonPagedPoolUsage; - ULONG QuotaNonPagedPoolUsage; - ULONG PagefileUsage; - ULONG PeakPagefileUsage; - ULONG PrivatePageCount; + ULONG NextEntryOffset; + ULONG NumberOfThreads; + LARGE_INTEGER SpareLi1; + LARGE_INTEGER SpareLi2; + LARGE_INTEGER SpareLi3; + LARGE_INTEGER CreateTime; + LARGE_INTEGER UserTime; + LARGE_INTEGER KernelTime; + UNICODE_STRING ImageName; + KPRIORITY BasePriority; + HANDLE UniqueProcessId; + HANDLE InheritedFromUniqueProcessId; + ULONG HandleCount; + ULONG SessionId; + ULONG PageDirectoryFrame; + + /* + * This part corresponds to VM_COUNTERS_EX. + * NOTE: *NOT* THE SAME AS VM_COUNTERS! + */ + ULONG PeakVirtualSize; + ULONG VirtualSize; + ULONG PageFaultCount; + ULONG PeakWorkingSetSize; + ULONG WorkingSetSize; + ULONG QuotaPeakPagedPoolUsage; + ULONG QuotaPagedPoolUsage; + ULONG QuotaPeakNonPagedPoolUsage; + ULONG QuotaNonPagedPoolUsage; + ULONG PagefileUsage; + ULONG PeakPagefileUsage; + ULONG PrivateUsage; + + /* This part corresponds to IO_COUNTERS */ + LARGE_INTEGER ReadOperationCount; + LARGE_INTEGER WriteOperationCount; + LARGE_INTEGER OtherOperationCount; + LARGE_INTEGER ReadTransferCount; + LARGE_INTEGER WriteTransferCount; + LARGE_INTEGER OtherTransferCount; + + /* Finally, the array of Threads */ + SYSTEM_THREAD_INFORMATION TH[1]; } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION; +#endif + // SystemModuleInformation (11) typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY { ULONG Unknown1; @@ -1300,70 +1320,7 @@ } SYSTEM_PATH_INFORMATION, * PSYSTEM_PATH_INFORMATION; -// SystemProcessInformation (5) -#ifndef __USE_W32API - -typedef struct _SYSTEM_THREADS { - LARGE_INTEGER KernelTime; - LARGE_INTEGER UserTime; - LARGE_INTEGER CreateTime; - ULONG WaitTime; - PVOID StartAddress; - CLIENT_ID ClientId; - KPRIORITY Priority; - KPRIORITY BasePriority; - ULONG ContextSwitchCount; - ULONG State; - KWAIT_REASON WaitReason; -} SYSTEM_THREADS, *PSYSTEM_THREADS; - -#endif /* __USE_W32API */ - -typedef struct _SYSTEM_PROCESSES_NT4 -{ - SIZE_T NextEntryDelta; - ULONG ThreadCount; - ULONG Reserved1[6]; - LARGE_INTEGER CreateTime; - LARGE_INTEGER UserTime; - LARGE_INTEGER KernelTime; - UNICODE_STRING ProcessName; - KPRIORITY BasePriority; - HANDLE ProcessId; - HANDLE InheritedFromProcessId; - ULONG HandleCount; - ULONG Reserved2[2]; - VM_COUNTERS VmCounters; - SYSTEM_THREADS Threads[ANYSIZE_ARRAY]; -} SYSTEM_PROCESSES_NT4, *PSYSTEM_PROCESSES_NT4; - -typedef struct _SYSTEM_PROCESSES_NT5 -{ - SIZE_T NextEntryDelta; - ULONG ThreadCount; - ULONG Reserved1[6]; - LARGE_INTEGER CreateTime; - LARGE_INTEGER UserTime; - LARGE_INTEGER KernelTime; - UNICODE_STRING ProcessName; - KPRIORITY BasePriority; - HANDLE ProcessId; - HANDLE InheritedFromProcessId; - ULONG HandleCount; - ULONG Reserved2[2]; - VM_COUNTERS VmCounters; - IO_COUNTERS IoCounters; - SYSTEM_THREADS Threads[ANYSIZE_ARRAY]; -} SYSTEM_PROCESSES_NT5, *PSYSTEM_PROCESSES_NT5; - -#ifndef __USE_W32API - -/* Not sure. What version are we emulating? */ -typedef SYSTEM_PROCESSES_NT5 SYSTEM_PROCESSES, *PSYSTEM_PROCESSES; - -#endif /* __USE_W32API */ - // SystemCallCountInformation (6) typedef struct _SYSTEM_SDT_INFORMATION _____ Modified: trunk/reactos/lib/ntdll/rtl/dbgbuffer.c --- trunk/reactos/lib/ntdll/rtl/dbgbuffer.c 2005-04-18 16:25:53 UTC (rev 14673) +++ trunk/reactos/lib/ntdll/rtl/dbgbuffer.c 2005-04-18 17:46:59 UTC (rev 14674) @@ -349,14 +349,13 @@ Buf->Unknown[0] = (ULONG)NtCurrentProcess(); - ClientId.UniqueThread = INVALID_HANDLE_VALUE; + ClientId.UniqueThread = 0; ClientId.UniqueProcess = (HANDLE)ProcessId; - ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES); - ObjectAttributes.RootDirectory = (HANDLE)NULL; - ObjectAttributes.SecurityDescriptor = NULL; - ObjectAttributes.SecurityQualityOfService = NULL; - ObjectAttributes.ObjectName = NULL; - ObjectAttributes.Attributes = 0; + InitializeObjectAttributes(&ObjectAttributes, + NULL, + 0, + NULL, + NULL); Status = NtOpenProcess( &hProcess, (PROCESS_ALL_ACCESS), _____ Modified: trunk/reactos/lib/psapi/psapi.c --- trunk/reactos/lib/psapi/psapi.c 2005-04-18 16:25:53 UTC (rev 14673) +++ trunk/reactos/lib/psapi/psapi.c 2005-04-18 17:46:59 UTC (rev 14674) @@ -71,7 +71,7 @@ } ENUM_PROCESSES_CONTEXT, *PENUM_PROCESSES_CONTEXT; NTSTATUS STDCALL -EnumProcessesCallback(IN PSYSTEM_PROCESSES CurrentProcess, +EnumProcessesCallback(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess, IN OUT PVOID CallbackContext) { PENUM_PROCESSES_CONTEXT Context = (PENUM_PROCESSES_CONTEXT)CallbackContext; @@ -83,7 +83,7 @@ } /* return current process */ - *Context->lpidProcess = (DWORD)CurrentProcess->ProcessId; + *Context->lpidProcess = (DWORD)CurrentProcess->UniqueProcessId; /* go to next array slot */ Context->lpidProcess++; _____ Modified: trunk/reactos/w32api/include/ddk/ntapi.h --- trunk/reactos/w32api/include/ddk/ntapi.h 2005-04-18 16:25:53 UTC (rev 14673) +++ trunk/reactos/w32api/include/ddk/ntapi.h 2005-04-18 17:46:59 UTC (rev 14674) @@ -264,48 +264,16 @@ } VM_COUNTERS; typedef enum _THREAD_STATE { - StateInitialized, - StateReady, - StateRunning, - StateStandby, - StateTerminated, - StateWait, - StateTransition, - StateUnknown + Initialized, + Ready, + Running, + Standby, + Terminated, + Wait, + Transition, + DeferredReady } THREAD_STATE; -typedef struct _SYSTEM_THREADS { - LARGE_INTEGER KernelTime; - LARGE_INTEGER UserTime; - LARGE_INTEGER CreateTime; - ULONG WaitTime; - PVOID StartAddress; - CLIENT_ID ClientId; - KPRIORITY Priority; - KPRIORITY BasePriority; - ULONG ContextSwitchCount; - THREAD_STATE State; - KWAIT_REASON WaitReason; -} SYSTEM_THREADS, *PSYSTEM_THREADS; - -typedef struct _SYSTEM_PROCESSES { - ULONG NextEntryDelta; - ULONG ThreadCount; - ULONG Reserved1[6]; - LARGE_INTEGER CreateTime; - LARGE_INTEGER UserTime; - LARGE_INTEGER KernelTime; - UNICODE_STRING ProcessName; - KPRIORITY BasePriority; - HANDLE ProcessId; - HANDLE InheritedFromProcessId; - ULONG HandleCount; - ULONG Reserved2[2]; - VM_COUNTERS VmCounters; - IO_COUNTERS IoCounters; - SYSTEM_THREADS Threads[1]; -} SYSTEM_PROCESSES, *PSYSTEM_PROCESSES; - typedef struct _SYSTEM_CALLS_INFORMATION { ULONG Size; ULONG NumberOfDescriptorTables; @@ -659,50 +627,67 @@ SYSTEM_MEMORY_USAGE MemoryUsage[1]; } SYSTEM_MEMORY_USAGE_INFORMATION, *PSYSTEM_MEMORY_USAGE_INFORMATION; -typedef struct _SYSTEM_THREAD_INFORMATION +// SystemProcessThreadInfo (5) +typedef struct _SYSTEM_THREAD_INFORMATION { - LARGE_INTEGER KernelTime; - LARGE_INTEGER UserTime; - LARGE_INTEGER CreateTime; - ULONG WaitTime; - PVOID StartAddress; - CLIENT_ID ClientId; - KPRIORITY Priority; - LONG BasePriority; - ULONG ContextSwitches; - ULONG ThreadState; - KWAIT_REASON WaitReason; + LARGE_INTEGER KernelTime; + LARGE_INTEGER UserTime; + LARGE_INTEGER CreateTime; + ULONG WaitTime; + PVOID StartAddress; + CLIENT_ID ClientId; + KPRIORITY Priority; + LONG BasePriority; + ULONG ContextSwitches; + ULONG ThreadState; + ULONG WaitReason; } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION; -typedef struct SYSTEM_PROCESS_INFORMATION +typedef struct _SYSTEM_PROCESS_INFORMATION { - ULONG NextEntryOffset; - ULONG NumberOfThreads; - LARGE_INTEGER SpareLi1; - LARGE_INTEGER SpareLi2; - LARGE_INTEGER SpareLi3; - LARGE_INTEGER CreateTime; - LARGE_INTEGER UserTime; - LARGE_INTEGER KernelTime; - UNICODE_STRING ImageName; - ULONG BasePriority; - HANDLE UniqueProcessId; - HANDLE InheritedFromUniqueProcessId; - ULONG HandleCount; - ULONG SessionId; - ULONG SpareUl3; - ULONG PeakVirtualSize; - ULONG VirtualSize; - ULONG PageFaultCount; - ULONG PeakWorkingSetSize; - ULONG WorkingSetSize; - ULONG QuotaPeakPagedPoolUsage; - ULONG QuotaPagedPoolUsage; - ULONG QuotaPeakNonPagedPoolUsage; - ULONG QuotaNonPagedPoolUsage; - ULONG PagefileUsage; - ULONG PeakPagefileUsage; - ULONG PrivatePageCount; + ULONG NextEntryOffset; + ULONG NumberOfThreads; + LARGE_INTEGER SpareLi1; + LARGE_INTEGER SpareLi2; + LARGE_INTEGER SpareLi3; + LARGE_INTEGER CreateTime; + LARGE_INTEGER UserTime; + LARGE_INTEGER KernelTime; + UNICODE_STRING ImageName; + KPRIORITY BasePriority; + HANDLE UniqueProcessId; + HANDLE InheritedFromUniqueProcessId; + ULONG HandleCount; + ULONG SessionId; + ULONG PageDirectoryFrame; + + /* + * This part corresponds to VM_COUNTERS_EX. + * NOTE: *NOT* THE SAME AS VM_COUNTERS! + */ + ULONG PeakVirtualSize; + ULONG VirtualSize; + ULONG PageFaultCount; + ULONG PeakWorkingSetSize; + ULONG WorkingSetSize; + ULONG QuotaPeakPagedPoolUsage; + ULONG QuotaPagedPoolUsage; + ULONG QuotaPeakNonPagedPoolUsage; + ULONG QuotaNonPagedPoolUsage; + ULONG PagefileUsage; + ULONG PeakPagefileUsage; + ULONG PrivateUsage; + + /* This part corresponds to IO_COUNTERS */ + LARGE_INTEGER ReadOperationCount; + LARGE_INTEGER WriteOperationCount; + LARGE_INTEGER OtherOperationCount; + LARGE_INTEGER ReadTransferCount; + LARGE_INTEGER WriteTransferCount; + LARGE_INTEGER OtherTransferCount; + + /* Finally, the array of Threads */ + SYSTEM_THREAD_INFORMATION TH[1]; } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION; NTOSAPI
19 years, 8 months
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
48
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Results per page:
10
25
50
100
200