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
2025
January
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
March 2010
----- 2025 -----
January 2025
----- 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
19 participants
896 discussions
Start a n
N
ew thread
[evb] 46108: - Remove bits saying dithering supported, since code patented and removed (also, ReactOS win32k not support dithering calls!).
by evb@svn.reactos.org
Author: evb Date: Thu Mar 11 19:19:58 2010 New Revision: 46108 URL:
http://svn.reactos.org/svn/reactos?rev=46108&view=rev
Log: - Remove bits saying dithering supported, since code patented and removed (also, ReactOS win32k not support dithering calls!). Modified: trunk/reactos/drivers/video/displays/framebuf_new/screen.c Modified: trunk/reactos/drivers/video/displays/framebuf_new/screen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/fra…
============================================================================== --- trunk/reactos/drivers/video/displays/framebuf_new/screen.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/displays/framebuf_new/screen.c [iso-8859-1] Thu Mar 11 19:19:58 2010 @@ -17,15 +17,18 @@ const DEVINFO gDevInfoFrameBuffer = { ( GCAPS_OPAQUERECT - | GCAPS_MONO_DITHER +// eVb: 2.8 [DDK CHANGE] - No dithering support +// eVb: 2.8 [END] ), /* Graphics capabilities */ SYSTM_LOGFONT, /* Default font description */ HELVE_LOGFONT, /* ANSI variable font description */ COURI_LOGFONT, /* ANSI fixed font description */ 0, /* Count of device fonts */ 0, /* Preferred DIB format */ - 8, /* Width of color dither */ - 8, /* Height of color dither */ +// eVb: 2.9 [DDK CHANGE] - No dithering support + 0, /* Width of color dither */ + 0, /* Height of color dither */ +// eVb: 2.9 [END] 0 /* Default palette to use for this device */ }; @@ -449,9 +452,9 @@ pGdiInfo->ulNumColors = 20; pGdiInfo->ulNumPalReg = 1 << ppdev->ulBitCount; - - pDevInfo->flGraphicsCaps |= (GCAPS_PALMANAGED | GCAPS_COLOR_DITHER); - +// eVb: 2.7 [DDK CHANGE] - No dithering support + pDevInfo->flGraphicsCaps |= GCAPS_PALMANAGED; +// eVb: 2.7 [END] pGdiInfo->ulHTOutputFormat = HT_FORMAT_8BPP; pDevInfo->iDitherFormat = BMF_8BPP;
14 years, 10 months
1
0
0
0
[sir_richard] 46107: [FRAMEBUF]: Use precompiled header.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Thu Mar 11 19:19:02 2010 New Revision: 46107 URL:
http://svn.reactos.org/svn/reactos?rev=46107&view=rev
Log: [FRAMEBUF]: Use precompiled header. Modified: trunk/reactos/drivers/video/displays/framebuf_new/framebuf_new.rbuild Modified: trunk/reactos/drivers/video/displays/framebuf_new/framebuf_new.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/fra…
============================================================================== --- trunk/reactos/drivers/video/displays/framebuf_new/framebuf_new.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/video/displays/framebuf_new/framebuf_new.rbuild [iso-8859-1] Thu Mar 11 19:19:02 2010 @@ -15,4 +15,5 @@ <compilerflag>-fno-builtin</compilerflag> <compilerflag>-Wno-unused-variable</compilerflag> </group> + <pch>driver.h</pch> </module>
14 years, 10 months
1
0
0
0
[evb] 46106: - Added support IOCTRL_QUERY_PUBLIC_ACCESS_RANGES, IOCTRL_SET_PALETTE_REGISTERS, IOCTRL_QUERY_CURRENT_MODE, used by test Standard VGA-only display driver. - Code from NT4 DDK Cirrus miniport with some mods by me.
by evb@svn.reactos.org
Author: evb Date: Thu Mar 11 18:56:27 2010 New Revision: 46106 URL:
http://svn.reactos.org/svn/reactos?rev=46106&view=rev
Log: - Added support IOCTRL_QUERY_PUBLIC_ACCESS_RANGES, IOCTRL_SET_PALETTE_REGISTERS, IOCTRL_QUERY_CURRENT_MODE, used by test Standard VGA-only display driver. - Code from NT4 DDK Cirrus miniport with some mods by me. Modified: trunk/reactos/drivers/video/miniport/vga_new/modeset.c trunk/reactos/drivers/video/miniport/vga_new/vga.c Modified: trunk/reactos/drivers/video/miniport/vga_new/modeset.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vga…
============================================================================== --- trunk/reactos/drivers/video/miniport/vga_new/modeset.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/miniport/vga_new/modeset.c [iso-8859-1] Thu Mar 11 18:56:27 2010 @@ -38,6 +38,14 @@ PHW_DEVICE_EXTENSION HwDeviceExtension, PVIDEO_NUM_MODES NumModes, ULONG NumModesSize, + PULONG OutputSize + ); + +VP_STATUS +VgaQueryCurrentMode( + PHW_DEVICE_EXTENSION HwDeviceExtension, + PVIDEO_MODE_INFORMATION ModeInformation, + ULONG ModeInformationSize, PULONG OutputSize ); @@ -697,6 +705,139 @@ } // end VgaGetNumberOfAvailableModes() +VP_STATUS +VgaQueryCurrentMode( + PHW_DEVICE_EXTENSION HwDeviceExtension, + PVIDEO_MODE_INFORMATION ModeInformation, + ULONG ModeInformationSize, + PULONG OutputSize + ) + +/*++ + +Routine Description: + + This routine returns a description of the current video mode. + +Arguments: + + HwDeviceExtension - Pointer to the miniport driver's device extension. + + ModeInformation - Pointer to the output buffer supplied by the user. + This is where the current mode information is stored. + + ModeInformationSize - Length of the output buffer supplied by the user. + + OutputSize - Pointer to a buffer in which to return the actual size of + the data in the buffer. If the buffer was not large enough, this + contains the minimum required buffer size. + +Return Value: + + ERROR_INSUFFICIENT_BUFFER if the output buffer was not large enough + for the data being returned. + + NO_ERROR if the operation completed successfully. + +--*/ + +{ + // + // check if a mode has been set + // + + if (HwDeviceExtension->CurrentMode == NULL ) { + + return ERROR_INVALID_FUNCTION; + + } + + // + // Find out the size of the data to be put in the the buffer and return + // that in the status information (whether or not the information is + // there). If the buffer passed in is not large enough return an + // appropriate error code. + // + + if (ModeInformationSize < (*OutputSize = sizeof(VIDEO_MODE_INFORMATION))) { + + return ERROR_INSUFFICIENT_BUFFER; + + } + + // + // Store the characteristics of the current mode into the buffer. + // + + ModeInformation->Length = sizeof(VIDEO_MODE_INFORMATION); + ModeInformation->ModeIndex = HwDeviceExtension->ModeIndex; + ModeInformation->VisScreenWidth = HwDeviceExtension->CurrentMode->hres; + ModeInformation->ScreenStride = HwDeviceExtension->CurrentMode->wbytes; + ModeInformation->VisScreenHeight = HwDeviceExtension->CurrentMode->vres; + ModeInformation->NumberOfPlanes = HwDeviceExtension->CurrentMode->numPlanes; + ModeInformation->BitsPerPlane = HwDeviceExtension->CurrentMode->bitsPerPlane; + ModeInformation->Frequency = HwDeviceExtension->CurrentMode->Frequency; + ModeInformation->XMillimeter = 320; // temporary hardcoded constant + ModeInformation->YMillimeter = 240; // temporary hardcoded constant + + ModeInformation->AttributeFlags = HwDeviceExtension->CurrentMode->fbType; + + if ((ModeInformation->BitsPerPlane == 32) || + (ModeInformation->BitsPerPlane == 24)) + { + + ModeInformation->NumberRedBits = 8; + ModeInformation->NumberGreenBits = 8; + ModeInformation->NumberBlueBits = 8; + ModeInformation->RedMask = 0xff0000; + ModeInformation->GreenMask = 0x00ff00; + ModeInformation->BlueMask = 0x0000ff; + + } + else if (ModeInformation->BitsPerPlane == 16) + { + + ModeInformation->NumberRedBits = 6; + ModeInformation->NumberGreenBits = 6; + ModeInformation->NumberBlueBits = 6; + ModeInformation->RedMask = 0x1F << 11; + ModeInformation->GreenMask = 0x3F << 5; + ModeInformation->BlueMask = 0x1F; + + } +// eVb: 2.12 [VGA] - Add support for 15bpp modes, which Cirrus doesn't support + else if (ModeInformation->BitsPerPlane == 15) + { + + ModeInformation->NumberRedBits = 6; + ModeInformation->NumberGreenBits = 6; + ModeInformation->NumberBlueBits = 6; + ModeInformation->RedMask = 0x3E << 9; + ModeInformation->GreenMask = 0x1F << 5; + ModeInformation->BlueMask = 0x1F; + } +// eVb: 2.12 [END] + else + { + + ModeInformation->NumberRedBits = 6; + ModeInformation->NumberGreenBits = 6; + ModeInformation->NumberBlueBits = 6; + ModeInformation->RedMask = 0; + ModeInformation->GreenMask = 0; + ModeInformation->BlueMask = 0; + } + +// eVb: 2.13 [VGA] - All modes are palette managed/driven, unlike Cirrus + ModeInformation->AttributeFlags |= VIDEO_MODE_PALETTE_DRIVEN | + VIDEO_MODE_MANAGED_PALETTE; +// eVb: 2.13 [END] + + return NO_ERROR; + +} // end VgaQueryCurrentMode() + + VOID VgaZeroVideoMemory( PHW_DEVICE_EXTENSION HwDeviceExtension Modified: trunk/reactos/drivers/video/miniport/vga_new/vga.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vga…
============================================================================== --- trunk/reactos/drivers/video/miniport/vga_new/vga.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/miniport/vga_new/vga.c [iso-8859-1] Thu Mar 11 18:56:27 2010 @@ -55,6 +55,14 @@ PHW_DEVICE_EXTENSION HwDeviceExtension, PVIDEO_NUM_MODES NumModes, ULONG NumModesSize, + PULONG OutputSize + ); + +VP_STATUS +VgaQueryCurrentMode( + PHW_DEVICE_EXTENSION HwDeviceExtension, + PVIDEO_MODE_INFORMATION ModeInformation, + ULONG ModeInformationSize, PULONG OutputSize ); @@ -79,6 +87,13 @@ PUSHORT pusCmdStream ); +VP_STATUS +VgaSetPaletteReg( + PHW_DEVICE_EXTENSION HwDeviceExtension, + PVIDEO_PALETTE_DATA PaletteBuffer, + ULONG PaletteBufferSize + ); + VP_STATUS VgaSetColorLookup( PHW_DEVICE_EXTENSION HwDeviceExtension, @@ -394,7 +409,7 @@ VGA_MAX_IO_PORT - VGA_BASE_IO_PORT + 1, VgaAccessRange->RangeInIoSpace)) == NULL) { - VideoDebugPrint((2, "VgaFindAdapter - Fail to get io address\n")); + VideoDebugPrint((0, "VgaFindAdapter - Fail to get io address\n")); return ERROR_INVALID_PARAMETER; } @@ -445,7 +460,7 @@ VgaAccessRange[2].RangeLength, FALSE)) == NULL) { - VideoDebugPrint((1, "VgaFindAdapter - Fail to get memory address\n")); + VideoDebugPrint((0, "VgaFindAdapter - Fail to get memory address\n")); return ERROR_INVALID_PARAMETER; } @@ -681,7 +696,10 @@ VideoDebugPrint((2, "VgaStartIO - QueryCurrentMode\n")); - status = ERROR_INVALID_FUNCTION; + status = VgaQueryCurrentMode(HwDeviceExtension, + (PVIDEO_MODE_INFORMATION) RequestPacket->OutputBuffer, + RequestPacket->OutputBufferLength, + &RequestPacket->StatusBlock->Information); break; @@ -775,7 +793,9 @@ VideoDebugPrint((2, "VgaStartIO - SetPaletteRegs\n")); - status = ERROR_INVALID_FUNCTION; + status = VgaSetPaletteReg(HwDeviceExtension, + (PVIDEO_PALETTE_DATA) RequestPacket->InputBuffer, + RequestPacket->InputBufferLength); break; @@ -825,8 +845,53 @@ break; case IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES: + { + VideoDebugPrint((2, "VgaStartIO - Query Public Address Ranges\n")); + + PVIDEO_PUBLIC_ACCESS_RANGES portAccess; + ULONG physicalPortLength; + + if (RequestPacket->OutputBufferLength < + sizeof(VIDEO_PUBLIC_ACCESS_RANGES)) + { + status = ERROR_INSUFFICIENT_BUFFER; + break; + } + + RequestPacket->StatusBlock->Information = + sizeof(VIDEO_PUBLIC_ACCESS_RANGES); + + portAccess = RequestPacket->OutputBuffer; + + // + // The first public access range is the IO ports. + // + + portAccess->VirtualAddress = (PVOID) NULL; + portAccess->InIoSpace = TRUE; + portAccess->MappedInIoSpace = portAccess->InIoSpace; + physicalPortLength = VGA_MAX_IO_PORT - VGA_BASE_IO_PORT + 1; + + status = VideoPortMapMemory(hwDeviceExtension, + VgaAccessRange->RangeStart, + &physicalPortLength, + &(portAccess->MappedInIoSpace), + &(portAccess->VirtualAddress)); +// eVb: 1.17 [GCG] - Fix lvalue error + portAccess->VirtualAddress = (PVOID)((ULONG_PTR)portAccess->VirtualAddress - VGA_BASE_IO_PORT); +// eVb: 1.17 [END] + VideoDebugPrint((2, "VgaStartIO - mapping ports to (%x)\n", portAccess->VirtualAddress)); + } + + break; + case IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES: + VideoDebugPrint((2, "VgaStartIO - Free Public Access Ranges\n")); + + status = ERROR_INVALID_FUNCTION; + break; + // // if we get here, an invalid IoControlCode was specified. // @@ -1180,6 +1245,96 @@ } // VgaIsPresent() +//--------------------------------------------------------------------------- +VP_STATUS +VgaSetPaletteReg( + PHW_DEVICE_EXTENSION HwDeviceExtension, + PVIDEO_PALETTE_DATA PaletteBuffer, + ULONG PaletteBufferSize + ) + +/*++ + +Routine Description: + + This routine sets a specified portion of the EGA (not DAC) palette + registers. + +Arguments: + + HwDeviceExtension - Pointer to the miniport driver's device extension. + + PaletteBuffer - Pointer to the structure containing the palette data. + + PaletteBufferSize - Length of the input buffer supplied by the user. + +Return Value: + + NO_ERROR - information returned successfully + + ERROR_INSUFFICIENT_BUFFER - input buffer not large enough for input data. + + ERROR_INVALID_PARAMETER - invalid palette size. + +--*/ + +{ + USHORT i; + + // + // Check if the size of the data in the input buffer is large enough. + // + + if ((PaletteBufferSize) < (sizeof(VIDEO_PALETTE_DATA)) || + (PaletteBufferSize < (sizeof(VIDEO_PALETTE_DATA) + + (sizeof(USHORT) * (PaletteBuffer->NumEntries -1)) ))) { + + return ERROR_INSUFFICIENT_BUFFER; + + } + + // + // Check to see if the parameters are valid. + // + + if ( (PaletteBuffer->FirstEntry > VIDEO_MAX_COLOR_REGISTER ) || + (PaletteBuffer->NumEntries == 0) || + (PaletteBuffer->FirstEntry + PaletteBuffer->NumEntries > + VIDEO_MAX_PALETTE_REGISTER + 1 ) ) { + + return ERROR_INVALID_PARAMETER; + + } + + // + // Reset ATC to index mode + // + + VideoPortReadPortUchar(HwDeviceExtension->IOAddress + + ATT_INITIALIZE_PORT_COLOR); + + // + // Blast out our palette values. + // + + for (i = 0; i < PaletteBuffer->NumEntries; i++) { + + VideoPortWritePortUchar(HwDeviceExtension->IOAddress + ATT_ADDRESS_PORT, + (UCHAR)(i+PaletteBuffer->FirstEntry)); + + VideoPortWritePortUchar(HwDeviceExtension->IOAddress + + ATT_DATA_WRITE_PORT, + (UCHAR)PaletteBuffer->Colors[i]); + } + + VideoPortWritePortUchar(HwDeviceExtension->IOAddress + ATT_ADDRESS_PORT, + VIDEO_ENABLE); + + return NO_ERROR; + +} // end VgaSetPaletteReg() + + //--------------------------------------------------------------------------- VP_STATUS VgaSetColorLookup(
14 years, 10 months
1
0
0
0
[akhaldi] 46105: [NTIFS] - Group related definitions - Add InterlockedPushListSList, ExAdjustLookasideDepth and ExDisableResourceBoost - Add some asserts
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Mar 11 18:51:43 2010 New Revision: 46105 URL:
http://svn.reactos.org/svn/reactos?rev=46105&view=rev
Log: [NTIFS] - Group related definitions - Add InterlockedPushListSList, ExAdjustLookasideDepth and ExDisableResourceBoost - Add some asserts Modified: branches/header-work/include/ddk/ntifs.h Modified: branches/header-work/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntifs.h…
============================================================================== --- branches/header-work/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntifs.h [iso-8859-1] Thu Mar 11 18:51:43 2010 @@ -4946,14 +4946,66 @@ KeGetProcessorIndexFromNumber( IN PPROCESSOR_NUMBER ProcNumber); +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTKERNELAPI +SIZE_T +NTAPI +ExQueryPoolBlockSize( + IN PVOID PoolBlock, + OUT PBOOLEAN QuotaCharged); + +VOID +ExAdjustLookasideDepth( + VOID); + +NTKERNELAPI +VOID +NTAPI +ExDisableResourceBoostLite( + IN PERESOURCE Resource); + +#endif + +#define ExDisableResourceBoost ExDisableResourceBoostLite + +#define EX_PUSH_LOCK ULONG_PTR +#define PEX_PUSH_LOCK PULONG_PTR + +#if (NTDDI_VERSION >= NTDDI_WINXP) +PSLIST_ENTRY +FASTCALL +InterlockedPushListSList( + IN OUT PSLIST_HEADER ListHead, + IN OUT PSLIST_ENTRY List, + IN OUT PSLIST_ENTRY ListEnd, + IN ULONG Count); + +#endif + +/* #if !defined(_X86AMD64_) FIXME : WHAT ?! */ +#if defined(_WIN64) + +C_ASSERT(sizeof(ERESOURCE) == 0x68); +C_ASSERT(FIELD_OFFSET(ERESOURCE,ActiveCount) == 0x18); +C_ASSERT(FIELD_OFFSET(ERESOURCE,Flag) == 0x1a); + +#else + +C_ASSERT(sizeof(ERESOURCE) == 0x38); +C_ASSERT(FIELD_OFFSET(ERESOURCE,ActiveCount) == 0x0c); +C_ASSERT(FIELD_OFFSET(ERESOURCE,Flag) == 0x0e); + +#endif +/* #endif */ + + + #pragma pack(push,4) #ifndef VER_PRODUCTBUILD #define VER_PRODUCTBUILD 10000 #endif - -#define EX_PUSH_LOCK ULONG_PTR -#define PEX_PUSH_LOCK PULONG_PTR #include "csq.h" @@ -6411,21 +6463,6 @@ IN BOOLEAN Wait ); -NTKERNELAPI -VOID -NTAPI -ExDisableResourceBoostLite ( - IN PERESOURCE Resource -); - -NTKERNELAPI -SIZE_T -NTAPI -ExQueryPoolBlockSize ( - IN PVOID PoolBlock, - OUT PBOOLEAN QuotaCharged -); - #if (VER_PRODUCTBUILD >= 2600) #ifndef __NTOSKRNL__
14 years, 10 months
1
0
0
0
[sir_richard] 46104: [WIN32K]: EngCreateBitmap/IntCreateBitmap don't make much sense (code written back in 2004...). RLEs don't have scanlines by definitions, bit depth alignments and sizing is not done, newer display formats (compressed) are not supported correctly, zero-width surfaces fail because the size is ignored during scanline calculation, etc. These bugs caused eVb's test VGA display driver to fail as it needs to create a zero-depth shadow surface, which would end up with pv0Bits == NUL
by sir_richard@svn.reactos.org
Author: sir_richard Date: Thu Mar 11 18:49:44 2010 New Revision: 46104 URL:
http://svn.reactos.org/svn/reactos?rev=46104&view=rev
Log: [WIN32K]: EngCreateBitmap/IntCreateBitmap don't make much sense (code written back in 2004...). RLEs don't have scanlines by definitions, bit depth alignments and sizing is not done, newer display formats (compressed) are not supported correctly, zero-width surfaces fail because the size is ignored during scanline calculation, etc. These bugs caused eVb's test VGA display driver to fail as it needs to create a zero-depth shadow surface, which would end up with pv0Bits == NULL in the current implementation (and crash during ROPs/BitBLTs). Attempted to rewrite as much of it to 1) make Windows drivers work with it 2) continue the current hacks needed for ReactOS drawing. Note that the broken IntCreateBitmap is still used by non EngXXX interfaces to reduce the change of breakage, but keep in mind the function is entirely wrong. Modified: trunk/reactos/subsystems/win32/win32k/eng/surface.c Modified: trunk/reactos/subsystems/win32/win32k/eng/surface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] Thu Mar 11 18:49:44 2010 @@ -332,138 +332,369 @@ IN ULONG Flags, IN PVOID Bits) { - HBITMAP hbmp; SURFOBJ *pso; PSURFACE psurf; - PVOID UncompressedBits; - ULONG UncompressedFormat; - - if (Format == 0) - return 0; - + SIZEL LocalSize; + ULONG ScanLine = 0; // Compiler is dumb + ULONG BitsSize; + + ScanLine = abs(Width); + + /* Does the device manage its own surface? */ + if (!Bits) + { + /* The height times the bytes for each scanline */ + BitsSize = Size.cy * ScanLine; + if (BitsSize) + { + /* Check for allocation flag */ + if (Flags & BMF_USERMEM) + { + /* Get the bits from user-mode memory */ + Bits = EngAllocUserMem(BitsSize, 'mbuG'); + } + else + { + /* Get kernel bits (zeroed out if requested) */ + Bits = EngAllocMem((Flags & BMF_NOZEROINIT) ? 0 : FL_ZERO_MEMORY, + BitsSize, + TAG_DIB); + } + + /* Bail out if that failed */ + if (!Bits) return NULL; + } + } + else + { + /* Should not have asked for user memory */ +// ASSERT((Flags & BMF_USERMEM) == 0); + } + + /* Allocate the actual surface object structure */ psurf = SURFACE_AllocSurfaceWithHandle(); - if (psurf == NULL) - { - return 0; - } - hbmp = psurf->BaseObject.hHmgr; - - if (! SURFACE_InitBitsLock(psurf)) - { + if (!psurf) return NULL; + + /* Lock down the surface */ + if (!SURFACE_InitBitsLock(psurf)) + { + /* Bail out if that failed */ SURFACE_UnlockSurface(psurf); - SURFACE_FreeSurfaceByHandle(hbmp); - return 0; - } + SURFACE_FreeSurface(psurf); + return NULL; + } + + /* We should now have our surface object */ pso = &psurf->SurfObj; - - if (Format == BMF_4RLE) - { - pso->lDelta = DIB_GetDIBWidthBytes(Size.cx, BitsPerFormat(BMF_4BPP)); - pso->cjBits = pso->lDelta * Size.cy; - UncompressedFormat = BMF_4BPP; - UncompressedBits = EngAllocMem(FL_ZERO_MEMORY, pso->cjBits, TAG_DIB); - Decompress4bpp(Size, (BYTE *)Bits, (BYTE *)UncompressedBits, pso->lDelta); - } - else if (Format == BMF_8RLE) - { - pso->lDelta = DIB_GetDIBWidthBytes(Size.cx, BitsPerFormat(BMF_8BPP)); - pso->cjBits = pso->lDelta * Size.cy; - UncompressedFormat = BMF_8BPP; - UncompressedBits = EngAllocMem(FL_ZERO_MEMORY, pso->cjBits, TAG_DIB); - Decompress8bpp(Size, (BYTE *)Bits, (BYTE *)UncompressedBits, pso->lDelta); + + /* Set bits */ + pso->pvBits = Bits; + + /* Number of bits is based on the height times the scanline */ + pso->cjBits = Size.cy * ScanLine; + if (Flags & BMF_TOPDOWN) + { + /* For topdown, the base address starts with the bits */ + pso->pvScan0 = pso->pvBits; + pso->lDelta = ScanLine; } else { - pso->lDelta = abs(Width); - pso->cjBits = pso->lDelta * Size.cy; - UncompressedBits = Bits; - UncompressedFormat = Format; - } - - if (UncompressedBits != NULL) - { - pso->pvBits = UncompressedBits; - } - else - { - if (pso->cjBits == 0) - { - pso->pvBits = NULL; - } - else - { - if (0 != (Flags & BMF_USERMEM)) - { - pso->pvBits = EngAllocUserMem(pso->cjBits, 0); - } - else - { - pso->pvBits = EngAllocMem(0 != (Flags & BMF_NOZEROINIT) ? - 0 : FL_ZERO_MEMORY, - pso->cjBits, TAG_DIB); - } - if (pso->pvBits == NULL) - { - SURFACE_UnlockSurface(psurf); - SURFACE_FreeSurfaceByHandle(hbmp); - SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); - return 0; - } - } - } - - if (0 == (Flags & BMF_TOPDOWN)) - { - pso->pvScan0 = (PVOID)((ULONG_PTR)pso->pvBits + pso->cjBits - pso->lDelta); - pso->lDelta = - pso->lDelta; - } - else - { - pso->pvScan0 = pso->pvBits; - } - - pso->dhsurf = 0; /* device managed surface */ - pso->hsurf = (HSURF)hbmp; + /* Otherwise we start with the end and go up */ + pso->pvScan0 = (PVOID)((ULONG_PTR)pso->pvBits + pso->cjBits - ScanLine); + pso->lDelta = -ScanLine; + } + + /* Save format and flags */ + pso->iBitmapFormat = Format; + pso->fjBitmap = Flags & (BMF_TOPDOWN | BMF_UMPDMEM | BMF_USERMEM); + + /* Save size and type */ + LocalSize.cx = Size.cx; + LocalSize.cy = Size.cy; + pso->sizlBitmap = Size; + pso->iType = STYPE_BITMAP; + + /* Device-managed surface, no flags or dimension */ + pso->dhsurf = 0; pso->dhpdev = NULL; pso->hdev = NULL; - pso->sizlBitmap = Size; - pso->iBitmapFormat = UncompressedFormat; - pso->iType = STYPE_BITMAP; - pso->fjBitmap = Flags & (BMF_TOPDOWN | BMF_NOZEROINIT); - pso->iUniq = 0; - - psurf->flHooks = 0; psurf->flFlags = 0; psurf->dimension.cx = 0; psurf->dimension.cy = 0; - psurf->hSecure = NULL; psurf->hDIBSection = NULL; - + psurf->flHooks = 0; + + + /* Finally set the handle and uniq */ + pso->hsurf = (HSURF)psurf->BaseObject.hHmgr; + pso->iUniq = 0; + + /* Unlock and return the surface */ SURFACE_UnlockSurface(psurf); - - return hbmp; -} - -/* - * @implemented - */ -HBITMAP APIENTRY + return pso->hsurf; +} + +/* Name gleaned from C++ symbol information for SURFMEM::bInitDIB */ +typedef struct _DEVBITMAPINFO +{ + ULONG Format; + ULONG Width; + ULONG Height; + ULONG Flags; + ULONG Size; +} DEVBITMAPINFO, *PDEVBITMAPINFO; + +SURFOBJ* +FASTCALL +SURFMEM_bCreateDib(IN PDEVBITMAPINFO BitmapInfo, + IN PVOID Bits) +{ + BOOLEAN Compressed = FALSE; + ULONG ScanLine = 0; // Compiler is dumb + ULONG Size; + SURFOBJ *pso; + PSURFACE psurf; + SIZEL LocalSize; + + /* + * First, check the format so we can get the aligned scanline width. + * RLE and the newer fancy-smanshy JPG/PNG support do NOT have scanlines + * since they are compressed surfaces! + */ + switch (BitmapInfo->Format) + { + case BMF_1BPP: + //ScanLine = ((BitmapInfo->Width + 31) & ~31) / 8; + break; + + case BMF_4BPP: + //ScanLine = ((BitmapInfo->Width + 7) & ~7) / 2; + break; + + case BMF_8BPP: + //ScanLine = ((BitmapInfo->Width + 3) & ~3); + break; + + case BMF_16BPP: + //ScanLine = ((BitmapInfo->Width + 1) & ~1) * 2; + break; + + case BMF_24BPP: + //ScanLine = ((BitmapInfo->Width * 3) + 3) & ~3; + break; + + case BMF_32BPP: + // ScanLine = BitmapInfo->Width * 4; + break; + + case BMF_8RLE: + case BMF_4RLE: + case BMF_JPEG: + case BMF_PNG: + Compressed = TRUE; + break; + + default: + DPRINT1("Invalid bitmap format\n"); + return NULL; + } + + ScanLine = BitmapInfo->Width; + + /* Does the device manage its own surface? */ + if (!Bits) + { + /* We need to allocate bits for the caller, figure out the size */ + if (Compressed) + { + /* Note: we should not be seeing this scenario from ENGDDI */ + ASSERT(FALSE); + Size = BitmapInfo->Size; + } + else + { + /* The height times the bytes for each scanline */ + Size = BitmapInfo->Height * ScanLine; + } + + if (Size) + { + /* Check for allocation flag */ + if (BitmapInfo->Flags & BMF_USERMEM) + { + /* Get the bits from user-mode memory */ + Bits = EngAllocUserMem(Size, 'mbuG'); + } + else + { + /* Get kernel bits (zeroed out if requested) */ + Bits = EngAllocMem((BitmapInfo->Flags & BMF_NOZEROINIT) ? 0 : FL_ZERO_MEMORY, + Size, + TAG_DIB); + } + + /* Bail out if that failed */ + if (!Bits) return NULL; + } + } + else + { + /* Should not have asked for user memory */ + ASSERT((BitmapInfo->Flags & BMF_USERMEM) == 0); + } + + /* Allocate the actual surface object structure */ + psurf = SURFACE_AllocSurfaceWithHandle(); + if (!psurf) return NULL; + + /* Lock down the surface */ + if (!SURFACE_InitBitsLock(psurf)) + { + /* Bail out if that failed */ + SURFACE_UnlockSurface(psurf); + SURFACE_FreeSurface(psurf); + return NULL; + } + + /* We should now have our surface object */ + pso = &psurf->SurfObj; + + /* Save format and flags */ + pso->iBitmapFormat = BitmapInfo->Format; + pso->fjBitmap = BitmapInfo->Flags & (BMF_TOPDOWN | BMF_UMPDMEM | BMF_USERMEM); + + /* Save size and type */ + LocalSize.cy = BitmapInfo->Height; + LocalSize.cx = BitmapInfo->Width; + pso->sizlBitmap = LocalSize; + pso->iType = STYPE_BITMAP; + + /* Device-managed surface, no flags or dimension */ + pso->dhsurf = 0; + pso->dhpdev = NULL; + pso->hdev = NULL; + psurf->flFlags = 0; + psurf->dimension.cx = 0; + psurf->dimension.cy = 0; + psurf->hSecure = NULL; + psurf->hDIBSection = NULL; + psurf->flHooks = 0; + + /* Set bits */ + pso->pvBits = Bits; + + /* Check for bitmap type */ + if (!Compressed) + { + /* Number of bits is based on the height times the scanline */ + pso->cjBits = BitmapInfo->Height * ScanLine; + if (BitmapInfo->Flags & BMF_TOPDOWN) + { + /* For topdown, the base address starts with the bits */ + pso->pvScan0 = pso->pvBits; + pso->lDelta = ScanLine; + } + else + { + /* Otherwise we start with the end and go up */ + pso->pvScan0 = (PVOID)((ULONG_PTR)pso->pvBits + pso->cjBits - ScanLine); + pso->lDelta = -ScanLine; + } + } + else + { + /* Compressed surfaces don't have scanlines! */ + ASSERT(FALSE); // Should not get here on ENGDDI + pso->lDelta = 0; + pso->cjBits = BitmapInfo->Size; + + /* Check for JPG or PNG */ + if ((BitmapInfo->Format != BMF_JPEG) && (BitmapInfo->Format != BMF_PNG)) + { + /* Wherever the bit data is */ + pso->pvScan0 = pso->pvBits; + } + else + { + /* Fancy formats don't use a base address */ + pso->pvScan0 = NULL; + ASSERT(FALSE); // ENGDDI shouldn't be creating PNGs for drivers ;-) + } + } + + /* Finally set the handle and uniq */ + pso->hsurf = (HSURF)psurf->BaseObject.hHmgr; + pso->iUniq = 0; + + /* Unlock and return the surface */ + SURFACE_UnlockSurface(psurf); + return pso; +} + +/* + * @implemented + */ +HBITMAP +APIENTRY EngCreateBitmap(IN SIZEL Size, IN LONG Width, IN ULONG Format, IN ULONG Flags, IN PVOID Bits) { - HBITMAP hNewBitmap; - - hNewBitmap = IntCreateBitmap(Size, Width, Format, Flags, Bits); - if ( !hNewBitmap ) - return 0; - - GDIOBJ_SetOwnership(hNewBitmap, NULL); - - return hNewBitmap; + SURFOBJ* Surface; + DEVBITMAPINFO BitmapInfo; + + /* Capture the parameters */ + BitmapInfo.Format = Format; + BitmapInfo.Width = Size.cx; + BitmapInfo.Height = Size.cy; + BitmapInfo.Flags = Flags; + + /* + * If the display driver supports framebuffer access, use the scanline width + * to determine the actual width of the bitmap, and convert it to pels instead + * of bytes. + */ + if ((Bits) && (Width)) + { + #if 0 + switch (BitmapInfo.Format) + { + /* Do the conversion for each bit depth we support */ + case BMF_1BPP: + BitmapInfo.Width = Width * 8; + break; + case BMF_4BPP: + BitmapInfo.Width = Width * 2; + break; + case BMF_8BPP: + BitmapInfo.Width = Width; + break; + case BMF_16BPP: + BitmapInfo.Width = Width / 2; + break; + case BMF_24BPP: + BitmapInfo.Width = Width / 3; + break; + case BMF_32BPP: + BitmapInfo.Width = Width / 4; + break; + } +#endif + BitmapInfo.Width = Width; + + } + + /* Now create the surface */ + Surface = SURFMEM_bCreateDib(&BitmapInfo, Bits); + if (!Surface) return 0; + + /* Set public ownership and reutrn the handle */ + GDIOBJ_SetOwnership(Surface->hsurf, NULL); + return Surface->hsurf; } /*
14 years, 10 months
1
0
0
0
[sir_richard] 46103: [WIN32K]: Stop memory corruption when InstalledDisplayDrivers has more than one driver in the list. Note that driver loading is inherently broken right now, as the list of drivers is not parsed properly (this breaks eVb's VGA/VBE driver).
by sir_richard@svn.reactos.org
Author: sir_richard Date: Thu Mar 11 18:46:15 2010 New Revision: 46103 URL:
http://svn.reactos.org/svn/reactos?rev=46103&view=rev
Log: [WIN32K]: Stop memory corruption when InstalledDisplayDrivers has more than one driver in the list. Note that driver loading is inherently broken right now, as the list of drivers is not parsed properly (this breaks eVb's VGA/VBE driver). Modified: trunk/reactos/subsystems/win32/win32k/objects/device.c Modified: trunk/reactos/subsystems/win32/win32k/objects/device.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] Thu Mar 11 18:46:15 2010 @@ -59,12 +59,37 @@ return TRUE; } + +NTSTATUS +NTAPI +EnumDisplayQueryRoutine(IN PWSTR ValueName, + IN ULONG ValueType, + IN PVOID ValueData, + IN ULONG ValueLength, + IN PVOID Context, + IN PVOID EntryContext) +{ + if ((Context == NULL) && ((ValueType == REG_SZ) || (ValueType == REG_MULTI_SZ))) + { + *(PULONG)EntryContext = ValueLength; + } + else + { + DPRINT1("Value data: %S %d\n", ValueData, ValueLength); + RtlCopyMemory(Context, ValueData, ValueLength); + } + + return STATUS_SUCCESS; +} + static BOOL FASTCALL FindDriverFileNames(PUNICODE_STRING DriverFileNames, ULONG DisplayNumber) { RTL_QUERY_REGISTRY_TABLE QueryTable[2]; UNICODE_STRING RegistryPath; NTSTATUS Status; + PWCHAR DriverNames = NULL; + ULONG Length = 0; if (! GetRegistryPath(&RegistryPath, DisplayNumber)) { @@ -73,23 +98,40 @@ } RtlZeroMemory(QueryTable, sizeof(QueryTable)); - QueryTable[0].Flags = RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_DIRECT; + QueryTable[0].Flags = RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_NOEXPAND; QueryTable[0].Name = L"InstalledDisplayDrivers"; - QueryTable[0].EntryContext = DriverFileNames; + QueryTable[0].EntryContext = &Length; + QueryTable[0].QueryRoutine = EnumDisplayQueryRoutine; Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE, RegistryPath.Buffer, QueryTable, NULL, NULL); + // DPRINT1("Status: %lx\n", Status); + if (Length) + { + DriverNames = ExAllocatePool(PagedPool, Length); + // DPRINT1("Length allocated: %d\n", Length); + Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE, + RegistryPath.Buffer, + QueryTable, + DriverNames, + NULL); + if (!NT_SUCCESS(Status)) DriverNames = NULL; + } + ExFreePoolWithTag(RegistryPath.Buffer, TAG_RTLREGISTRY); if (! NT_SUCCESS(Status)) { DPRINT1("No InstalledDisplayDrivers value in service entry found\n"); return FALSE; } - - DPRINT("DriverFileNames %S\n", DriverFileNames->Buffer); + + RtlInitUnicodeString(DriverFileNames, DriverNames); + DriverFileNames->Length = Length; + DriverFileNames->MaximumLength = Length; + //DPRINT1("DriverFileNames %wZ\n", DriverFileNames); return TRUE; } @@ -301,7 +343,7 @@ continue; } - DPRINT("Display driver %S loaded\n", CurrentName); + DPRINT1("Display driver %S loaded\n", CurrentName); ExFreePoolWithTag(DriverFileNames.Buffer, TAG_RTLREGISTRY);
14 years, 10 months
1
0
0
0
[fireball] 46102: [COMDLG32] - Sync to Wine-1.1.40.
by fireball@svn.reactos.org
Author: fireball Date: Thu Mar 11 18:37:30 2010 New Revision: 46102 URL:
http://svn.reactos.org/svn/reactos?rev=46102&view=rev
Log: [COMDLG32] - Sync to Wine-1.1.40. Added: trunk/reactos/dll/win32/comdlg32/finddlg.c - copied, changed from r46053, trunk/reactos/dll/win32/comdlg32/finddlg32.c Removed: trunk/reactos/dll/win32/comdlg32/finddlg16.c trunk/reactos/dll/win32/comdlg32/finddlg32.c trunk/reactos/dll/win32/comdlg32/fontdlg16.c trunk/reactos/dll/win32/comdlg32/printdlg16.c Modified: trunk/reactos/dll/win32/comdlg32/cdlg.h trunk/reactos/dll/win32/comdlg32/cdlg32.c trunk/reactos/dll/win32/comdlg32/cdlg_Bg.rc trunk/reactos/dll/win32/comdlg32/cdlg_Ca.rc trunk/reactos/dll/win32/comdlg32/cdlg_Cs.rc trunk/reactos/dll/win32/comdlg32/cdlg_Da.rc trunk/reactos/dll/win32/comdlg32/cdlg_De.rc trunk/reactos/dll/win32/comdlg32/cdlg_El.rc trunk/reactos/dll/win32/comdlg32/cdlg_En.rc trunk/reactos/dll/win32/comdlg32/cdlg_Eo.rc trunk/reactos/dll/win32/comdlg32/cdlg_Es.rc trunk/reactos/dll/win32/comdlg32/cdlg_Fi.rc trunk/reactos/dll/win32/comdlg32/cdlg_Fr.rc trunk/reactos/dll/win32/comdlg32/cdlg_Hu.rc trunk/reactos/dll/win32/comdlg32/cdlg_It.rc trunk/reactos/dll/win32/comdlg32/cdlg_Ja.rc trunk/reactos/dll/win32/comdlg32/cdlg_Ko.rc trunk/reactos/dll/win32/comdlg32/cdlg_Lt.rc trunk/reactos/dll/win32/comdlg32/cdlg_Nl.rc trunk/reactos/dll/win32/comdlg32/cdlg_No.rc trunk/reactos/dll/win32/comdlg32/cdlg_Pl.rc trunk/reactos/dll/win32/comdlg32/cdlg_Pt.rc trunk/reactos/dll/win32/comdlg32/cdlg_Ro.rc trunk/reactos/dll/win32/comdlg32/cdlg_Ru.rc trunk/reactos/dll/win32/comdlg32/cdlg_Si.rc trunk/reactos/dll/win32/comdlg32/cdlg_Sk.rc trunk/reactos/dll/win32/comdlg32/cdlg_Sv.rc trunk/reactos/dll/win32/comdlg32/cdlg_Th.rc trunk/reactos/dll/win32/comdlg32/cdlg_Tr.rc trunk/reactos/dll/win32/comdlg32/cdlg_Uk.rc trunk/reactos/dll/win32/comdlg32/cdlg_Wa.rc trunk/reactos/dll/win32/comdlg32/cdlg_Zh.rc trunk/reactos/dll/win32/comdlg32/cdlg_xx.rc trunk/reactos/dll/win32/comdlg32/colordlg.c trunk/reactos/dll/win32/comdlg32/comdlg32.rbuild trunk/reactos/dll/win32/comdlg32/filedlg.c trunk/reactos/dll/win32/comdlg32/filedlg31.c trunk/reactos/dll/win32/comdlg32/filedlg31.h trunk/reactos/dll/win32/comdlg32/fontdlg.c trunk/reactos/dll/win32/comdlg32/printdlg.c trunk/reactos/dll/win32/comdlg32/rsrc.rc trunk/reactos/media/doc/README.WINE [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/comdlg32/cdlg.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg.h?…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg32.…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Bg.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Bg…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Ca.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Ca…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Cs.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Cs…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Da.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Da…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_De…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_El.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_El…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_En…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Eo.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Eo…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Es.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Es…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Fi.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Fi…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Fr…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Hu.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Hu…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_It.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_It…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Ja.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Ja…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Ko…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Lt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Lt…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Nl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Nl…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_No…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Pl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Pl…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Pt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Pt…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Ro.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Ro…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Ru.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Ru…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Si.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Si…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Sk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Sk…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Sv.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Sv…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Th.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Th…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Tr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Tr…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Uk…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Wa.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Wa…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_Zh.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_Zh…
Modified: trunk/reactos/dll/win32/comdlg32/cdlg_xx.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/cdlg_xx…
Modified: trunk/reactos/dll/win32/comdlg32/colordlg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/colordl…
Modified: trunk/reactos/dll/win32/comdlg32/comdlg32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/comdlg3…
Modified: trunk/reactos/dll/win32/comdlg32/filedlg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/filedlg…
Modified: trunk/reactos/dll/win32/comdlg32/filedlg31.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/filedlg…
Modified: trunk/reactos/dll/win32/comdlg32/filedlg31.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/filedlg…
Copied: trunk/reactos/dll/win32/comdlg32/finddlg.c (from r46053, trunk/reactos/dll/win32/comdlg32/finddlg32.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/finddlg…
Removed: trunk/reactos/dll/win32/comdlg32/finddlg16.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/finddlg…
Removed: trunk/reactos/dll/win32/comdlg32/finddlg32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/finddlg…
Modified: trunk/reactos/dll/win32/comdlg32/fontdlg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/fontdlg…
Removed: trunk/reactos/dll/win32/comdlg32/fontdlg16.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/fontdlg…
Modified: trunk/reactos/dll/win32/comdlg32/printdlg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/printdl…
Removed: trunk/reactos/dll/win32/comdlg32/printdlg16.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/printdl…
Modified: trunk/reactos/dll/win32/comdlg32/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/rsrc.rc…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
14 years, 10 months
1
0
0
0
[fireball] 46101: [PSDK] - Add GdiConvertToDevmodeW declaration (needed for comdlg32). Arwinss PSDK changes should really be merged in.
by fireball@svn.reactos.org
Author: fireball Date: Thu Mar 11 18:32:43 2010 New Revision: 46101 URL:
http://svn.reactos.org/svn/reactos?rev=46101&view=rev
Log: [PSDK] - Add GdiConvertToDevmodeW declaration (needed for comdlg32). Arwinss PSDK changes should really be merged in. Modified: trunk/reactos/include/psdk/wingdi.h Modified: trunk/reactos/include/psdk/wingdi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wingdi.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/wingdi.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/wingdi.h [iso-8859-1] Thu Mar 11 18:32:43 2010 @@ -2917,6 +2917,7 @@ BOOL WINAPI FloodFill(HDC,int,int,COLORREF); BOOL WINAPI GdiAlphaBlend(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION); BOOL WINAPI GdiComment(HDC,UINT,const BYTE*); +DEVMODEW* WINAPI GdiConvertToDevmodeW(const DEVMODEA *); BOOL WINAPI GdiFlush(void); DWORD WINAPI GdiGetBatchLimit(void); DWORD WINAPI GdiSetBatchLimit(DWORD);
14 years, 10 months
1
0
0
0
[akhaldi] 46100: [NTDDK] - Continue moving ntddk related definitions from winddk.h, fixing the conflicts caused by r46097 - pKdUnmapVirtualAddress and pKdMapPhysicalMemory64 : Add missing FlushCurrentTLB - Update HAL_DISPATCH and HalDispatchTable definitions - DDKAPI -> NTAPI - IMAGE_INFO : Add missing ExtendedInfoPresent - Update (X86) KPCR definition
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Mar 11 18:27:44 2010 New Revision: 46100 URL:
http://svn.reactos.org/svn/reactos?rev=46100&view=rev
Log: [NTDDK] - Continue moving ntddk related definitions from winddk.h, fixing the conflicts caused by r46097 - pKdUnmapVirtualAddress and pKdMapPhysicalMemory64 : Add missing FlushCurrentTLB - Update HAL_DISPATCH and HalDispatchTable definitions - DDKAPI -> NTAPI - IMAGE_INFO : Add missing ExtendedInfoPresent - Update (X86) KPCR definition Modified: branches/header-work/include/ddk/ntddk.h branches/header-work/include/ddk/winddk.h Modified: branches/header-work/include/ddk/ntddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddk.h…
============================================================================== --- branches/header-work/include/ddk/ntddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntddk.h [iso-8859-1] Thu Mar 11 18:27:44 2010 @@ -69,10 +69,6 @@ typedef GUID UUID; typedef struct _BUS_HANDLER *PBUS_HANDLER; - -#define KERNEL_STACK_SIZE 12288 -#define KERNEL_LARGE_STACK_SIZE 61440 -#define KERNEL_LARGE_STACK_COMMIT 12288 #define EXCEPTION_READ_FAULT 0 #define EXCEPTION_WRITE_FAULT 1 @@ -294,7 +290,7 @@ } ARBITER_LIST_ENTRY, *PARBITER_LIST_ENTRY; typedef NTSTATUS -(DDKAPI *PARBITER_HANDLER)( +(NTAPI *PARBITER_HANDLER)( IN OUT PVOID Context, IN ARBITER_ACTION Action, IN OUT PARBITER_PARAMETERS Parameters); @@ -417,7 +413,7 @@ } RESOURCE_TRANSLATION_DIRECTION; typedef NTSTATUS -(DDKAPI *PTRANSLATE_RESOURCE_HANDLER)( +(NTAPI *PTRANSLATE_RESOURCE_HANDLER)( IN OUT PVOID Context, IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Source, IN RESOURCE_TRANSLATION_DIRECTION Direction, @@ -427,7 +423,7 @@ OUT PCM_PARTIAL_RESOURCE_DESCRIPTOR Target); typedef NTSTATUS -(DDKAPI *PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER)( +(NTAPI *PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER)( IN PVOID Context OPTIONAL, IN PIO_RESOURCE_DESCRIPTOR Source, IN PDEVICE_OBJECT PhysicalDeviceObject, @@ -483,42 +479,42 @@ IN PBUS_HANDLER BusHandler); typedef NTSTATUS -(DDKAPI *pHalQuerySystemInformation)( +(NTAPI *pHalQuerySystemInformation)( IN HAL_QUERY_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN OUT PVOID Buffer, OUT PULONG ReturnedLength); typedef NTSTATUS -(DDKAPI *pHalSetSystemInformation)( +(NTAPI *pHalSetSystemInformation)( IN HAL_SET_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN PVOID Buffer); typedef NTSTATUS -(DDKAPI *pHalQueryBusSlots)( +(NTAPI *pHalQueryBusSlots)( IN PBUS_HANDLER BusHandler, IN ULONG BufferSize, OUT PULONG SlotNumbers, OUT PULONG ReturnedLength); typedef NTSTATUS -(DDKAPI *pHalInitPnpDriver)( +(NTAPI *pHalInitPnpDriver)( VOID); typedef NTSTATUS -(DDKAPI *pHalInitPowerManagement)( +(NTAPI *pHalInitPowerManagement)( IN PPM_DISPATCH_TABLE PmDriverDispatchTable, OUT PPM_DISPATCH_TABLE *PmHalDispatchTable); typedef struct _DMA_ADAPTER* -(DDKAPI *pHalGetDmaAdapter)( +(NTAPI *pHalGetDmaAdapter)( IN PVOID Context, IN struct _DEVICE_DESCRIPTION *DeviceDescriptor, OUT PULONG NumberOfMapRegisters); typedef NTSTATUS -(DDKAPI *pHalGetInterruptTranslator)( +(NTAPI *pHalGetInterruptTranslator)( IN INTERFACE_TYPE ParentInterfaceType, IN ULONG ParentBusNumber, IN INTERFACE_TYPE BridgeInterfaceType, @@ -528,30 +524,30 @@ OUT PULONG BridgeBusNumber); typedef NTSTATUS -(DDKAPI *pHalStartMirroring)( +(NTAPI *pHalStartMirroring)( VOID); typedef NTSTATUS -(DDKAPI *pHalEndMirroring)( +(NTAPI *pHalEndMirroring)( IN ULONG PassNumber); typedef NTSTATUS -(DDKAPI *pHalMirrorPhysicalMemory)( +(NTAPI *pHalMirrorPhysicalMemory)( IN PHYSICAL_ADDRESS PhysicalAddress, IN LARGE_INTEGER NumberOfBytes); typedef NTSTATUS -(DDKAPI *pHalMirrorVerify)( +(NTAPI *pHalMirrorVerify)( IN PHYSICAL_ADDRESS PhysicalAddress, IN LARGE_INTEGER NumberOfBytes); typedef VOID -(DDKAPI *pHalEndOfBoot)( +(NTAPI *pHalEndOfBoot)( VOID); typedef BOOLEAN -(DDKAPI *pHalTranslateBusAddress)( +(NTAPI *pHalTranslateBusAddress)( IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, @@ -560,7 +556,7 @@ typedef NTSTATUS -(DDKAPI *pHalAssignSlotResources)( +(NTAPI *pHalAssignSlotResources)( IN PUNICODE_STRING RegistryPath, IN PUNICODE_STRING DriverClassName OPTIONAL, IN PDRIVER_OBJECT DriverObject, @@ -572,22 +568,22 @@ typedef VOID -(DDKAPI *pHalHaltSystem)( +(NTAPI *pHalHaltSystem)( VOID); typedef BOOLEAN -(DDKAPI *pHalResetDisplay)( +(NTAPI *pHalResetDisplay)( VOID); typedef UCHAR -(DDKAPI *pHalVectorToIDTEntry)( +(NTAPI *pHalVectorToIDTEntry)( ULONG Vector); typedef BOOLEAN -(DDKAPI *pHalFindBusAddressTranslation)( +(NTAPI *pHalFindBusAddressTranslation)( IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress, @@ -596,582 +592,213 @@ typedef NTSTATUS -(DDKAPI *pKdSetupPciDeviceForDebugging)( +(NTAPI *pKdSetupPciDeviceForDebugging)( IN PVOID LoaderBlock OPTIONAL, IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice); typedef NTSTATUS -(DDKAPI *pKdReleasePciDeviceForDebugging)( +(NTAPI *pKdReleasePciDeviceForDebugging)( IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice); typedef PVOID -(DDKAPI *pKdGetAcpiTablePhase0)( +(NTAPI *pKdGetAcpiTablePhase0)( IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, IN ULONG Signature); typedef VOID -(DDKAPI *pKdCheckPowerButton)( +(NTAPI *pKdCheckPowerButton)( VOID); -typedef struct _KUSER_SHARED_DATA -{ - ULONG TickCountLowDeprecated; - ULONG TickCountMultiplier; - volatile KSYSTEM_TIME InterruptTime; - volatile KSYSTEM_TIME SystemTime; - volatile KSYSTEM_TIME TimeZoneBias; - USHORT ImageNumberLow; - USHORT ImageNumberHigh; - WCHAR NtSystemRoot[260]; - ULONG MaxStackTraceDepth; - ULONG CryptoExponent; - ULONG TimeZoneId; - ULONG LargePageMinimum; - ULONG Reserved2[7]; - NT_PRODUCT_TYPE NtProductType; - BOOLEAN ProductTypeIsValid; - ULONG NtMajorVersion; - ULONG NtMinorVersion; - BOOLEAN ProcessorFeatures[PROCESSOR_FEATURE_MAX]; - ULONG Reserved1; - ULONG Reserved3; - volatile ULONG TimeSlip; - ALTERNATIVE_ARCHITECTURE_TYPE AlternativeArchitecture; - ULONG AltArchitecturePad[1]; - LARGE_INTEGER SystemExpirationDate; - ULONG SuiteMask; - BOOLEAN KdDebuggerEnabled; -#if (NTDDI_VERSION >= NTDDI_WINXPSP2) - UCHAR NXSupportPolicy; -#endif - volatile ULONG ActiveConsoleId; - volatile ULONG DismountCount; - ULONG ComPlusPackage; - ULONG LastSystemRITEventTickCount; - ULONG NumberOfPhysicalPages; - BOOLEAN SafeBootMode; -#if (NTDDI_VERSION >= NTDDI_WIN7) - union { - UCHAR TscQpcData; - struct { - UCHAR TscQpcEnabled:1; - UCHAR TscQpcSpareFlag:1; - UCHAR TscQpcShift:6; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - UCHAR TscQpcPad[2]; -#endif -#if (NTDDI_VERSION >= NTDDI_VISTA) - union { - ULONG SharedDataFlags; - struct { - ULONG DbgErrorPortPresent:1; - ULONG DbgElevationEnabled:1; - ULONG DbgVirtEnabled:1; - ULONG DbgInstallerDetectEnabled:1; - ULONG DbgSystemDllRelocated:1; - ULONG DbgDynProcessorEnabled:1; - ULONG DbgSEHValidationEnabled:1; - ULONG SpareBits:25; - } DUMMYSTRUCTNAME2; - } DUMMYUNIONNAME2; -#else - ULONG TraceLogging; -#endif - ULONG DataFlagsPad[1]; - ULONGLONG TestRetInstruction; - ULONG SystemCall; - ULONG SystemCallReturn; - ULONGLONG SystemCallPad[3]; - _ANONYMOUS_UNION union { - volatile KSYSTEM_TIME TickCount; - volatile ULONG64 TickCountQuad; - _ANONYMOUS_STRUCT struct { - ULONG ReservedTickCountOverlay[3]; - ULONG TickCountPad[1]; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME3; - ULONG Cookie; - ULONG CookiePad[1]; -#if (NTDDI_VERSION >= NTDDI_WS03) - LONGLONG ConsoleSessionForegroundProcessId; - ULONG Wow64SharedInformation[MAX_WOW64_SHARED_ENTRIES]; -#endif -#if (NTDDI_VERSION >= NTDDI_VISTA) -#if (NTDDI_VERSION >= NTDDI_WIN7) - USHORT UserModeGlobalLogger[16]; -#else - USHORT UserModeGlobalLogger[8]; - ULONG HeapTracingPid[2]; - ULONG CritSecTracingPid[2]; -#endif - ULONG ImageFileExecutionOptions; -#if (NTDDI_VERSION >= NTDDI_VISTASP1) - ULONG LangGenerationCount; -#else - /* 4 bytes padding */ -#endif - ULONGLONG Reserved5; - volatile ULONG64 InterruptTimeBias; -#endif -#if (NTDDI_VERSION >= NTDDI_WIN7) - volatile ULONG64 TscQpcBias; - volatile ULONG ActiveProcessorCount; - volatile USHORT ActiveGroupCount; - USHORT Reserved4; - volatile ULONG AitSamplingValue; - volatile ULONG AppCompatFlag; - ULONGLONG SystemDllNativeRelocation; - ULONG SystemDllWowRelocation; - ULONG XStatePad[1]; - XSTATE_CONFIGURATION XState; -#endif -} KUSER_SHARED_DATA, *PKUSER_SHARED_DATA; - -#ifdef _X86_ - -#define SIZE_OF_80387_REGISTERS 80 - -typedef struct _FLOATING_SAVE_AREA { - ULONG ControlWord; - ULONG StatusWord; - ULONG TagWord; - ULONG ErrorOffset; - ULONG ErrorSelector; - ULONG DataOffset; - ULONG DataSelector; - UCHAR RegisterArea[SIZE_OF_80387_REGISTERS]; - ULONG Cr0NpxState; -} FLOATING_SAVE_AREA, *PFLOATING_SAVE_AREA; - -#include "pshpack4.h" -typedef struct _CONTEXT { - ULONG ContextFlags; - ULONG Dr0; - ULONG Dr1; - ULONG Dr2; - ULONG Dr3; - ULONG Dr6; - ULONG Dr7; - FLOATING_SAVE_AREA FloatSave; - ULONG SegGs; - ULONG SegFs; - ULONG SegEs; - ULONG SegDs; - ULONG Edi; - ULONG Esi; - ULONG Ebx; - ULONG Edx; - ULONG Ecx; - ULONG Eax; - ULONG Ebp; - ULONG Eip; - ULONG SegCs; - ULONG EFlags; - ULONG Esp; - ULONG SegSs; - UCHAR ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION]; -} CONTEXT; -#include "poppack.h" - -#endif /* _X86_ */ - -#ifdef _AMD64_ - -#if !defined(RC_INVOKED) - -#define CONTEXT_AMD64 0x100000 - -#define CONTEXT_CONTROL (CONTEXT_AMD64 | 0x1L) -#define CONTEXT_INTEGER (CONTEXT_AMD64 | 0x2L) -#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x4L) -#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x8L) -#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x10L) - -#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) -#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS) - -#define CONTEXT_XSTATE (CONTEXT_AMD64 | 0x20L) - -#define CONTEXT_EXCEPTION_ACTIVE 0x8000000 -#define CONTEXT_SERVICE_ACTIVE 0x10000000 -#define CONTEXT_EXCEPTION_REQUEST 0x40000000 -#define CONTEXT_EXCEPTION_REPORTING 0x80000000 - -#endif /* RC_INVOKED */ - -#endif /* _AMD64_ */ - -typedef enum _INTERLOCKED_RESULT { - ResultNegative = RESULT_NEGATIVE, - ResultZero = RESULT_ZERO, - ResultPositive = RESULT_POSITIVE -} INTERLOCKED_RESULT; - -typedef struct _OSVERSIONINFOA { - ULONG dwOSVersionInfoSize; - ULONG dwMajorVersion; - ULONG dwMinorVersion; - ULONG dwBuildNumber; - ULONG dwPlatformId; - CHAR szCSDVersion[128]; -} OSVERSIONINFOA, *POSVERSIONINFOA, *LPOSVERSIONINFOA; - -typedef struct _OSVERSIONINFOW { - ULONG dwOSVersionInfoSize; - ULONG dwMajorVersion; - ULONG dwMinorVersion; - ULONG dwBuildNumber; - ULONG dwPlatformId; - WCHAR szCSDVersion[128]; -} OSVERSIONINFOW, *POSVERSIONINFOW, *LPOSVERSIONINFOW, RTL_OSVERSIONINFOW, *PRTL_OSVERSIONINFOW; - -typedef struct _OSVERSIONINFOEXA { - ULONG dwOSVersionInfoSize; - ULONG dwMajorVersion; - ULONG dwMinorVersion; - ULONG dwBuildNumber; - ULONG dwPlatformId; - CHAR szCSDVersion[128]; - USHORT wServicePackMajor; - USHORT wServicePackMinor; - USHORT wSuiteMask; - UCHAR wProductType; - UCHAR wReserved; -} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA; - -typedef struct _OSVERSIONINFOEXW { - ULONG dwOSVersionInfoSize; - ULONG dwMajorVersion; - ULONG dwMinorVersion; - ULONG dwBuildNumber; - ULONG dwPlatformId; - WCHAR szCSDVersion[128]; - USHORT wServicePackMajor; - USHORT wServicePackMinor; - USHORT wSuiteMask; - UCHAR wProductType; - UCHAR wReserved; -} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW, RTL_OSVERSIONINFOEXW, *PRTL_OSVERSIONINFOEXW; - -#ifdef UNICODE -typedef OSVERSIONINFOEXW OSVERSIONINFOEX; -typedef POSVERSIONINFOEXW POSVERSIONINFOEX; -typedef LPOSVERSIONINFOEXW LPOSVERSIONINFOEX; -typedef OSVERSIONINFOW OSVERSIONINFO; -typedef POSVERSIONINFOW POSVERSIONINFO; -typedef LPOSVERSIONINFOW LPOSVERSIONINFO; -#else -typedef OSVERSIONINFOEXA OSVERSIONINFOEX; -typedef POSVERSIONINFOEXA POSVERSIONINFOEX; -typedef LPOSVERSIONINFOEXA LPOSVERSIONINFOEX; -typedef OSVERSIONINFOA OSVERSIONINFO; -typedef POSVERSIONINFOA POSVERSIONINFO; -typedef LPOSVERSIONINFOA LPOSVERSIONINFO; -#endif /* UNICODE */ - -/* Executive Types */ - -#define PROTECTED_POOL 0x80000000 - -typedef struct _ZONE_SEGMENT_HEADER { - SINGLE_LIST_ENTRY SegmentList; - PVOID Reserved; -} ZONE_SEGMENT_HEADER, *PZONE_SEGMENT_HEADER; - -typedef struct _ZONE_HEADER { - SINGLE_LIST_ENTRY FreeList; - SINGLE_LIST_ENTRY SegmentList; - ULONG BlockSize; - ULONG TotalSegmentSize; -} ZONE_HEADER, *PZONE_HEADER; - -/* Executive Functions */ - -static __inline PVOID -ExAllocateFromZone( - IN PZONE_HEADER Zone) -{ - if (Zone->FreeList.Next) - Zone->FreeList.Next = Zone->FreeList.Next->Next; - return (PVOID) Zone->FreeList.Next; -} - -static __inline PVOID -ExFreeToZone( - IN PZONE_HEADER Zone, - IN PVOID Block) -{ - ((PSINGLE_LIST_ENTRY) Block)->Next = Zone->FreeList.Next; - Zone->FreeList.Next = ((PSINGLE_LIST_ENTRY) Block); - return ((PSINGLE_LIST_ENTRY) Block)->Next; -} - -/* - * PVOID - * ExInterlockedAllocateFromZone( - * IN PZONE_HEADER Zone, - * IN PKSPIN_LOCK Lock) - */ -#define ExInterlockedAllocateFromZone(Zone, Lock) \ - ((PVOID) ExInterlockedPopEntryList(&Zone->FreeList, Lock)) - -/* PVOID - * ExInterlockedFreeToZone( - * IN PZONE_HEADER Zone, - * IN PVOID Block, - * IN PKSPIN_LOCK Lock); - */ -#define ExInterlockedFreeToZone(Zone, Block, Lock) \ - ExInterlockedPushEntryList(&(Zone)->FreeList, (PSINGLE_LIST_ENTRY)(Block), Lock) - -/* - * BOOLEAN - * ExIsFullZone( - * IN PZONE_HEADER Zone) - */ -#define ExIsFullZone(Zone) \ - ((Zone)->FreeList.Next == (PSINGLE_LIST_ENTRY) NULL) - -/* BOOLEAN - * ExIsObjectInFirstZoneSegment( - * IN PZONE_HEADER Zone, - * IN PVOID Object); - */ -#define ExIsObjectInFirstZoneSegment(Zone,Object) \ - ((BOOLEAN)( ((PUCHAR)(Object) >= (PUCHAR)(Zone)->SegmentList.Next) && \ - ((PUCHAR)(Object) < (PUCHAR)(Zone)->SegmentList.Next + \ - (Zone)->TotalSegmentSize)) ) - -#define ExAcquireResourceExclusive ExAcquireResourceExclusiveLite -#define ExAcquireResourceShared ExAcquireResourceSharedLite -#define ExConvertExclusiveToShared ExConvertExclusiveToSharedLite -#define ExDeleteResource ExDeleteResourceLite -#define ExInitializeResource ExInitializeResourceLite -#define ExIsResourceAcquiredExclusive ExIsResourceAcquiredExclusiveLite -#define ExIsResourceAcquiredShared ExIsResourceAcquiredSharedLite -#define ExIsResourceAcquired ExIsResourceAcquiredSharedLite -#define ExReleaseResourceForThread ExReleaseResourceForThreadLite - -#if (NTDDI_VERSION >= NTDDI_WIN2K) - -NTKERNELAPI -NTSTATUS -NTAPI -ExExtendZone( - IN OUT PZONE_HEADER Zone, - IN OUT PVOID Segment, - IN ULONG SegmentSize); - -NTKERNELAPI -NTSTATUS -NTAPI -ExInitializeZone( - OUT PZONE_HEADER Zone, - IN ULONG BlockSize, - IN OUT PVOID InitialSegment, - IN ULONG InitialSegmentSize); - -NTKERNELAPI -NTSTATUS -NTAPI -ExInterlockedExtendZone( - IN OUT PZONE_HEADER Zone, - IN OUT PVOID Segment, - IN ULONG SegmentSize, - IN OUT PKSPIN_LOCK Lock); - -NTKERNELAPI -NTSTATUS -NTAPI -ExUuidCreate( - OUT UUID *Uuid); - -NTKERNELAPI -DECLSPEC_NORETURN -VOID -NTAPI -ExRaiseAccessViolation( - VOID); - -NTKERNELAPI -DECLSPEC_NORETURN -VOID -NTAPI -ExRaiseDatatypeMisalignment( - VOID); - -#endif - -#ifdef _X86_ - -NTKERNELAPI -INTERLOCKED_RESULT -FASTCALL -Exfi386InterlockedIncrementLong( - IN OUT LONG volatile *Addend); - -NTKERNELAPI -INTERLOCKED_RESULT -FASTCALL -Exfi386InterlockedDecrementLong( - IN PLONG Addend); - -NTKERNELAPI +typedef +PVOID +(NTAPI *pKdMapPhysicalMemory64)( + IN PHYSICAL_ADDRESS PhysicalAddress, + IN ULONG NumberPages, + IN BOOLEAN FlushCurrentTLB); + +typedef +VOID +(NTAPI *pKdUnmapVirtualAddress)( + IN PVOID VirtualAddress, + IN ULONG NumberPages, + IN BOOLEAN FlushCurrentTLB); + +typedef ULONG -FASTCALL -Exfi386InterlockedExchangeUlong( - IN PULONG Target, - IN ULONG Value); - -#endif /* _X86_ */ - -#ifndef _ARC_DDK_ -#define _ARC_DDK_ -typedef enum _CONFIGURATION_TYPE { - ArcSystem, - CentralProcessor, - FloatingPointProcessor, - PrimaryIcache, - PrimaryDcache, - SecondaryIcache, - SecondaryDcache, - SecondaryCache, - EisaAdapter, - TcAdapter, - ScsiAdapter, - DtiAdapter, - MultiFunctionAdapter, - DiskController, - TapeController, - CdromController, - WormController, - SerialController, - NetworkController, - DisplayController, - ParallelController, - PointerController, - KeyboardController, - AudioController, - OtherController, - DiskPeripheral, - FloppyDiskPeripheral, - TapePeripheral, - ModemPeripheral, - MonitorPeripheral, - PrinterPeripheral, - PointerPeripheral, - KeyboardPeripheral, - TerminalPeripheral, - OtherPeripheral, - LinePeripheral, - NetworkPeripheral, - SystemMemory, - DockingInformation, - RealModeIrqRoutingTable, - RealModePCIEnumeration, - MaximumType -} CONFIGURATION_TYPE, *PCONFIGURATION_TYPE; -#endif /* !_ARC_DDK_ */ - -typedef struct _CONTROLLER_OBJECT { - CSHORT Type; - CSHORT Size; - PVOID ControllerExtension; - KDEVICE_QUEUE DeviceWaitQueue; - ULONG Spare1; - LARGE_INTEGER Spare2; -} CONTROLLER_OBJECT, *PCONTROLLER_OBJECT; - -typedef struct _CONFIGURATION_INFORMATION { - ULONG DiskCount; - ULONG FloppyCount; - ULONG CdRomCount; - ULONG TapeCount; - ULONG ScsiPortCount; - ULONG SerialCount; - ULONG ParallelCount; - BOOLEAN AtDiskPrimaryAddressClaimed; - BOOLEAN AtDiskSecondaryAddressClaimed; - ULONG Version; - ULONG MediumChangerCount; -} CONFIGURATION_INFORMATION, *PCONFIGURATION_INFORMATION; +(NTAPI *pKdGetPciDataByOffset)( + IN ULONG BusNumber, + IN ULONG SlotNumber, + OUT PVOID Buffer, + IN ULONG Offset, + IN ULONG Length); typedef -NTSTATUS -(DDKAPI *PIO_QUERY_DEVICE_ROUTINE)( - IN PVOID Context, - IN PUNICODE_STRING PathName, - IN INTERFACE_TYPE BusType, +ULONG +(NTAPI *pKdSetPciDataByOffset)( IN ULONG BusNumber, - IN PKEY_VALUE_FULL_INFORMATION *BusInformation, - IN CONFIGURATION_TYPE ControllerType, - IN ULONG ControllerNumber, - IN PKEY_VALUE_FULL_INFORMATION *ControllerInformation, - IN CONFIGURATION_TYPE PeripheralType, - IN ULONG PeripheralNumber, - IN PKEY_VALUE_FULL_INFORMATION *PeripheralInformation); - -typedef -VOID -(DDKAPI DRIVER_REINITIALIZE)( - IN struct _DRIVER_OBJECT *DriverObject, - IN PVOID Context, - IN ULONG Count); - -typedef DRIVER_REINITIALIZE *PDRIVER_REINITIALIZE; - -/** Filesystem runtime library routines **/ - -#if (NTDDI_VERSION >= NTDDI_WIN2K) -NTKERNELAPI -BOOLEAN -NTAPI -FsRtlIsTotalDeviceFailure( - IN NTSTATUS Status); -#endif - -/* Hardware Abstraction Layer Types */ - -typedef VOID -(NTAPI *PciPin2Line)( - IN struct _BUS_HANDLER *BusHandler, - IN struct _BUS_HANDLER *RootHandler, - IN PCI_SLOT_NUMBER SlotNumber, - IN PPCI_COMMON_CONFIG PciData); - -typedef VOID -(NTAPI *PciLine2Pin)( - IN struct _BUS_HANDLER *BusHandler, - IN struct _BUS_HANDLER *RootHandler, - IN PCI_SLOT_NUMBER SlotNumber, - IN PPCI_COMMON_CONFIG PciNewData, - IN PPCI_COMMON_CONFIG PciOldData); - -typedef VOID -(NTAPI *PciReadWriteConfig)( - IN struct _BUS_HANDLER *BusHandler, - IN PCI_SLOT_NUMBER Slot, + IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length); -#define PCI_DATA_TAG ' ICP' -#define PCI_DATA_VERSION 1 - -typedef struct _PCIBUSDATA { - ULONG Tag; +typedef BOOLEAN +(NTAPI *PHAL_RESET_DISPLAY_PARAMETERS)( + IN ULONG Columns, + IN ULONG Rows); + +typedef struct _HAL_DISPATCH { ULONG Version; - PciReadWriteConfig ReadConfig; - PciReadWriteConfig WriteConfig; - PciPin2Line Pin2Line; - PciLine2Pin Line2Pin; - PCI_SLOT_NUMBER ParentSlot; - PVOID Reserved[4]; -} PCIBUSDATA, *PPCIBUSDATA; + pHalQuerySystemInformation HalQuerySystemInformation; + pHalSetSystemInformation HalSetSystemInformation; + pHalQueryBusSlots HalQueryBusSlots; + ULONG Spare1; + pHalExamineMBR HalExamineMBR; + pHalIoReadPartitionTable HalIoReadPartitionTable; + pHalIoSetPartitionInformation HalIoSetPartitionInformation; + pHalIoWritePartitionTable HalIoWritePartitionTable; + pHalHandlerForBus HalReferenceHandlerForBus; + pHalReferenceBusHandler HalReferenceBusHandler; + pHalReferenceBusHandler HalDereferenceBusHandler; + pHalInitPnpDriver HalInitPnpDriver; + pHalInitPowerManagement HalInitPowerManagement; + pHalGetDmaAdapter HalGetDmaAdapter; + pHalGetInterruptTranslator HalGetInterruptTranslator; + pHalStartMirroring HalStartMirroring; + pHalEndMirroring HalEndMirroring; + pHalMirrorPhysicalMemory HalMirrorPhysicalMemory; + pHalEndOfBoot HalEndOfBoot; + pHalMirrorVerify HalMirrorVerify; + pHalGetAcpiTable HalGetCachedAcpiTable; + pHalSetPciErrorHandlerCallback HalSetPciErrorHandlerCallback; +#if defined(_IA64_) + pHalGetErrorCapList HalGetErrorCapList; + pHalInjectError HalInjectError; +#endif +} HAL_DISPATCH, *PHAL_DISPATCH; + +#if defined(_NTDRIVER_) || defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) + +extern PHAL_DISPATCH HalDispatchTable; +#define HALDISPATCH HalDispatchTable + +#else + +extern HAL_DISPATCH HalDispatchTable; +#define HALDISPATCH (&HalDispatchTable) + +#endif + +#define HAL_DISPATCH_VERSION 3 +#define HalDispatchTableVersion HALDISPATCH->Version +#define HalQuerySystemInformation HALDISPATCH->HalQuerySystemInformation +#define HalSetSystemInformation HALDISPATCH->HalSetSystemInformation +#define HalQueryBusSlots HALDISPATCH->HalQueryBusSlots +#define HalReferenceHandlerForBus HALDISPATCH->HalReferenceHandlerForBus +#define HalReferenceBusHandler HALDISPATCH->HalReferenceBusHandler +#define HalDereferenceBusHandler HALDISPATCH->HalDereferenceBusHandler +#define HalInitPnpDriver HALDISPATCH->HalInitPnpDriver +#define HalInitPowerManagement HALDISPATCH->HalInitPowerManagement +#define HalGetDmaAdapter HALDISPATCH->HalGetDmaAdapter +#define HalGetInterruptTranslator HALDISPATCH->HalGetInterruptTranslator +#define HalStartMirroring HALDISPATCH->HalStartMirroring +#define HalEndMirroring HALDISPATCH->HalEndMirroring +#define HalMirrorPhysicalMemory HALDISPATCH->HalMirrorPhysicalMemory +#define HalEndOfBoot HALDISPATCH->HalEndOfBoot +#define HalMirrorVerify HALDISPATCH->HalMirrorVerify + +typedef struct _FILE_ALIGNMENT_INFORMATION { + ULONG AlignmentRequirement; +} FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION; + +typedef struct _FILE_NAME_INFORMATION { + ULONG FileNameLength; + WCHAR FileName[1]; +} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION; + + +typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION { + ULONG FileAttributes; + ULONG ReparseTag; +} FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION; + +typedef struct _FILE_DISPOSITION_INFORMATION { + BOOLEAN DeleteFile; +} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION; + +typedef struct _FILE_END_OF_FILE_INFORMATION { + LARGE_INTEGER EndOfFile; +} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION; + +typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION { + LARGE_INTEGER ValidDataLength; +} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION; + +typedef union _FILE_SEGMENT_ELEMENT { + PVOID64 Buffer; + ULONGLONG Alignment; +}FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT; + +#define SE_UNSOLICITED_INPUT_PRIVILEGE 6 + +#if (NTDDI_VERSION >= NTDDI_WIN2K) +NTSYSAPI +ULONGLONG +NTAPI +VerSetConditionMask( + IN ULONGLONG ConditionMask, + IN ULONG TypeMask, + IN UCHAR Condition); +#endif + +#define VER_SET_CONDITION(ConditionMask, TypeBitMask, ComparisonType) \ + ((ConditionMask) = VerSetConditionMask((ConditionMask), \ + (TypeBitMask), (ComparisonType))) + +/* RtlVerifyVersionInfo() TypeMask */ + +#define VER_MINORVERSION 0x0000001 +#define VER_MAJORVERSION 0x0000002 +#define VER_BUILDNUMBER 0x0000004 +#define VER_PLATFORMID 0x0000008 +#define VER_SERVICEPACKMINOR 0x0000010 +#define VER_SERVICEPACKMAJOR 0x0000020 +#define VER_SUITENAME 0x0000040 +#define VER_PRODUCT_TYPE 0x0000080 + +/* RtlVerifyVersionInfo() ComparisonType */ + +#define VER_EQUAL 1 +#define VER_GREATER 2 +#define VER_GREATER_EQUAL 3 +#define VER_LESS 4 +#define VER_LESS_EQUAL 5 +#define VER_AND 6 +#define VER_OR 7 + +#define VER_CONDITION_MASK 7 +#define VER_NUM_BITS_PER_CONDITION_MASK 3 + +typedef struct _IMAGE_INFO { + _ANONYMOUS_UNION union { + ULONG Properties; + _ANONYMOUS_STRUCT struct { + ULONG ImageAddressingMode:8; + ULONG SystemModeImage:1; + ULONG ImageMappedToAllPids:1; + ULONG ExtendedInfoPresent:1; + ULONG Reserved:22; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + PVOID ImageBase; + ULONG ImageSelector; + SIZE_T ImageSize; + ULONG ImageSectionNumber; +} IMAGE_INFO, *PIMAGE_INFO; + +#define IMAGE_ADDRESSING_MODE_32BIT 3 typedef enum _BUS_DATA_TYPE { ConfigurationSpaceUndefined = -1, @@ -1190,797 +817,44 @@ MaximumBusDataType } BUS_DATA_TYPE, *PBUS_DATA_TYPE; -typedef -PVOID -(NTAPI *pHalGetAcpiTable)( - IN ULONG Signature, - IN PCSTR OemId OPTIONAL, - IN PCSTR OemTableId OPTIONAL); - -typedef -VOID -(NTAPI *PCI_ERROR_HANDLER_CALLBACK)( - VOID); - -typedef -VOID -(NTAPI *pHalSetPciErrorHandlerCallback)( - IN PCI_ERROR_HANDLER_CALLBACK Callback); - -#if 1 /* Not present in WDK 7600 */ -typedef VOID -(FASTCALL *pHalIoAssignDriveLetters)( - IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, - IN PSTRING NtDeviceName, - OUT PUCHAR NtSystemPath, - OUT PSTRING NtSystemPathString); -#endif - -typedef struct { - ULONG Version; - pHalQuerySystemInformation HalQuerySystemInformation; - pHalSetSystemInformation HalSetSystemInformation; - pHalQueryBusSlots HalQueryBusSlots; - ULONG Spare1; - pHalExamineMBR HalExamineMBR; -#if 1 /* Not present in WDK 7600 */ - pHalIoAssignDriveLetters HalIoAssignDriveLetters; -#endif - pHalIoReadPartitionTable HalIoReadPartitionTable; - pHalIoSetPartitionInformation HalIoSetPartitionInformation; - pHalIoWritePartitionTable HalIoWritePartitionTable; - pHalHandlerForBus HalReferenceHandlerForBus; - pHalReferenceBusHandler HalReferenceBusHandler; - pHalReferenceBusHandler HalDereferenceBusHandler; - pHalInitPnpDriver HalInitPnpDriver; - pHalInitPowerManagement HalInitPowerManagement; - pHalGetDmaAdapter HalGetDmaAdapter; - pHalGetInterruptTranslator HalGetInterruptTranslator; - pHalStartMirroring HalStartMirroring; - pHalEndMirroring HalEndMirroring; - pHalMirrorPhysicalMemory HalMirrorPhysicalMemory; - pHalEndOfBoot HalEndOfBoot; - pHalMirrorVerify HalMirrorVerify; - pHalGetAcpiTable HalGetCachedAcpiTable; - pHalSetPciErrorHandlerCallback HalSetPciErrorHandlerCallback; -#if defined(_IA64_) - pHalGetErrorCapList HalGetErrorCapList; - pHalInjectError HalInjectError; -#endif -} HAL_DISPATCH, *PHAL_DISPATCH; - -/* GCC/MSVC and WDK compatible declaration */ -extern NTKERNELAPI HAL_DISPATCH HalDispatchTable; - -#if defined(_NTOSKRNL_) || defined(_BLDR_) -#define HALDISPATCH (&HalDispatchTable) -#else -/* This is a WDK compatibility definition */ -#define HalDispatchTable (&HalDispatchTable) -#define HALDISPATCH HalDispatchTable -#endif - -#define HAL_DISPATCH_VERSION 3 // FIXME: when to use 4? -#define HalDispatchTableVersion HALDISPATCH->Version -#define HalQuerySystemInformation HALDISPATCH->HalQuerySystemInformation -#define HalSetSystemInformation HALDISPATCH->HalSetSystemInformation -#define HalQueryBusSlots HALDISPATCH->HalQueryBusSlots -#define HalReferenceHandlerForBus HALDISPATCH->HalReferenceHandlerForBus -#define HalReferenceBusHandler HALDISPATCH->HalReferenceBusHandler -#define HalDereferenceBusHandler HALDISPATCH->HalDereferenceBusHandler -#define HalInitPnpDriver HALDISPATCH->HalInitPnpDriver -#define HalInitPowerManagement HALDISPATCH->HalInitPowerManagement -#define HalGetDmaAdapter HALDISPATCH->HalGetDmaAdapter -#define HalGetInterruptTranslator HALDISPATCH->HalGetInterruptTranslator -#define HalStartMirroring HALDISPATCH->HalStartMirroring -#define HalEndMirroring HALDISPATCH->HalEndMirroring -#define HalMirrorPhysicalMemory HALDISPATCH->HalMirrorPhysicalMemory -#define HalEndOfBoot HALDISPATCH->HalEndOfBoot -#define HalMirrorVerify HALDISPATCH->HalMirrorVerify - -/* Hardware Abstraction Layer Functions */ - -#if !defined(NO_LEGACY_DRIVERS) - -#if (NTDDI_VERSION >= NTDDI_WIN2K) - -NTHALAPI -NTSTATUS -NTAPI -HalAssignSlotResources( - IN PUNICODE_STRING RegistryPath, - IN PUNICODE_STRING DriverClassName, - IN PDRIVER_OBJECT DriverObject, - IN PDEVICE_OBJECT DeviceObject, - IN INTERFACE_TYPE BusType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN OUT PCM_RESOURCE_LIST *AllocatedResources); - -NTHALAPI -ULONG -NTAPI -HalGetInterruptVector( - IN INTERFACE_TYPE InterfaceType, - IN ULONG BusNumber, - IN ULONG BusInterruptLevel, - IN ULONG BusInterruptVector, - OUT PKIRQL Irql, - OUT PKAFFINITY Affinity); - -NTHALAPI -ULONG -NTAPI -HalSetBusData( - IN BUS_DATA_TYPE BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN PVOID Buffer, - IN ULONG Length); - -#endif - -#endif /* !defined(NO_LEGACY_DRIVERS) */ - -#if (NTDDI_VERSION >= NTDDI_WIN2K) - -NTHALAPI -PADAPTER_OBJECT -NTAPI -HalGetAdapter( - IN PDEVICE_DESCRIPTION DeviceDescription, - IN OUT PULONG NumberOfMapRegisters); - -NTHALAPI -BOOLEAN -NTAPI -HalMakeBeep( - IN ULONG Frequency); - -VOID -NTAPI -HalPutDmaAdapter( - IN PADAPTER_OBJECT DmaAdapter); - -typedef -BOOLEAN -(DDKAPI *PHAL_RESET_DISPLAY_PARAMETERS)( - ULONG Columns, - ULONG Rows); - -NTHALAPI -VOID -NTAPI -HalAcquireDisplayOwnership( - IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters); - -NTHALAPI -ULONG -NTAPI -HalGetBusData( - IN BUS_DATA_TYPE BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - OUT PVOID Buffer, - IN ULONG Length); - -NTHALAPI -ULONG -NTAPI -HalGetBusDataByOffset( - IN BUS_DATA_TYPE BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - OUT PVOID Buffer, - IN ULONG Offset, - IN ULONG Length); - -NTHALAPI -ULONG -NTAPI -HalSetBusDataByOffset( - IN BUS_DATA_TYPE BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN PVOID Buffer, - IN ULONG Offset, - IN ULONG Length); - -NTHALAPI -BOOLEAN -NTAPI -HalTranslateBusAddress( - IN INTERFACE_TYPE InterfaceType, - IN ULONG BusNumber, - IN PHYSICAL_ADDRESS BusAddress, - IN OUT PULONG AddressSpace, - OUT PPHYSICAL_ADDRESS TranslatedAddress); - -#endif - -#if (NTDDI_VERSION >= NTDDI_WINXP) -NTKERNELAPI -VOID -FASTCALL -HalExamineMBR( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG SectorSize, - IN ULONG MBRTypeIdentifier, - OUT PVOID *Buffer); -#endif - -typedef struct _DISK_SIGNATURE { - ULONG PartitionStyle; +typedef struct _NT_TIB { + struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList; + PVOID StackBase; + PVOID StackLimit; + PVOID SubSystemTib; _ANONYMOUS_UNION union { - struct { - ULONG Signature; - ULONG CheckSum; - } Mbr; - struct { - GUID DiskId; - } Gpt; + PVOID FiberData; + ULONG Version; } DUMMYUNIONNAME; -} DISK_SIGNATURE, *PDISK_SIGNATURE; - -#if defined(USE_DMA_MACROS) && !defined(_NTHAL_) && (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_) -// nothing here -#else - -#if (NTDDI_VERSION >= NTDDI_WIN2K) -//DECLSPEC_DEPRECATED_DDK -NTHALAPI -VOID -NTAPI -IoFreeAdapterChannel( - IN PADAPTER_OBJECT AdapterObject); - -//DECLSPEC_DEPRECATED_DDK -NTHALAPI -BOOLEAN -NTAPI -IoFlushAdapterBuffers( - IN PADAPTER_OBJECT AdapterObject, - IN PMDL Mdl, - IN PVOID MapRegisterBase, - IN PVOID CurrentVa, - IN ULONG Length, - IN BOOLEAN WriteToDevice); - -//DECLSPEC_DEPRECATED_DDK -NTHALAPI -VOID -NTAPI -IoFreeMapRegisters( - IN PADAPTER_OBJECT AdapterObject, - IN PVOID MapRegisterBase, - IN ULONG NumberOfMapRegisters); - -//DECLSPEC_DEPRECATED_DDK -NTHALAPI -PVOID -NTAPI -HalAllocateCommonBuffer( - IN PADAPTER_OBJECT AdapterObject, - IN ULONG Length, - OUT PPHYSICAL_ADDRESS LogicalAddress, - IN BOOLEAN CacheEnabled); - -//DECLSPEC_DEPRECATED_DDK -NTHALAPI -VOID -NTAPI -HalFreeCommonBuffer( - IN PADAPTER_OBJECT AdapterObject, - IN ULONG Length, - IN PHYSICAL_ADDRESS LogicalAddress, - IN PVOID VirtualAddress, - IN BOOLEAN CacheEnabled); - -//DECLSPEC_DEPRECATED_DDK -NTHALAPI -ULONG -NTAPI -HalReadDmaCounter( - IN PADAPTER_OBJECT AdapterObject); - -NTHALAPI -NTSTATUS -NTAPI -HalAllocateAdapterChannel( - IN PADAPTER_OBJECT AdapterObject, - IN PWAIT_CONTEXT_BLOCK Wcb, - IN ULONG NumberOfMapRegisters, - IN PDRIVER_CONTROL ExecutionRoutine); - -#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ - -#endif /* defined(USE_DMA_MACROS) && !defined(_NTHAL_) && (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_) */ - -/* I/O Manager Functions */ - -/* - * VOID IoAssignArcName( - * IN PUNICODE_STRING ArcName, - * IN PUNICODE_STRING DeviceName); - */ -#define IoAssignArcName(_ArcName, _DeviceName) ( \ - IoCreateSymbolicLink((_ArcName), (_DeviceName))) - -/* - * VOID - * IoDeassignArcName( - * IN PUNICODE_STRING ArcName) - */ -#define IoDeassignArcName IoDeleteSymbolicLink - -#if (NTDDI_VERSION >= NTDDI_WIN2K) - -#if !(defined(USE_DMA_MACROS) && (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_)) -NTKERNELAPI -NTSTATUS -NTAPI -IoAllocateAdapterChannel( - IN PADAPTER_OBJECT AdapterObject, - IN PDEVICE_OBJECT DeviceObject, - IN ULONG NumberOfMapRegisters, - IN PDRIVER_CONTROL ExecutionRoutine, - IN PVOID Context); -#endif - -//DECLSPEC_DEPRECATED_DDK -NTHALAPI -PHYSICAL_ADDRESS -NTAPI -IoMapTransfer( - IN PADAPTER_OBJECT AdapterObject, - IN PMDL Mdl, - IN PVOID MapRegisterBase, - IN PVOID CurrentVa, - IN OUT PULONG Length, - IN BOOLEAN WriteToDevice); - -NTKERNELAPI -VOID -NTAPI -IoAllocateController( - IN PCONTROLLER_OBJECT ControllerObject, - IN PDEVICE_OBJECT DeviceObject, - IN PDRIVER_CONTROL ExecutionRoutine, - IN PVOID Context OPTIONAL); - -NTKERNELAPI -PCONTROLLER_OBJECT -NTAPI -IoCreateController( - IN ULONG Size); - -NTKERNELAPI -VOID -NTAPI -IoDeleteController( - IN PCONTROLLER_OBJECT ControllerObject); - -NTKERNELAPI -VOID -NTAPI -IoFreeController( - IN PCONTROLLER_OBJECT ControllerObject); - -NTKERNELAPI -PCONFIGURATION_INFORMATION -NTAPI -IoGetConfigurationInformation( - VOID); - -NTKERNELAPI -PDEVICE_OBJECT -NTAPI -IoGetDeviceToVerify( - IN PETHREAD Thread); - -NTKERNELAPI -VOID -NTAPI -IoCancelFileOpen( - IN PDEVICE_OBJECT DeviceObject, - IN PFILE_OBJECT FileObject); - -NTKERNELAPI -PGENERIC_MAPPING -NTAPI -IoGetFileObjectGenericMapping( - VOID); - -NTKERNELAPI -PIRP -NTAPI -IoMakeAssociatedIrp( - IN PIRP Irp, - IN CCHAR StackSize); - -NTKERNELAPI -NTSTATUS -NTAPI -IoQueryDeviceDescription( - IN PINTERFACE_TYPE BusType OPTIONAL, - IN PULONG BusNumber OPTIONAL, - IN PCONFIGURATION_TYPE ControllerType OPTIONAL, - IN PULONG ControllerNumber OPTIONAL, - IN PCONFIGURATION_TYPE PeripheralType OPTIONAL, - IN PULONG PeripheralNumber OPTIONAL, - IN PIO_QUERY_DEVICE_ROUTINE CalloutRoutine, - IN OUT PVOID Context OPTIONAL); - -NTKERNELAPI -VOID -NTAPI -IoRaiseHardError( - IN PIRP Irp, - IN PVPB Vpb OPTIONAL, - IN PDEVICE_OBJECT RealDeviceObject); - -NTKERNELAPI -BOOLEAN -NTAPI -IoRaiseInformationalHardError( - IN NTSTATUS ErrorStatus, - IN PUNICODE_STRING String OPTIONAL, - IN PKTHREAD Thread OPTIONAL); - -NTKERNELAPI -VOID -NTAPI -IoRegisterBootDriverReinitialization( - IN PDRIVER_OBJECT DriverObject, - IN PDRIVER_REINITIALIZE DriverReinitializationRoutine, - IN PVOID Context OPTIONAL); - -NTKERNELAPI -VOID -NTAPI -IoRegisterDriverReinitialization( - IN PDRIVER_OBJECT DriverObject, - IN PDRIVER_REINITIALIZE DriverReinitializationRoutine, - IN PVOID Context OPTIONAL); - -NTKERNELAPI -NTSTATUS -NTAPI -IoAttachDeviceByPointer( - IN PDEVICE_OBJECT SourceDevice, - IN PDEVICE_OBJECT TargetDevice); - -NTKERNELAPI -NTSTATUS -NTAPI -IoReportDetectedDevice( - IN PDRIVER_OBJECT DriverObject, - IN INTERFACE_TYPE LegacyBusType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN PCM_RESOURCE_LIST ResourceList OPTIONAL, - IN PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements OPTIONAL, - IN BOOLEAN ResourceAssigned, - IN OUT PDEVICE_OBJECT *DeviceObject); - -NTKERNELAPI -NTSTATUS -NTAPI -IoReportResourceForDetection( - IN PDRIVER_OBJECT DriverObject, - IN PCM_RESOURCE_LIST DriverList OPTIONAL, - IN ULONG DriverListSize OPTIONAL, - IN PDEVICE_OBJECT DeviceObject OPTIONAL, - IN PCM_RESOURCE_LIST DeviceList OPTIONAL, - IN ULONG DeviceListSize OPTIONAL, - OUT PBOOLEAN ConflictDetected); - -NTKERNELAPI -NTSTATUS -NTAPI -IoReportResourceUsage( - IN PUNICODE_STRING DriverClassName OPTIONAL, - IN PDRIVER_OBJECT DriverObject, - IN PCM_RESOURCE_LIST DriverList OPTIONAL, - IN ULONG DriverListSize OPTIONAL, - IN PDEVICE_OBJECT DeviceObject, - IN PCM_RESOURCE_LIST DeviceList OPTIONAL, - IN ULONG DeviceListSize OPTIONAL, - IN BOOLEAN OverrideConflict, - OUT PBOOLEAN ConflictDetected); - -NTKERNELAPI -VOID -NTAPI -IoSetHardErrorOrVerifyDevice( - IN PIRP Irp, - IN PDEVICE_OBJECT DeviceObject); - -NTKERNELAPI -NTSTATUS -NTAPI -IoAssignResources( - IN PUNICODE_STRING RegistryPath, - IN PUNICODE_STRING DriverClassName OPTIONAL, - IN PDRIVER_OBJECT DriverObject, - IN PDEVICE_OBJECT DeviceObject OPTIONAL, - IN PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources OPTIONAL, - IN OUT PCM_RESOURCE_LIST *AllocatedResources); - -#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ - -#if (NTDDI_VERSION >= NTDDI_WINXP) - -NTKERNELAPI -NTSTATUS -NTAPI -IoCreateDisk( - IN PDEVICE_OBJECT DeviceObject, - IN struct _CREATE_DISK* Disk OPTIONAL); - -NTKERNELAPI -NTSTATUS -NTAPI -IoReadDiskSignature( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG BytesPerSector, - OUT PDISK_SIGNATURE Signature); - -NTKERNELAPI -NTSTATUS -FASTCALL -IoReadPartitionTable( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG SectorSize, - IN BOOLEAN ReturnRecognizedPartitions, - OUT struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer); - -NTKERNELAPI -NTSTATUS -NTAPI -IoReadPartitionTableEx( - IN PDEVICE_OBJECT DeviceObject, - IN struct _DRIVE_LAYOUT_INFORMATION_EX **PartitionBuffer); - -NTKERNELAPI -NTSTATUS -FASTCALL -IoSetPartitionInformation( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG SectorSize, - IN ULONG PartitionNumber, - IN ULONG PartitionType); - -NTKERNELAPI -NTSTATUS -NTAPI -IoSetPartitionInformationEx( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG PartitionNumber, - IN struct _SET_PARTITION_INFORMATION_EX *PartitionInfo); - -NTKERNELAPI -NTSTATUS -NTAPI -IoSetSystemPartition( - IN PUNICODE_STRING VolumeNameString); - -NTKERNELAPI -BOOLEAN -NTAPI -IoSetThreadHardErrorMode( - IN BOOLEAN EnableHardErrors); - -NTKERNELAPI -NTSTATUS -NTAPI -IoVerifyPartitionTable( - IN PDEVICE_OBJECT DeviceObject, - IN BOOLEAN FixErrors); - -NTKERNELAPI -NTSTATUS -NTAPI -IoVolumeDeviceToDosName( - IN PVOID VolumeDeviceObject, - OUT PUNICODE_STRING DosName); - -NTKERNELAPI -NTSTATUS -FASTCALL -IoWritePartitionTable( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG SectorSize, - IN ULONG SectorsPerTrack, - IN ULONG NumberOfHeads, - IN struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer); - -NTKERNELAPI -NTSTATUS -NTAPI -IoWritePartitionTableEx( - IN PDEVICE_OBJECT DeviceObject, - IN struct _DRIVE_LAYOUT_INFORMATION_EX *DriveLayout); - -#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ - -/** Kernel debugger routines **/ - -NTSYSAPI -ULONG -NTAPI -DbgPrompt( - IN PCCH Prompt, - OUT PCH Response, - IN ULONG MaximumResponseLength); - -/* Kernel Functions */ - -#if (NTDDI_VERSION >= NTDDI_WIN2K) - -NTKERNELAPI -DECLSPEC_NORETURN -VOID -NTAPI -KeBugCheck( - IN ULONG BugCheckCode); - -NTKERNELAPI -LONG -NTAPI -KePulseEvent( - IN OUT PRKEVENT Event, - IN KPRIORITY Increment, - IN BOOLEAN Wait); - -NTKERNELAPI -LONG -NTAPI -KeSetBasePriorityThread( - IN OUT PRKTHREAD Thread, - IN LONG Increment); - -#endif - -/* Memory Manager Types */ - -typedef struct _PHYSICAL_MEMORY_RANGE { - PHYSICAL_ADDRESS BaseAddress; - LARGE_INTEGER NumberOfBytes; -} PHYSICAL_MEMORY_RANGE, *PPHYSICAL_MEMORY_RANGE; - -/* Memory Manager Functions */ - -#if (NTDDI_VERSION >= NTDDI_WIN2K) - -NTKERNELAPI -PPHYSICAL_MEMORY_RANGE -NTAPI -MmGetPhysicalMemoryRanges( - VOID); - -NTKERNELAPI -PHYSICAL_ADDRESS -NTAPI -MmGetPhysicalAddress( - IN PVOID BaseAddress); - -NTKERNELAPI -BOOLEAN -NTAPI -MmIsNonPagedSystemAddressValid( - IN PVOID VirtualAddress); - -NTKERNELAPI -PVOID -NTAPI -MmAllocateNonCachedMemory( - IN SIZE_T NumberOfBytes); - -NTKERNELAPI -VOID -NTAPI -MmFreeNonCachedMemory( - IN PVOID BaseAddress, - IN SIZE_T NumberOfBytes); - -NTKERNELAPI -PVOID -NTAPI -MmGetVirtualForPhysical( - IN PHYSICAL_ADDRESS PhysicalAddress); - -NTKERNELAPI -NTSTATUS -NTAPI -MmMapUserAddressesToPage( - IN PVOID BaseAddress, - IN SIZE_T NumberOfBytes, - IN PVOID PageAddress); - -NTKERNELAPI -PVOID -NTAPI -MmMapVideoDisplay( - IN PHYSICAL_ADDRESS PhysicalAddress, - IN SIZE_T NumberOfBytes, - IN MEMORY_CACHING_TYPE CacheType); - -NTKERNELAPI -NTSTATUS -NTAPI -MmMapViewInSessionSpace( - IN PVOID Section, - OUT PVOID *MappedBase, - IN OUT PSIZE_T ViewSize); - -NTKERNELAPI -NTSTATUS -NTAPI -MmMapViewInSystemSpace( - IN PVOID Section, - OUT PVOID *MappedBase, - IN OUT PSIZE_T ViewSize); - -NTKERNELAPI -BOOLEAN -NTAPI -MmIsAddressValid( - IN PVOID VirtualAddress); - -NTKERNELAPI -BOOLEAN -NTAPI -MmIsThisAnNtAsSystem( - VOID); - -NTKERNELAPI -VOID -NTAPI -MmLockPagableSectionByHandle( - IN PVOID ImageSectionHandle); - -NTKERNELAPI -NTSTATUS -NTAPI -MmUnmapViewInSessionSpace( - IN PVOID MappedBase); - -NTKERNELAPI -NTSTATUS -NTAPI -MmUnmapViewInSystemSpace( - IN PVOID MappedBase); - -NTKERNELAPI -VOID -NTAPI -MmUnsecureVirtualMemory( - IN HANDLE SecureHandle); - -NTKERNELAPI -NTSTATUS -NTAPI -MmRemovePhysicalMemory( - IN PPHYSICAL_ADDRESS StartAddress, - IN OUT PLARGE_INTEGER NumberOfBytes); - -NTKERNELAPI -HANDLE -NTAPI -MmSecureVirtualMemory( - IN PVOID Address, - IN SIZE_T Size, - IN ULONG ProbeMode); - -NTKERNELAPI -VOID -NTAPI -MmUnmapVideoDisplay( - IN PVOID BaseAddress, - IN SIZE_T NumberOfBytes); - -#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ + PVOID ArbitraryUserPointer; + struct _NT_TIB *Self; +} NT_TIB, *PNT_TIB; + +typedef struct _NT_TIB32 { + ULONG ExceptionList; + ULONG StackBase; + ULONG StackLimit; + ULONG SubSystemTib; + __GNU_EXTENSION union { + ULONG FiberData; + ULONG Version; + }; + ULONG ArbitraryUserPointer; + ULONG Self; +} NT_TIB32,*PNT_TIB32; + +typedef struct _NT_TIB64 { + ULONG64 ExceptionList; + ULONG64 StackBase; + ULONG64 StackLimit; + ULONG64 SubSystemTib; + __GNU_EXTENSION union { + ULONG64 FiberData; + ULONG Version; + }; + ULONG64 ArbitraryUserPointer; + ULONG64 Self; +} NT_TIB64,*PNT_TIB64; typedef enum _PROCESSINFOCLASS { ProcessBasicInformation, @@ -2075,6 +949,1416 @@ MaxThreadInfoClass } THREADINFOCLASS; +typedef struct _PROCESS_BASIC_INFORMATION { + NTSTATUS ExitStatus; + struct _PEB *PebBaseAddress; + ULONG_PTR AffinityMask; + KPRIORITY BasePriority; + ULONG_PTR UniqueProcessId; + ULONG_PTR InheritedFromUniqueProcessId; +} PROCESS_BASIC_INFORMATION,*PPROCESS_BASIC_INFORMATION; + +typedef struct _PROCESS_WS_WATCH_INFORMATION { + PVOID FaultingPc; + PVOID FaultingVa; +} PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION; + +typedef struct _PROCESS_DEVICEMAP_INFORMATION { + __GNU_EXTENSION union { + struct { + HANDLE DirectoryHandle; + } Set; + struct { + ULONG DriveMap; + UCHAR DriveType[32]; + } Query; + }; +} PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION; + +typedef struct _KERNEL_USER_TIMES { + LARGE_INTEGER CreateTime; + LARGE_INTEGER ExitTime; + LARGE_INTEGER KernelTime; + LARGE_INTEGER UserTime; +} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES; + +typedef struct _PROCESS_ACCESS_TOKEN { + HANDLE Token; + HANDLE Thread; +} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN; + +typedef struct _PROCESS_SESSION_INFORMATION { + ULONG SessionId; +} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION; + +typedef enum _IO_QUERY_DEVICE_DATA_FORMAT { + IoQueryDeviceIdentifier = 0, + IoQueryDeviceConfigurationData, + IoQueryDeviceComponentInformation, + IoQueryDeviceMaxData +} IO_QUERY_DEVICE_DATA_FORMAT, *PIO_QUERY_DEVICE_DATA_FORMAT; + +typedef struct _DISK_SIGNATURE { + ULONG PartitionStyle; + _ANONYMOUS_UNION union { + struct { + ULONG Signature; + ULONG CheckSum; + } Mbr; + struct { + GUID DiskId; + } Gpt; + } DUMMYUNIONNAME; +} DISK_SIGNATURE, *PDISK_SIGNATURE; + +typedef ULONG_PTR +(NTAPI *PDRIVER_VERIFIER_THUNK_ROUTINE)( + IN PVOID Context); + +typedef struct _DRIVER_VERIFIER_THUNK_PAIRS { + PDRIVER_VERIFIER_THUNK_ROUTINE PristineRoutine; + PDRIVER_VERIFIER_THUNK_ROUTINE NewRoutine; +} DRIVER_VERIFIER_THUNK_PAIRS, *PDRIVER_VERIFIER_THUNK_PAIRS; + +#define DRIVER_VERIFIER_SPECIAL_POOLING 0x0001 +#define DRIVER_VERIFIER_FORCE_IRQL_CHECKING 0x0002 +#define DRIVER_VERIFIER_INJECT_ALLOCATION_FAILURES 0x0004 +#define DRIVER_VERIFIER_TRACK_POOL_ALLOCATIONS 0x0008 +#define DRIVER_VERIFIER_IO_CHECKING 0x0010 + +typedef VOID +(NTAPI *PTIMER_APC_ROUTINE)( + IN PVOID TimerContext, + IN ULONG TimerLowValue, + IN LONG TimerHighValue); + +typedef struct _KUSER_SHARED_DATA +{ + ULONG TickCountLowDeprecated; + ULONG TickCountMultiplier; + volatile KSYSTEM_TIME InterruptTime; + volatile KSYSTEM_TIME SystemTime; + volatile KSYSTEM_TIME TimeZoneBias; + USHORT ImageNumberLow; + USHORT ImageNumberHigh; + WCHAR NtSystemRoot[260]; + ULONG MaxStackTraceDepth; + ULONG CryptoExponent; + ULONG TimeZoneId; + ULONG LargePageMinimum; + ULONG Reserved2[7]; + NT_PRODUCT_TYPE NtProductType; + BOOLEAN ProductTypeIsValid; + ULONG NtMajorVersion; + ULONG NtMinorVersion; + BOOLEAN ProcessorFeatures[PROCESSOR_FEATURE_MAX]; + ULONG Reserved1; + ULONG Reserved3; + volatile ULONG TimeSlip; + ALTERNATIVE_ARCHITECTURE_TYPE AlternativeArchitecture; + ULONG AltArchitecturePad[1]; + LARGE_INTEGER SystemExpirationDate; + ULONG SuiteMask; + BOOLEAN KdDebuggerEnabled; +#if (NTDDI_VERSION >= NTDDI_WINXPSP2) + UCHAR NXSupportPolicy; +#endif + volatile ULONG ActiveConsoleId; + volatile ULONG DismountCount; + ULONG ComPlusPackage; + ULONG LastSystemRITEventTickCount; + ULONG NumberOfPhysicalPages; + BOOLEAN SafeBootMode; +#if (NTDDI_VERSION >= NTDDI_WIN7) + union { + UCHAR TscQpcData; + struct { + UCHAR TscQpcEnabled:1; + UCHAR TscQpcSpareFlag:1; + UCHAR TscQpcShift:6; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + UCHAR TscQpcPad[2]; +#endif +#if (NTDDI_VERSION >= NTDDI_VISTA) + union { + ULONG SharedDataFlags; + struct { + ULONG DbgErrorPortPresent:1; + ULONG DbgElevationEnabled:1; + ULONG DbgVirtEnabled:1; + ULONG DbgInstallerDetectEnabled:1; + ULONG DbgSystemDllRelocated:1; + ULONG DbgDynProcessorEnabled:1; + ULONG DbgSEHValidationEnabled:1; + ULONG SpareBits:25; + } DUMMYSTRUCTNAME2; + } DUMMYUNIONNAME2; +#else + ULONG TraceLogging; +#endif + ULONG DataFlagsPad[1]; + ULONGLONG TestRetInstruction; + ULONG SystemCall; + ULONG SystemCallReturn; + ULONGLONG SystemCallPad[3]; + _ANONYMOUS_UNION union { + volatile KSYSTEM_TIME TickCount; + volatile ULONG64 TickCountQuad; + _ANONYMOUS_STRUCT struct { + ULONG ReservedTickCountOverlay[3]; + ULONG TickCountPad[1]; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME3; + ULONG Cookie; + ULONG CookiePad[1]; +#if (NTDDI_VERSION >= NTDDI_WS03) + LONGLONG ConsoleSessionForegroundProcessId; + ULONG Wow64SharedInformation[MAX_WOW64_SHARED_ENTRIES]; +#endif +#if (NTDDI_VERSION >= NTDDI_VISTA) +#if (NTDDI_VERSION >= NTDDI_WIN7) + USHORT UserModeGlobalLogger[16]; +#else + USHORT UserModeGlobalLogger[8]; + ULONG HeapTracingPid[2]; + ULONG CritSecTracingPid[2]; +#endif + ULONG ImageFileExecutionOptions; +#if (NTDDI_VERSION >= NTDDI_VISTASP1) + ULONG LangGenerationCount; +#else + /* 4 bytes padding */ +#endif + ULONGLONG Reserved5; + volatile ULONG64 InterruptTimeBias; +#endif +#if (NTDDI_VERSION >= NTDDI_WIN7) + volatile ULONG64 TscQpcBias; + volatile ULONG ActiveProcessorCount; + volatile USHORT ActiveGroupCount; + USHORT Reserved4; + volatile ULONG AitSamplingValue; + volatile ULONG AppCompatFlag; + ULONGLONG SystemDllNativeRelocation; + ULONG SystemDllWowRelocation; + ULONG XStatePad[1]; + XSTATE_CONFIGURATION XState; +#endif +} KUSER_SHARED_DATA, *PKUSER_SHARED_DATA; + +#ifdef _X86_ + +#define KERNEL_STACK_SIZE 12288 +#define KERNEL_LARGE_STACK_SIZE 61440 +#define KERNEL_LARGE_STACK_COMMIT 12288 + +#define SIZE_OF_80387_REGISTERS 80 + +#define PCR_MINOR_VERSION 1 +#define PCR_MAJOR_VERSION 1 + +#if !defined(RC_INVOKED) + +#define CONTEXT_i386 0x10000 +#define CONTEXT_i486 0x10000 +#define CONTEXT_CONTROL (CONTEXT_i386|0x00000001L) +#define CONTEXT_INTEGER (CONTEXT_i386|0x00000002L) +#define CONTEXT_SEGMENTS (CONTEXT_i386|0x00000004L) +#define CONTEXT_FLOATING_POINT (CONTEXT_i386|0x00000008L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L) +#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L) + +#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS) + +#endif /* !defined(RC_INVOKED) */ + +typedef struct _KPCR { + union { + NT_TIB NtTib; + struct { + struct _EXCEPTION_REGISTRATION_RECORD *Used_ExceptionList; + PVOID Used_StackBase; + PVOID Spare2; + PVOID TssCopy; + ULONG ContextSwitches; + KAFFINITY SetMemberCopy; + PVOID Used_Self; + }; + }; + struct _KPCR *SelfPcr; + struct _KPRCB *Prcb; + KIRQL Irql; + ULONG IRR; + ULONG IrrActive; + ULONG IDR; + PVOID KdVersionBlock; + struct _KIDTENTRY *IDT; + struct _KGDTENTRY *GDT; + struct _KTSS *TSS; + USHORT MajorVersion; + USHORT MinorVersion; + KAFFINITY SetMember; + ULONG StallScaleFactor; + UCHAR SpareUnused; + UCHAR Number; + UCHAR Spare0; + UCHAR SecondLevelCacheAssociativity; + ULONG VdmAlert; + ULONG KernelReserved[14]; + ULONG SecondLevelCacheSize; + ULONG HalReserved[16]; +} KPCR, *PKPCR; + +typedef struct _FLOATING_SAVE_AREA { + ULONG ControlWord; + ULONG StatusWord; + ULONG TagWord; + ULONG ErrorOffset; + ULONG ErrorSelector; + ULONG DataOffset; + ULONG DataSelector; + UCHAR RegisterArea[SIZE_OF_80387_REGISTERS]; + ULONG Cr0NpxState; +} FLOATING_SAVE_AREA, *PFLOATING_SAVE_AREA; + +#include "pshpack4.h" +typedef struct _CONTEXT { + ULONG ContextFlags; + ULONG Dr0; + ULONG Dr1; + ULONG Dr2; + ULONG Dr3; + ULONG Dr6; + ULONG Dr7; + FLOATING_SAVE_AREA FloatSave; + ULONG SegGs; + ULONG SegFs; + ULONG SegEs; + ULONG SegDs; + ULONG Edi; + ULONG Esi; + ULONG Ebx; + ULONG Edx; + ULONG Ecx; + ULONG Eax; + ULONG Ebp; + ULONG Eip; + ULONG SegCs; + ULONG EFlags; + ULONG Esp; + ULONG SegSs; + UCHAR ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION]; +} CONTEXT; +#include "poppack.h" + +#endif /* _X86_ */ + +#ifdef _AMD64_ + +#if !defined(RC_INVOKED) + +#define CONTEXT_AMD64 0x100000 + +#define CONTEXT_CONTROL (CONTEXT_AMD64 | 0x1L) +#define CONTEXT_INTEGER (CONTEXT_AMD64 | 0x2L) +#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x4L) +#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x8L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x10L) + +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) +#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS) + +#define CONTEXT_XSTATE (CONTEXT_AMD64 | 0x20L) + +#define CONTEXT_EXCEPTION_ACTIVE 0x8000000 +#define CONTEXT_SERVICE_ACTIVE 0x10000000 +#define CONTEXT_EXCEPTION_REQUEST 0x40000000 +#define CONTEXT_EXCEPTION_REPORTING 0x80000000 + +#endif /* RC_INVOKED */ + +#endif /* _AMD64_ */ + +typedef enum _INTERLOCKED_RESULT { + ResultNegative = RESULT_NEGATIVE, + ResultZero = RESULT_ZERO, + ResultPositive = RESULT_POSITIVE +} INTERLOCKED_RESULT; + +typedef struct _OSVERSIONINFOA { + ULONG dwOSVersionInfoSize; + ULONG dwMajorVersion; + ULONG dwMinorVersion; + ULONG dwBuildNumber; + ULONG dwPlatformId; + CHAR szCSDVersion[128]; +} OSVERSIONINFOA, *POSVERSIONINFOA, *LPOSVERSIONINFOA; + +typedef struct _OSVERSIONINFOW { + ULONG dwOSVersionInfoSize; + ULONG dwMajorVersion; + ULONG dwMinorVersion; + ULONG dwBuildNumber; + ULONG dwPlatformId; + WCHAR szCSDVersion[128]; +} OSVERSIONINFOW, *POSVERSIONINFOW, *LPOSVERSIONINFOW, RTL_OSVERSIONINFOW, *PRTL_OSVERSIONINFOW; + +typedef struct _OSVERSIONINFOEXA { + ULONG dwOSVersionInfoSize; + ULONG dwMajorVersion; + ULONG dwMinorVersion; + ULONG dwBuildNumber; + ULONG dwPlatformId; + CHAR szCSDVersion[128]; + USHORT wServicePackMajor; + USHORT wServicePackMinor; + USHORT wSuiteMask; + UCHAR wProductType; + UCHAR wReserved; +} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA; + +typedef struct _OSVERSIONINFOEXW { + ULONG dwOSVersionInfoSize; + ULONG dwMajorVersion; + ULONG dwMinorVersion; + ULONG dwBuildNumber; + ULONG dwPlatformId; + WCHAR szCSDVersion[128]; + USHORT wServicePackMajor; + USHORT wServicePackMinor; + USHORT wSuiteMask; + UCHAR wProductType; + UCHAR wReserved; +} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW, RTL_OSVERSIONINFOEXW, *PRTL_OSVERSIONINFOEXW; + +#ifdef UNICODE +typedef OSVERSIONINFOEXW OSVERSIONINFOEX; +typedef POSVERSIONINFOEXW POSVERSIONINFOEX; +typedef LPOSVERSIONINFOEXW LPOSVERSIONINFOEX; +typedef OSVERSIONINFOW OSVERSIONINFO; +typedef POSVERSIONINFOW POSVERSIONINFO; +typedef LPOSVERSIONINFOW LPOSVERSIONINFO; +#else +typedef OSVERSIONINFOEXA OSVERSIONINFOEX; +typedef POSVERSIONINFOEXA POSVERSIONINFOEX; +typedef LPOSVERSIONINFOEXA LPOSVERSIONINFOEX; +typedef OSVERSIONINFOA OSVERSIONINFO; +typedef POSVERSIONINFOA POSVERSIONINFO; +typedef LPOSVERSIONINFOA LPOSVERSIONINFO; +#endif /* UNICODE */ + +/* Executive Types */ + +#define PROTECTED_POOL 0x80000000 + +typedef struct _ZONE_SEGMENT_HEADER { + SINGLE_LIST_ENTRY SegmentList; + PVOID Reserved; +} ZONE_SEGMENT_HEADER, *PZONE_SEGMENT_HEADER; + +typedef struct _ZONE_HEADER { + SINGLE_LIST_ENTRY FreeList; + SINGLE_LIST_ENTRY SegmentList; + ULONG BlockSize; + ULONG TotalSegmentSize; +} ZONE_HEADER, *PZONE_HEADER; + +/* Executive Functions */ + +static __inline PVOID +ExAllocateFromZone( + IN PZONE_HEADER Zone) +{ + if (Zone->FreeList.Next) + Zone->FreeList.Next = Zone->FreeList.Next->Next; + return (PVOID) Zone->FreeList.Next; +} + +static __inline PVOID +ExFreeToZone( + IN PZONE_HEADER Zone, + IN PVOID Block) +{ + ((PSINGLE_LIST_ENTRY) Block)->Next = Zone->FreeList.Next; + Zone->FreeList.Next = ((PSINGLE_LIST_ENTRY) Block); + return ((PSINGLE_LIST_ENTRY) Block)->Next; +} + +/* + * PVOID + * ExInterlockedAllocateFromZone( + * IN PZONE_HEADER Zone, + * IN PKSPIN_LOCK Lock) + */ +#define ExInterlockedAllocateFromZone(Zone, Lock) \ + ((PVOID) ExInterlockedPopEntryList(&Zone->FreeList, Lock)) + +/* PVOID + * ExInterlockedFreeToZone( + * IN PZONE_HEADER Zone, + * IN PVOID Block, + * IN PKSPIN_LOCK Lock); + */ +#define ExInterlockedFreeToZone(Zone, Block, Lock) \ + ExInterlockedPushEntryList(&(Zone)->FreeList, (PSINGLE_LIST_ENTRY)(Block), Lock) + +/* + * BOOLEAN + * ExIsFullZone( + * IN PZONE_HEADER Zone) + */ +#define ExIsFullZone(Zone) \ + ((Zone)->FreeList.Next == (PSINGLE_LIST_ENTRY) NULL) + +/* BOOLEAN + * ExIsObjectInFirstZoneSegment( + * IN PZONE_HEADER Zone, + * IN PVOID Object); + */ +#define ExIsObjectInFirstZoneSegment(Zone,Object) \ + ((BOOLEAN)( ((PUCHAR)(Object) >= (PUCHAR)(Zone)->SegmentList.Next) && \ + ((PUCHAR)(Object) < (PUCHAR)(Zone)->SegmentList.Next + \ + (Zone)->TotalSegmentSize)) ) + +#define ExAcquireResourceExclusive ExAcquireResourceExclusiveLite +#define ExAcquireResourceShared ExAcquireResourceSharedLite +#define ExConvertExclusiveToShared ExConvertExclusiveToSharedLite +#define ExDeleteResource ExDeleteResourceLite +#define ExInitializeResource ExInitializeResourceLite +#define ExIsResourceAcquiredExclusive ExIsResourceAcquiredExclusiveLite +#define ExIsResourceAcquiredShared ExIsResourceAcquiredSharedLite +#define ExIsResourceAcquired ExIsResourceAcquiredSharedLite +#define ExReleaseResourceForThread ExReleaseResourceForThreadLite + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTKERNELAPI +NTSTATUS +NTAPI +ExExtendZone( + IN OUT PZONE_HEADER Zone, + IN OUT PVOID Segment, + IN ULONG SegmentSize); + +NTKERNELAPI +NTSTATUS +NTAPI +ExInitializeZone( + OUT PZONE_HEADER Zone, + IN ULONG BlockSize, + IN OUT PVOID InitialSegment, + IN ULONG InitialSegmentSize); + +NTKERNELAPI +NTSTATUS +NTAPI +ExInterlockedExtendZone( + IN OUT PZONE_HEADER Zone, + IN OUT PVOID Segment, + IN ULONG SegmentSize, + IN OUT PKSPIN_LOCK Lock); + +NTKERNELAPI +NTSTATUS +NTAPI +ExUuidCreate( + OUT UUID *Uuid); + +NTKERNELAPI +DECLSPEC_NORETURN +VOID +NTAPI +ExRaiseAccessViolation( + VOID); + +NTKERNELAPI +DECLSPEC_NORETURN +VOID +NTAPI +ExRaiseDatatypeMisalignment( + VOID); + +#endif + +#ifdef _X86_ + +NTKERNELAPI +INTERLOCKED_RESULT +FASTCALL +Exfi386InterlockedIncrementLong( + IN OUT LONG volatile *Addend); + +NTKERNELAPI +INTERLOCKED_RESULT +FASTCALL +Exfi386InterlockedDecrementLong( + IN PLONG Addend); + +NTKERNELAPI +ULONG +FASTCALL +Exfi386InterlockedExchangeUlong( + IN PULONG Target, + IN ULONG Value); + +#endif /* _X86_ */ + +#ifndef _ARC_DDK_ +#define _ARC_DDK_ +typedef enum _CONFIGURATION_TYPE { + ArcSystem, + CentralProcessor, + FloatingPointProcessor, + PrimaryIcache, + PrimaryDcache, + SecondaryIcache, + SecondaryDcache, + SecondaryCache, + EisaAdapter, + TcAdapter, + ScsiAdapter, + DtiAdapter, + MultiFunctionAdapter, + DiskController, + TapeController, + CdromController, + WormController, + SerialController, + NetworkController, + DisplayController, + ParallelController, + PointerController, + KeyboardController, + AudioController, + OtherController, + DiskPeripheral, + FloppyDiskPeripheral, + TapePeripheral, + ModemPeripheral, + MonitorPeripheral, + PrinterPeripheral, + PointerPeripheral, + KeyboardPeripheral, + TerminalPeripheral, + OtherPeripheral, + LinePeripheral, + NetworkPeripheral, + SystemMemory, + DockingInformation, + RealModeIrqRoutingTable, + RealModePCIEnumeration, + MaximumType +} CONFIGURATION_TYPE, *PCONFIGURATION_TYPE; +#endif /* !_ARC_DDK_ */ + +typedef struct _CONTROLLER_OBJECT { + CSHORT Type; + CSHORT Size; + PVOID ControllerExtension; + KDEVICE_QUEUE DeviceWaitQueue; + ULONG Spare1; + LARGE_INTEGER Spare2; +} CONTROLLER_OBJECT, *PCONTROLLER_OBJECT; + +typedef struct _CONFIGURATION_INFORMATION { + ULONG DiskCount; + ULONG FloppyCount; + ULONG CdRomCount; + ULONG TapeCount; + ULONG ScsiPortCount; + ULONG SerialCount; + ULONG ParallelCount; + BOOLEAN AtDiskPrimaryAddressClaimed; + BOOLEAN AtDiskSecondaryAddressClaimed; + ULONG Version; + ULONG MediumChangerCount; +} CONFIGURATION_INFORMATION, *PCONFIGURATION_INFORMATION; + +typedef +NTSTATUS +(NTAPI *PIO_QUERY_DEVICE_ROUTINE)( + IN PVOID Context, + IN PUNICODE_STRING PathName, + IN INTERFACE_TYPE BusType, + IN ULONG BusNumber, + IN PKEY_VALUE_FULL_INFORMATION *BusInformation, + IN CONFIGURATION_TYPE ControllerType, + IN ULONG ControllerNumber, + IN PKEY_VALUE_FULL_INFORMATION *ControllerInformation, + IN CONFIGURATION_TYPE PeripheralType, + IN ULONG PeripheralNumber, + IN PKEY_VALUE_FULL_INFORMATION *PeripheralInformation); + +typedef +VOID +(NTAPI DRIVER_REINITIALIZE)( + IN struct _DRIVER_OBJECT *DriverObject, + IN PVOID Context, + IN ULONG Count); + +typedef DRIVER_REINITIALIZE *PDRIVER_REINITIALIZE; + +/** Filesystem runtime library routines **/ + +#if (NTDDI_VERSION >= NTDDI_WIN2K) +NTKERNELAPI +BOOLEAN +NTAPI +FsRtlIsTotalDeviceFailure( + IN NTSTATUS Status); +#endif + +/* Hardware Abstraction Layer Types */ + +typedef VOID +(NTAPI *PciPin2Line)( + IN struct _BUS_HANDLER *BusHandler, + IN struct _BUS_HANDLER *RootHandler, + IN PCI_SLOT_NUMBER SlotNumber, + IN PPCI_COMMON_CONFIG PciData); + +typedef VOID +(NTAPI *PciLine2Pin)( + IN struct _BUS_HANDLER *BusHandler, + IN struct _BUS_HANDLER *RootHandler, + IN PCI_SLOT_NUMBER SlotNumber, + IN PPCI_COMMON_CONFIG PciNewData, + IN PPCI_COMMON_CONFIG PciOldData); + +typedef VOID +(NTAPI *PciReadWriteConfig)( + IN struct _BUS_HANDLER *BusHandler, + IN PCI_SLOT_NUMBER Slot, + IN PVOID Buffer, + IN ULONG Offset, + IN ULONG Length); + +#define PCI_DATA_TAG ' ICP' +#define PCI_DATA_VERSION 1 + +typedef struct _PCIBUSDATA { + ULONG Tag; + ULONG Version; + PciReadWriteConfig ReadConfig; + PciReadWriteConfig WriteConfig; + PciPin2Line Pin2Line; + PciLine2Pin Line2Pin; + PCI_SLOT_NUMBER ParentSlot; + PVOID Reserved[4]; +} PCIBUSDATA, *PPCIBUSDATA; + +typedef +PVOID +(NTAPI *pHalGetAcpiTable)( + IN ULONG Signature, + IN PCSTR OemId OPTIONAL, + IN PCSTR OemTableId OPTIONAL); + +typedef +VOID +(NTAPI *PCI_ERROR_HANDLER_CALLBACK)( + VOID); + +typedef +VOID +(NTAPI *pHalSetPciErrorHandlerCallback)( + IN PCI_ERROR_HANDLER_CALLBACK Callback); + +#if 1 /* Not present in WDK 7600 */ +typedef VOID +(FASTCALL *pHalIoAssignDriveLetters)( + IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, + IN PSTRING NtDeviceName, + OUT PUCHAR NtSystemPath, + OUT PSTRING NtSystemPathString); +#endif + +/* Hardware Abstraction Layer Functions */ + +#if !defined(NO_LEGACY_DRIVERS) + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTHALAPI +NTSTATUS +NTAPI +HalAssignSlotResources( + IN PUNICODE_STRING RegistryPath, + IN PUNICODE_STRING DriverClassName, + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT DeviceObject, + IN INTERFACE_TYPE BusType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + IN OUT PCM_RESOURCE_LIST *AllocatedResources); + +NTHALAPI +ULONG +NTAPI +HalGetInterruptVector( + IN INTERFACE_TYPE InterfaceType, + IN ULONG BusNumber, + IN ULONG BusInterruptLevel, + IN ULONG BusInterruptVector, + OUT PKIRQL Irql, + OUT PKAFFINITY Affinity); + +NTHALAPI +ULONG +NTAPI +HalSetBusData( + IN BUS_DATA_TYPE BusDataType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + IN PVOID Buffer, + IN ULONG Length); + +#endif + +#endif /* !defined(NO_LEGACY_DRIVERS) */ + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTHALAPI +PADAPTER_OBJECT +NTAPI +HalGetAdapter( + IN PDEVICE_DESCRIPTION DeviceDescription, + IN OUT PULONG NumberOfMapRegisters); + +NTHALAPI +BOOLEAN +NTAPI +HalMakeBeep( + IN ULONG Frequency); + +VOID +NTAPI +HalPutDmaAdapter( + IN PADAPTER_OBJECT DmaAdapter); + +NTHALAPI +VOID +NTAPI +HalAcquireDisplayOwnership( + IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters); + +NTHALAPI +ULONG +NTAPI +HalGetBusData( + IN BUS_DATA_TYPE BusDataType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + OUT PVOID Buffer, + IN ULONG Length); + +NTHALAPI +ULONG +NTAPI +HalGetBusDataByOffset( + IN BUS_DATA_TYPE BusDataType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + OUT PVOID Buffer, + IN ULONG Offset, + IN ULONG Length); + +NTHALAPI +ULONG +NTAPI +HalSetBusDataByOffset( + IN BUS_DATA_TYPE BusDataType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + IN PVOID Buffer, + IN ULONG Offset, + IN ULONG Length); + +NTHALAPI +BOOLEAN +NTAPI +HalTranslateBusAddress( + IN INTERFACE_TYPE InterfaceType, + IN ULONG BusNumber, + IN PHYSICAL_ADDRESS BusAddress, + IN OUT PULONG AddressSpace, + OUT PPHYSICAL_ADDRESS TranslatedAddress); + +#endif + +#if (NTDDI_VERSION >= NTDDI_WINXP) +NTKERNELAPI +VOID +FASTCALL +HalExamineMBR( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG SectorSize, + IN ULONG MBRTypeIdentifier, + OUT PVOID *Buffer); +#endif + +#if defined(USE_DMA_MACROS) && !defined(_NTHAL_) && (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_) +// nothing here +#else + +#if (NTDDI_VERSION >= NTDDI_WIN2K) +//DECLSPEC_DEPRECATED_DDK +NTHALAPI +VOID +NTAPI +IoFreeAdapterChannel( + IN PADAPTER_OBJECT AdapterObject); + +//DECLSPEC_DEPRECATED_DDK +NTHALAPI +BOOLEAN +NTAPI +IoFlushAdapterBuffers( + IN PADAPTER_OBJECT AdapterObject, + IN PMDL Mdl, + IN PVOID MapRegisterBase, + IN PVOID CurrentVa, + IN ULONG Length, + IN BOOLEAN WriteToDevice); + +//DECLSPEC_DEPRECATED_DDK +NTHALAPI +VOID +NTAPI +IoFreeMapRegisters( + IN PADAPTER_OBJECT AdapterObject, + IN PVOID MapRegisterBase, + IN ULONG NumberOfMapRegisters); + +//DECLSPEC_DEPRECATED_DDK +NTHALAPI +PVOID +NTAPI +HalAllocateCommonBuffer( + IN PADAPTER_OBJECT AdapterObject, + IN ULONG Length, + OUT PPHYSICAL_ADDRESS LogicalAddress, + IN BOOLEAN CacheEnabled); + +//DECLSPEC_DEPRECATED_DDK +NTHALAPI +VOID +NTAPI +HalFreeCommonBuffer( + IN PADAPTER_OBJECT AdapterObject, + IN ULONG Length, + IN PHYSICAL_ADDRESS LogicalAddress, + IN PVOID VirtualAddress, + IN BOOLEAN CacheEnabled); + +//DECLSPEC_DEPRECATED_DDK +NTHALAPI +ULONG +NTAPI +HalReadDmaCounter( + IN PADAPTER_OBJECT AdapterObject); + +NTHALAPI +NTSTATUS +NTAPI +HalAllocateAdapterChannel( + IN PADAPTER_OBJECT AdapterObject, + IN PWAIT_CONTEXT_BLOCK Wcb, + IN ULONG NumberOfMapRegisters, + IN PDRIVER_CONTROL ExecutionRoutine); + +#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ + +#endif /* defined(USE_DMA_MACROS) && !defined(_NTHAL_) && (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_) */ + +/* I/O Manager Functions */ + +/* + * VOID IoAssignArcName( + * IN PUNICODE_STRING ArcName, + * IN PUNICODE_STRING DeviceName); + */ +#define IoAssignArcName(_ArcName, _DeviceName) ( \ + IoCreateSymbolicLink((_ArcName), (_DeviceName))) + +/* + * VOID + * IoDeassignArcName( + * IN PUNICODE_STRING ArcName) + */ +#define IoDeassignArcName IoDeleteSymbolicLink + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +#if !(defined(USE_DMA_MACROS) && (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_)) +NTKERNELAPI +NTSTATUS +NTAPI +IoAllocateAdapterChannel( + IN PADAPTER_OBJECT AdapterObject, + IN PDEVICE_OBJECT DeviceObject, + IN ULONG NumberOfMapRegisters, + IN PDRIVER_CONTROL ExecutionRoutine, + IN PVOID Context); +#endif + +//DECLSPEC_DEPRECATED_DDK +NTHALAPI +PHYSICAL_ADDRESS +NTAPI +IoMapTransfer( + IN PADAPTER_OBJECT AdapterObject, + IN PMDL Mdl, + IN PVOID MapRegisterBase, + IN PVOID CurrentVa, + IN OUT PULONG Length, + IN BOOLEAN WriteToDevice); + +NTKERNELAPI +VOID +NTAPI +IoAllocateController( + IN PCONTROLLER_OBJECT ControllerObject, + IN PDEVICE_OBJECT DeviceObject, + IN PDRIVER_CONTROL ExecutionRoutine, + IN PVOID Context OPTIONAL); + +NTKERNELAPI +PCONTROLLER_OBJECT +NTAPI +IoCreateController( + IN ULONG Size); + +NTKERNELAPI +VOID +NTAPI +IoDeleteController( + IN PCONTROLLER_OBJECT ControllerObject); + +NTKERNELAPI +VOID +NTAPI +IoFreeController( + IN PCONTROLLER_OBJECT ControllerObject); + +NTKERNELAPI +PCONFIGURATION_INFORMATION +NTAPI +IoGetConfigurationInformation( + VOID); + +NTKERNELAPI +PDEVICE_OBJECT +NTAPI +IoGetDeviceToVerify( + IN PETHREAD Thread); + +NTKERNELAPI +VOID +NTAPI +IoCancelFileOpen( + IN PDEVICE_OBJECT DeviceObject, + IN PFILE_OBJECT FileObject); + +NTKERNELAPI +PGENERIC_MAPPING +NTAPI +IoGetFileObjectGenericMapping( + VOID); + +NTKERNELAPI +PIRP +NTAPI +IoMakeAssociatedIrp( + IN PIRP Irp, + IN CCHAR StackSize); + +NTKERNELAPI +NTSTATUS +NTAPI +IoQueryDeviceDescription( + IN PINTERFACE_TYPE BusType OPTIONAL, + IN PULONG BusNumber OPTIONAL, + IN PCONFIGURATION_TYPE ControllerType OPTIONAL, + IN PULONG ControllerNumber OPTIONAL, + IN PCONFIGURATION_TYPE PeripheralType OPTIONAL, + IN PULONG PeripheralNumber OPTIONAL, + IN PIO_QUERY_DEVICE_ROUTINE CalloutRoutine, + IN OUT PVOID Context OPTIONAL); + +NTKERNELAPI +VOID +NTAPI +IoRaiseHardError( + IN PIRP Irp, + IN PVPB Vpb OPTIONAL, + IN PDEVICE_OBJECT RealDeviceObject); + +NTKERNELAPI +BOOLEAN +NTAPI +IoRaiseInformationalHardError( + IN NTSTATUS ErrorStatus, + IN PUNICODE_STRING String OPTIONAL, + IN PKTHREAD Thread OPTIONAL); + +NTKERNELAPI +VOID +NTAPI +IoRegisterBootDriverReinitialization( + IN PDRIVER_OBJECT DriverObject, + IN PDRIVER_REINITIALIZE DriverReinitializationRoutine, + IN PVOID Context OPTIONAL); + +NTKERNELAPI +VOID +NTAPI +IoRegisterDriverReinitialization( + IN PDRIVER_OBJECT DriverObject, + IN PDRIVER_REINITIALIZE DriverReinitializationRoutine, + IN PVOID Context OPTIONAL); + +NTKERNELAPI +NTSTATUS +NTAPI +IoAttachDeviceByPointer( + IN PDEVICE_OBJECT SourceDevice, + IN PDEVICE_OBJECT TargetDevice); + +NTKERNELAPI +NTSTATUS +NTAPI +IoReportDetectedDevice( + IN PDRIVER_OBJECT DriverObject, + IN INTERFACE_TYPE LegacyBusType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + IN PCM_RESOURCE_LIST ResourceList OPTIONAL, + IN PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements OPTIONAL, + IN BOOLEAN ResourceAssigned, + IN OUT PDEVICE_OBJECT *DeviceObject); + +NTKERNELAPI +NTSTATUS +NTAPI +IoReportResourceForDetection( + IN PDRIVER_OBJECT DriverObject, + IN PCM_RESOURCE_LIST DriverList OPTIONAL, + IN ULONG DriverListSize OPTIONAL, + IN PDEVICE_OBJECT DeviceObject OPTIONAL, + IN PCM_RESOURCE_LIST DeviceList OPTIONAL, + IN ULONG DeviceListSize OPTIONAL, + OUT PBOOLEAN ConflictDetected); + +NTKERNELAPI +NTSTATUS +NTAPI +IoReportResourceUsage( + IN PUNICODE_STRING DriverClassName OPTIONAL, + IN PDRIVER_OBJECT DriverObject, + IN PCM_RESOURCE_LIST DriverList OPTIONAL, + IN ULONG DriverListSize OPTIONAL, + IN PDEVICE_OBJECT DeviceObject, + IN PCM_RESOURCE_LIST DeviceList OPTIONAL, + IN ULONG DeviceListSize OPTIONAL, + IN BOOLEAN OverrideConflict, + OUT PBOOLEAN ConflictDetected); + +NTKERNELAPI +VOID +NTAPI +IoSetHardErrorOrVerifyDevice( + IN PIRP Irp, + IN PDEVICE_OBJECT DeviceObject); + +NTKERNELAPI +NTSTATUS +NTAPI +IoAssignResources( + IN PUNICODE_STRING RegistryPath, + IN PUNICODE_STRING DriverClassName OPTIONAL, + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT DeviceObject OPTIONAL, + IN PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources OPTIONAL, + IN OUT PCM_RESOURCE_LIST *AllocatedResources); + +#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ + +#if (NTDDI_VERSION >= NTDDI_WINXP) + +NTKERNELAPI +NTSTATUS +NTAPI +IoCreateDisk( + IN PDEVICE_OBJECT DeviceObject, + IN struct _CREATE_DISK* Disk OPTIONAL); + +NTKERNELAPI +NTSTATUS +NTAPI +IoReadDiskSignature( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG BytesPerSector, + OUT PDISK_SIGNATURE Signature); + +NTKERNELAPI +NTSTATUS +FASTCALL +IoReadPartitionTable( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG SectorSize, + IN BOOLEAN ReturnRecognizedPartitions, + OUT struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer); + +NTKERNELAPI +NTSTATUS +NTAPI +IoReadPartitionTableEx( + IN PDEVICE_OBJECT DeviceObject, + IN struct _DRIVE_LAYOUT_INFORMATION_EX **PartitionBuffer); + +NTKERNELAPI +NTSTATUS +FASTCALL +IoSetPartitionInformation( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG SectorSize, + IN ULONG PartitionNumber, + IN ULONG PartitionType); + +NTKERNELAPI +NTSTATUS +NTAPI +IoSetPartitionInformationEx( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG PartitionNumber, + IN struct _SET_PARTITION_INFORMATION_EX *PartitionInfo); + +NTKERNELAPI +NTSTATUS +NTAPI +IoSetSystemPartition( + IN PUNICODE_STRING VolumeNameString); + +NTKERNELAPI +BOOLEAN +NTAPI +IoSetThreadHardErrorMode( + IN BOOLEAN EnableHardErrors); + +NTKERNELAPI +NTSTATUS +NTAPI +IoVerifyPartitionTable( + IN PDEVICE_OBJECT DeviceObject, + IN BOOLEAN FixErrors); + +NTKERNELAPI +NTSTATUS +NTAPI +IoVolumeDeviceToDosName( + IN PVOID VolumeDeviceObject, + OUT PUNICODE_STRING DosName); + +NTKERNELAPI +NTSTATUS +FASTCALL +IoWritePartitionTable( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG SectorSize, + IN ULONG SectorsPerTrack, + IN ULONG NumberOfHeads, + IN struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer); + +NTKERNELAPI +NTSTATUS +NTAPI +IoWritePartitionTableEx( + IN PDEVICE_OBJECT DeviceObject, + IN struct _DRIVE_LAYOUT_INFORMATION_EX *DriveLayout); + +#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ + +/** Kernel debugger routines **/ + +NTSYSAPI +ULONG +NTAPI +DbgPrompt( + IN PCCH Prompt, + OUT PCH Response, + IN ULONG MaximumResponseLength); + +/* Kernel Functions */ + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTKERNELAPI +DECLSPEC_NORETURN +VOID +NTAPI +KeBugCheck( + IN ULONG BugCheckCode); + +NTKERNELAPI +LONG +NTAPI +KePulseEvent( + IN OUT PRKEVENT Event, + IN KPRIORITY Increment, + IN BOOLEAN Wait); + +NTKERNELAPI +LONG +NTAPI +KeSetBasePriorityThread( + IN OUT PRKTHREAD Thread, + IN LONG Increment); + +#endif + +/* Memory Manager Types */ + +typedef struct _PHYSICAL_MEMORY_RANGE { + PHYSICAL_ADDRESS BaseAddress; + LARGE_INTEGER NumberOfBytes; +} PHYSICAL_MEMORY_RANGE, *PPHYSICAL_MEMORY_RANGE; + +/* Memory Manager Functions */ + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +NTKERNELAPI +PPHYSICAL_MEMORY_RANGE +NTAPI +MmGetPhysicalMemoryRanges( + VOID); + +NTKERNELAPI +PHYSICAL_ADDRESS +NTAPI +MmGetPhysicalAddress( + IN PVOID BaseAddress); + +NTKERNELAPI +BOOLEAN +NTAPI +MmIsNonPagedSystemAddressValid( + IN PVOID VirtualAddress); + +NTKERNELAPI +PVOID +NTAPI +MmAllocateNonCachedMemory( + IN SIZE_T NumberOfBytes); + +NTKERNELAPI +VOID +NTAPI +MmFreeNonCachedMemory( + IN PVOID BaseAddress, + IN SIZE_T NumberOfBytes); + +NTKERNELAPI +PVOID +NTAPI +MmGetVirtualForPhysical( + IN PHYSICAL_ADDRESS PhysicalAddress); + +NTKERNELAPI +NTSTATUS +NTAPI +MmMapUserAddressesToPage( + IN PVOID BaseAddress, + IN SIZE_T NumberOfBytes, + IN PVOID PageAddress); + +NTKERNELAPI +PVOID +NTAPI +MmMapVideoDisplay( + IN PHYSICAL_ADDRESS PhysicalAddress, + IN SIZE_T NumberOfBytes, + IN MEMORY_CACHING_TYPE CacheType); + +NTKERNELAPI +NTSTATUS +NTAPI +MmMapViewInSessionSpace( + IN PVOID Section, + OUT PVOID *MappedBase, + IN OUT PSIZE_T ViewSize); + +NTKERNELAPI +NTSTATUS +NTAPI +MmMapViewInSystemSpace( + IN PVOID Section, + OUT PVOID *MappedBase, + IN OUT PSIZE_T ViewSize); + +NTKERNELAPI +BOOLEAN +NTAPI +MmIsAddressValid( + IN PVOID VirtualAddress); + +NTKERNELAPI +BOOLEAN +NTAPI +MmIsThisAnNtAsSystem( + VOID); + +NTKERNELAPI +VOID +NTAPI +MmLockPagableSectionByHandle( + IN PVOID ImageSectionHandle); + +NTKERNELAPI +NTSTATUS +NTAPI +MmUnmapViewInSessionSpace( + IN PVOID MappedBase); + +NTKERNELAPI +NTSTATUS +NTAPI +MmUnmapViewInSystemSpace( + IN PVOID MappedBase); + +NTKERNELAPI +VOID +NTAPI +MmUnsecureVirtualMemory( + IN HANDLE SecureHandle); + +NTKERNELAPI +NTSTATUS +NTAPI +MmRemovePhysicalMemory( + IN PPHYSICAL_ADDRESS StartAddress, + IN OUT PLARGE_INTEGER NumberOfBytes); + +NTKERNELAPI +HANDLE +NTAPI +MmSecureVirtualMemory( + IN PVOID Address, + IN SIZE_T Size, + IN ULONG ProbeMode); + +NTKERNELAPI +VOID +NTAPI +MmUnmapVideoDisplay( + IN PVOID BaseAddress, + IN SIZE_T NumberOfBytes); + +#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ + /* NtXxx Functions */ NTSYSCALLAPI @@ -2098,36 +2382,20 @@ /** Process manager types **/ -typedef struct _IMAGE_INFO { - _ANONYMOUS_UNION union { - ULONG Properties; - _ANONYMOUS_STRUCT struct { - ULONG ImageAddressingMode : 8; - ULONG SystemModeImage : 1; - ULONG ImageMappedToAllPids : 1; - ULONG Reserved : 22; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - PVOID ImageBase; - ULONG ImageSelector; - SIZE_T ImageSize; - ULONG ImageSectionNumber; -} IMAGE_INFO, *PIMAGE_INFO; - typedef VOID -(DDKAPI *PCREATE_PROCESS_NOTIFY_ROUTINE)( +(NTAPI *PCREATE_PROCESS_NOTIFY_ROUTINE)( IN HANDLE ParentId, IN HANDLE ProcessId, IN BOOLEAN Create); typedef VOID -(DDKAPI *PCREATE_THREAD_NOTIFY_ROUTINE)( +(NTAPI *PCREATE_THREAD_NOTIFY_ROUTINE)( IN HANDLE ProcessId, IN HANDLE ThreadId, IN BOOLEAN Create); typedef VOID -(DDKAPI *PLOAD_IMAGE_NOTIFY_ROUTINE)( +(NTAPI *PLOAD_IMAGE_NOTIFY_ROUTINE)( IN PUNICODE_STRING FullImageName, IN HANDLE ProcessId, IN PIMAGE_INFO ImageInfo); @@ -2404,12 +2672,6 @@ IN KPROCESSOR_MODE PreviousMode); #endif -typedef VOID -(DDKAPI *PTIMER_APC_ROUTINE)( - IN PVOID TimerContext, - IN ULONG TimerLowValue, - IN LONG TimerHighValue); - /* ZwXxx Functions */ #if (NTDDI_VERSION >= NTDDI_WIN2K) Modified: branches/header-work/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
============================================================================== --- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Thu Mar 11 18:27:44 2010 @@ -325,115 +325,11 @@ OUT PKINTERRUPT_POLARITY Polarity ); -typedef -PVOID -(DDKAPI *pKdMapPhysicalMemory64)( - IN PHYSICAL_ADDRESS PhysicalAddress, - IN ULONG NumberPages -); - -typedef -VOID -(DDKAPI *pKdUnmapVirtualAddress)( - IN PVOID VirtualAddress, - IN ULONG NumberPages -); - -typedef -ULONG -(DDKAPI *pKdGetPciDataByOffset)( - IN ULONG BusNumber, - IN ULONG SlotNumber, - OUT PVOID Buffer, - IN ULONG Offset, - IN ULONG Length -); - -typedef -ULONG -(DDKAPI *pKdSetPciDataByOffset)( - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN PVOID Buffer, - IN ULONG Offset, - IN ULONG Length -); - -typedef struct _FILE_ALIGNMENT_INFORMATION { - ULONG AlignmentRequirement; -} FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION; - -typedef struct _FILE_NAME_INFORMATION { - ULONG FileNameLength; - WCHAR FileName[1]; -} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION; - - -typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION { - ULONG FileAttributes; - ULONG ReparseTag; -} FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION; - -typedef struct _FILE_DISPOSITION_INFORMATION { - BOOLEAN DeleteFile; -} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION; - -typedef struct _FILE_END_OF_FILE_INFORMATION { - LARGE_INTEGER EndOfFile; -} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION; - -typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION { - LARGE_INTEGER ValidDataLength; -} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION; - -typedef union _FILE_SEGMENT_ELEMENT { - PVOID64 Buffer; - ULONGLONG Alignment; -}FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT; - -#define SE_UNSOLICITED_INPUT_PRIVILEGE 6 - typedef struct _KEY_USER_FLAGS_INFORMATION { ULONG UserFlags; } KEY_USER_FLAGS_INFORMATION, *PKEY_USER_FLAGS_INFORMATION; #define PCI_ADDRESS_MEMORY_SPACE 0x00000000 - -NTSYSAPI -ULONGLONG -DDKAPI -VerSetConditionMask( - IN ULONGLONG ConditionMask, - IN ULONG TypeMask, - IN UCHAR Condition); - -#define VER_SET_CONDITION(ConditionMask, TypeBitMask, ComparisonType) \ - ((ConditionMask) = VerSetConditionMask((ConditionMask), \ - (TypeBitMask), (ComparisonType))) - -/* RtlVerifyVersionInfo() TypeMask */ - -#define VER_MINORVERSION 0x0000001 -#define VER_MAJORVERSION 0x0000002 -#define VER_BUILDNUMBER 0x0000004 -#define VER_PLATFORMID 0x0000008 -#define VER_SERVICEPACKMINOR 0x0000010 -#define VER_SERVICEPACKMAJOR 0x0000020 -#define VER_SUITENAME 0x0000040 -#define VER_PRODUCT_TYPE 0x0000080 - -/* RtlVerifyVersionInfo() ComparisonType */ - -#define VER_EQUAL 1 -#define VER_GREATER 2 -#define VER_GREATER_EQUAL 3 -#define VER_LESS 4 -#define VER_LESS_EQUAL 5 -#define VER_AND 6 -#define VER_OR 7 - -#define VER_CONDITION_MASK 7 -#define VER_NUM_BITS_PER_CONDITION_MASK 3 struct _RTL_RANGE; @@ -442,107 +338,6 @@ PVOID Context, struct _RTL_RANGE *Range ); - -typedef enum _IO_QUERY_DEVICE_DATA_FORMAT { - IoQueryDeviceIdentifier = 0, - IoQueryDeviceConfigurationData, - IoQueryDeviceComponentInformation, - IoQueryDeviceMaxData -} IO_QUERY_DEVICE_DATA_FORMAT, *PIO_QUERY_DEVICE_DATA_FORMAT; - - - -#define IMAGE_ADDRESSING_MODE_32BIT 3 - -typedef struct _NT_TIB { - struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList; - PVOID StackBase; - PVOID StackLimit; - PVOID SubSystemTib; - _ANONYMOUS_UNION union { - PVOID FiberData; - ULONG Version; - } DUMMYUNIONNAME; - PVOID ArbitraryUserPointer; - struct _NT_TIB *Self; -} NT_TIB, *PNT_TIB; - -typedef struct _NT_TIB32 { - ULONG ExceptionList; - ULONG StackBase; - ULONG StackLimit; - ULONG SubSystemTib; - __GNU_EXTENSION union { - ULONG FiberData; - ULONG Version; - }; - ULONG ArbitraryUserPointer; - ULONG Self; -} NT_TIB32,*PNT_TIB32; - -typedef struct _NT_TIB64 { - ULONG64 ExceptionList; - ULONG64 StackBase; - ULONG64 StackLimit; - ULONG64 SubSystemTib; - __GNU_EXTENSION union { - ULONG64 FiberData; - ULONG Version; - }; - ULONG64 ArbitraryUserPointer; - ULONG64 Self; -} NT_TIB64,*PNT_TIB64; - -typedef struct _PROCESS_BASIC_INFORMATION -{ - NTSTATUS ExitStatus; - struct _PEB *PebBaseAddress; - ULONG_PTR AffinityMask; - KPRIORITY BasePriority; - ULONG_PTR UniqueProcessId; - ULONG_PTR InheritedFromUniqueProcessId; -} PROCESS_BASIC_INFORMATION,*PPROCESS_BASIC_INFORMATION; - -typedef struct _PROCESS_WS_WATCH_INFORMATION -{ - PVOID FaultingPc; - PVOID FaultingVa; -} PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION; - -typedef struct _PROCESS_DEVICEMAP_INFORMATION -{ - __GNU_EXTENSION union - { - struct - { - HANDLE DirectoryHandle; - } Set; - struct - { - ULONG DriveMap; - UCHAR DriveType[32]; - } Query; - }; -} PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION; - -typedef struct _KERNEL_USER_TIMES -{ - LARGE_INTEGER CreateTime; - LARGE_INTEGER ExitTime; - LARGE_INTEGER KernelTime; - LARGE_INTEGER UserTime; -} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES; - -typedef struct _PROCESS_ACCESS_TOKEN -{ - HANDLE Token; - HANDLE Thread; -} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN; - -typedef struct _PROCESS_SESSION_INFORMATION -{ - ULONG SessionId; -} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION; /* ** Storage structures @@ -575,38 +370,11 @@ IN HANDLE ThreadId, IN KPROCESSOR_MODE Mode); -typedef ULONG_PTR -(NTAPI *PDRIVER_VERIFIER_THUNK_ROUTINE)( - IN PVOID Context); - -typedef struct _DRIVER_VERIFIER_THUNK_PAIRS { - PDRIVER_VERIFIER_THUNK_ROUTINE PristineRoutine; - PDRIVER_VERIFIER_THUNK_ROUTINE NewRoutine; -} DRIVER_VERIFIER_THUNK_PAIRS, *PDRIVER_VERIFIER_THUNK_PAIRS; - -#define DRIVER_VERIFIER_SPECIAL_POOLING 0x0001 -#define DRIVER_VERIFIER_FORCE_IRQL_CHECKING 0x0002 -#define DRIVER_VERIFIER_INJECT_ALLOCATION_FAILURES 0x0004 -#define DRIVER_VERIFIER_TRACK_POOL_ALLOCATIONS 0x0008 -#define DRIVER_VERIFIER_IO_CHECKING 0x0010 - /* ** Architecture specific structures */ -#define PCR_MINOR_VERSION 1 -#define PCR_MAJOR_VERSION 1 #ifdef _X86_ - -#define CONTEXT_i386 0x10000 -#define CONTEXT_i486 0x10000 -#define CONTEXT_CONTROL (CONTEXT_i386|0x00000001L) -#define CONTEXT_INTEGER (CONTEXT_i386|0x00000002L) -#define CONTEXT_SEGMENTS (CONTEXT_i386|0x00000004L) -#define CONTEXT_FLOATING_POINT (CONTEXT_i386|0x00000008L) -#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L) -#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L) -#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS) typedef struct _KPCR_TIB { PVOID ExceptionList; /* 00 */ @@ -620,32 +388,6 @@ PVOID ArbitraryUserPointer; /* 14 */ struct _KPCR_TIB *Self; /* 18 */ } KPCR_TIB, *PKPCR_TIB; /* 1C */ - -typedef struct _KPCR { - KPCR_TIB Tib; /* 00 */ - struct _KPCR *Self; /* 1C */ - struct _KPRCB *Prcb; /* 20 */ - KIRQL Irql; /* 24 */ - ULONG IRR; /* 28 */ - ULONG IrrActive; /* 2C */ - ULONG IDR; /* 30 */ - PVOID KdVersionBlock; /* 34 */ - PUSHORT IDT; /* 38 */ - PUSHORT GDT; /* 3C */ - struct _KTSS *TSS; /* 40 */ - USHORT MajorVersion; /* 44 */ - USHORT MinorVersion; /* 46 */ - KAFFINITY SetMember; /* 48 */ - ULONG StallScaleFactor; /* 4C */ - UCHAR SpareUnused; /* 50 */ - UCHAR Number; /* 51 */ - UCHAR Spare0; - UCHAR SecondLevelCacheAssociativity; - ULONG VdmAlert; - ULONG KernelReserved[14]; // For use by the kernel - ULONG SecondLevelCacheSize; - ULONG HalReserved[16]; // For use by Hal -} KPCR, *PKPCR; /* 54 */ #define KeGetPcr() PCR
14 years, 10 months
1
0
0
0
[spetreolle] 46099: [WLANSVC] Correctly start and report status to the service manager.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Thu Mar 11 17:36:11 2010 New Revision: 46099 URL:
http://svn.reactos.org/svn/reactos?rev=46099&view=rev
Log: [WLANSVC] Correctly start and report status to the service manager. Modified: trunk/reactos/base/services/wlansvc/wlansvc.c Modified: trunk/reactos/base/services/wlansvc/wlansvc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/wlansvc/wlan…
============================================================================== --- trunk/reactos/base/services/wlansvc/wlansvc.c [iso-8859-1] (original) +++ trunk/reactos/base/services/wlansvc/wlansvc.c [iso-8859-1] Thu Mar 11 17:36:11 2010 @@ -21,6 +21,7 @@ SERVICE_STATUS_HANDLE ServiceStatusHandle; SERVICE_STATUS SvcStatus; +static WCHAR ServiceName[] = L"WlanSvc"; /* FUNCTIONS *****************************************************************/ static DWORD WINAPI RpcThreadRoutine(LPVOID lpParameter) @@ -94,13 +95,14 @@ DPRINT("ServiceMain() called\n"); SvcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; + SvcStatus.dwCurrentState = SERVICE_START_PENDING; SvcStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN; SvcStatus.dwCheckPoint = 0; - SvcStatus.dwWin32ExitCode = 0; + SvcStatus.dwWin32ExitCode = NO_ERROR; SvcStatus.dwServiceSpecificExitCode = 0; SvcStatus.dwWaitHint = 4000; - ServiceStatusHandle = RegisterServiceCtrlHandlerExW(SERVICE_NAME, + ServiceStatusHandle = RegisterServiceCtrlHandlerExW(ServiceName, ServiceControlHandler, NULL); @@ -115,14 +117,14 @@ NULL); if (!hThread) + { DPRINT("Can't create RpcThread\n"); + UpdateServiceStatus(ServiceStatusHandle, SERVICE_STOPPED, 0); + } else { - WaitForSingleObject(hThread, INFINITE); CloseHandle(hThread); } - - UpdateServiceStatus(ServiceStatusHandle, SERVICE_STOPPED, 0); DPRINT("ServiceMain() done\n"); } @@ -132,7 +134,7 @@ { SERVICE_TABLE_ENTRYW ServiceTable[2] = { - {SERVICE_NAME, ServiceMain}, + {ServiceName, ServiceMain}, {NULL, NULL} };
14 years, 10 months
1
0
0
0
← Newer
1
...
50
51
52
53
54
55
56
...
90
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200