ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
October 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
737 discussions
Start a n
N
ew thread
[arty] 18899: use %lx for printing NTSTATUS
by arty@svn.reactos.com
use %lx for printing NTSTATUS Modified: trunk/reactos/drivers/dd/green/pnp.c _____ Modified: trunk/reactos/drivers/dd/green/pnp.c --- trunk/reactos/drivers/dd/green/pnp.c 2005-10-30 22:33:26 UTC (rev 18898) +++ trunk/reactos/drivers/dd/green/pnp.c 2005-10-30 22:47:31 UTC (rev 18899) @@ -35,7 +35,7 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("Status = %08x\n", Status); + DPRINT1("Status = %08lx\n", Status); return Status; } @@ -47,7 +47,7 @@ if (!NT_SUCCESS(Status)) { IoDeleteDevice(Fdo); - DPRINT1("Status = %08x\n", Status); + DPRINT1("Status = %08lx\n", Status); return Status; } ((PKEYBOARD_DEVICE_EXTENSION)DeviceExtension->Keyboard->DeviceExtension) ->Green = Fdo; @@ -57,7 +57,7 @@ { IoDeleteDevice(DeviceExtension->Keyboard); IoDeleteDevice(Fdo); - DPRINT1("Status = %08x\n", Status); + DPRINT1("Status = %08lx\n", Status); return Status; } ((PSCREEN_DEVICE_EXTENSION)DeviceExtension->Screen->DeviceExtension)->Gr een = Fdo; @@ -90,6 +90,6 @@ Fdo->Flags |= DO_POWER_PAGABLE | DO_BUFFERED_IO; Fdo->Flags &= ~DO_DEVICE_INITIALIZING; - DPRINT1("Status = %08x\n", Status); + DPRINT("Status = %08lx\n", Status); return Status; }
19 years, 1 month
1
0
0
0
[arty] 18898: Some upgrades for green:
by arty@svn.reactos.com
Some upgrades for green: - Either create the blue device or attach to it - If we can't open a serial device, forward the IRP to the original blue - Scrolling fix - Don't do DO_BUFFERED_IO if we use Irp->UserBuffer - Pass a zero offset when writing to serial port Green now displays correctly and fails back correctly. Keyboard part doesn't yet coexist with current ReactOS. That's next. Modified: trunk/reactos/drivers/dd/green/green.h Modified: trunk/reactos/drivers/dd/green/pnp.c Modified: trunk/reactos/drivers/dd/green/screen.c _____ Modified: trunk/reactos/drivers/dd/green/green.h --- trunk/reactos/drivers/dd/green/green.h 2005-10-30 22:19:33 UTC (rev 18897) +++ trunk/reactos/drivers/dd/green/green.h 2005-10-30 22:33:26 UTC (rev 18898) @@ -76,6 +76,7 @@ UCHAR SendBuffer[1024]; ULONG SendBufferPosition; + PDEVICE_OBJECT PreviousBlue; } SCREEN_DEVICE_EXTENSION, *PSCREEN_DEVICE_EXTENSION; typedef struct _GREEN_DEVICE_EXTENSION _____ Modified: trunk/reactos/drivers/dd/green/pnp.c --- trunk/reactos/drivers/dd/green/pnp.c 2005-10-30 22:19:33 UTC (rev 18897) +++ trunk/reactos/drivers/dd/green/pnp.c 2005-10-30 22:33:26 UTC (rev 18898) @@ -32,8 +32,12 @@ FILE_DEVICE_SECURE_OPEN, TRUE, &Fdo); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Status = %08x\n", Status); return Status; + } DeviceExtension = (PGREEN_DEVICE_EXTENSION)Fdo->DeviceExtension; RtlZeroMemory(DeviceExtension, sizeof(GREEN_DEVICE_EXTENSION)); @@ -43,6 +47,7 @@ if (!NT_SUCCESS(Status)) { IoDeleteDevice(Fdo); + DPRINT1("Status = %08x\n", Status); return Status; } ((PKEYBOARD_DEVICE_EXTENSION)DeviceExtension->Keyboard->DeviceExtension) ->Green = Fdo; @@ -52,6 +57,7 @@ { IoDeleteDevice(DeviceExtension->Keyboard); IoDeleteDevice(Fdo); + DPRINT1("Status = %08x\n", Status); return Status; } ((PSCREEN_DEVICE_EXTENSION)DeviceExtension->Screen->DeviceExtension)->Gr een = Fdo; @@ -84,5 +90,6 @@ Fdo->Flags |= DO_POWER_PAGABLE | DO_BUFFERED_IO; Fdo->Flags &= ~DO_DEVICE_INITIALIZING; + DPRINT1("Status = %08x\n", Status); return Status; } _____ Modified: trunk/reactos/drivers/dd/green/screen.c --- trunk/reactos/drivers/dd/green/screen.c 2005-10-30 22:19:33 UTC (rev 18897) +++ trunk/reactos/drivers/dd/green/screen.c 2005-10-30 22:33:26 UTC (rev 18898) @@ -38,7 +38,10 @@ int CurrentInt; UCHAR CurrentChar; NTSTATUS Status; + LARGE_INTEGER ZeroOffset; + ZeroOffset.QuadPart = 0; + SizeLeft = sizeof(DeviceExtension->SendBuffer) - DeviceExtension->SendBufferPosition; if (SizeLeft < NumberOfChars * 2 || NumberOfChars == 0) { @@ -47,7 +50,7 @@ IRP_MJ_WRITE, SerialDevice, DeviceExtension->SendBuffer, DeviceExtension->SendBufferPosition, - NULL, /* StartingOffset */ + &ZeroOffset, NULL, /* Event */ &ioStatus); if (!Irp) @@ -55,7 +58,9 @@ DPRINT1("Green: IoBuildSynchronousFsdRequest() failed. Unable to flush output buffer\n"); return; } + Status = IoCallDriver(SerialDevice, Irp); + if (!NT_SUCCESS(Status) && Status != STATUS_PENDING) { DPRINT1("Green: IoCallDriver() failed. Status = 0x%08lx\n", Status); @@ -69,6 +74,7 @@ while (NumberOfChars-- > 0) { CurrentInt = va_arg(args, int); + if (CurrentInt > 0) { CurrentChar = (UCHAR)CurrentInt; @@ -107,7 +113,7 @@ IN PDRIVER_OBJECT DriverObject, OUT PDEVICE_OBJECT* ScreenFdo) { - PDEVICE_OBJECT Fdo; + PDEVICE_OBJECT Fdo, PreviousBlue = NULL; PSCREEN_DEVICE_EXTENSION DeviceExtension; UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\BlueScreen"); NTSTATUS Status; @@ -121,12 +127,56 @@ FILE_DEVICE_SECURE_OPEN, TRUE, &Fdo); - if (!NT_SUCCESS(Status)) + + if (Status == STATUS_OBJECT_NAME_COLLISION) + { + DPRINT("Green: Attaching to old blue\n"); + + /* Suggested by hpoussin .. Hide previous blue device + * This makes us able to coexist with blue, and install + * when loaded */ + Status = IoCreateDevice(DriverObject, + sizeof(SCREEN_DEVICE_EXTENSION), + NULL, + FILE_DEVICE_SCREEN, + FILE_DEVICE_SECURE_OPEN, + TRUE, + &Fdo); + + if (!NT_SUCCESS(Status)) + return Status; + + Status = IoAttachDevice( + Fdo, + &DeviceName, /* FIXME: don't hardcode string */ + &PreviousBlue); + + if (!NT_SUCCESS(Status)) { + IoDeleteDevice(Fdo); + return Status; + } + } + else if (!NT_SUCCESS(Status)) return Status; + /* We definately have a device object. PreviousBlue may or may + * not be null */ + DeviceExtension = (PSCREEN_DEVICE_EXTENSION)Fdo->DeviceExtension; RtlZeroMemory(DeviceExtension, sizeof(SCREEN_DEVICE_EXTENSION)); DeviceExtension->Common.Type = Screen; + DeviceExtension->PreviousBlue = PreviousBlue; + + if (!NT_SUCCESS(Status)) + { + /* If a device was attached, detach it first */ + if (DeviceExtension->PreviousBlue) + IoDetachDevice(DeviceExtension->PreviousBlue); + + IoDeleteDevice(Fdo); + return Status; + } + /* initialize screen */ DeviceExtension->Columns = 80; DeviceExtension->Rows = 25; @@ -136,6 +186,10 @@ 2 * DeviceExtension->Columns * DeviceExtension->Rows * sizeof(UCHAR)); if (!DeviceExtension->VideoMemory) { + /* If a device was attached, detach it first */ + if (DeviceExtension->PreviousBlue) + IoDetachDevice(DeviceExtension->PreviousBlue); + IoDeleteDevice(Fdo); return STATUS_INSUFFICIENT_RESOURCES; } @@ -150,7 +204,7 @@ AddToSendBuffer(DeviceExtension, 4, ESC, '[', '7', 'l'); /* disable line wrap */ AddToSendBuffer(DeviceExtension, 4, ESC, '[', '3', 'g'); /* clear all tabs */ - Fdo->Flags |= DO_POWER_PAGABLE | DO_BUFFERED_IO; + Fdo->Flags |= DO_POWER_PAGABLE; Fdo->Flags &= ~DO_DEVICE_INITIALIZING; *ScreenFdo = Fdo; @@ -166,6 +220,7 @@ PIO_STACK_LOCATION Stack; PUCHAR Buffer; PSCREEN_DEVICE_EXTENSION DeviceExtension; + PDEVICE_OBJECT SerialDevice; PUCHAR VideoMemory; /* FIXME: is it useful? */ ULONG VideoMemorySize; /* FIXME: is it useful? */ @@ -181,16 +236,27 @@ DeviceExtension = (PSCREEN_DEVICE_EXTENSION)DeviceObject->DeviceExtension; VideoMemory = DeviceExtension->VideoMemory; + SerialDevice = ((PGREEN_DEVICE_EXTENSION)DeviceExtension->Green->DeviceExtension)->Seri al; + if (!SerialDevice) + { + DPRINT1("Calling blue\n"); + IoSkipCurrentIrpStackLocation(Irp); + return IoCallDriver(DeviceExtension->PreviousBlue, Irp); + } + Columns = DeviceExtension->Columns; Rows = DeviceExtension->Rows; CursorX = (DeviceExtension->LogicalOffset / 2) % Columns + 1; CursorY = (DeviceExtension->LogicalOffset / 2) / Columns + 1; VideoMemorySize = Columns * Rows * 2 * sizeof(UCHAR); - DPRINT1("Y: %lu\n", CursorY); - DPRINT1("Buffer ="); + +#if DBG + DPRINT("Y: %lu\n", CursorY); + DPRINT("Buffer ="); for (i = 0; i < Stack->Parameters.Write.Length; i++) DbgPrint(" 0x%02x", Buffer[i]); DbgPrint("\n"); +#endif if (!(DeviceExtension->Mode & ENABLE_PROCESSED_OUTPUT)) { @@ -228,6 +294,7 @@ { CursorY++; CursorX = 1; + AddToSendBuffer(DeviceExtension, 1, '\n'); AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', '1', 'H'); break; } @@ -268,17 +335,18 @@ if (CursorX > Columns) { CursorX = 1; - DPRINT1("Y: %lu -> %lu\n", CursorY, CursorY + 1); + DPRINT("Y: %lu -> %lu\n", CursorY, CursorY + 1); CursorY++; AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', '1', 'H'); } } } - if (CursorY > Rows) + if (CursorY >= Rows) { - DPRINT1("Y: %lu -> %lu\n", CursorY, CursorY - 1); + DPRINT("Y: %lu -> %lu\n", CursorY, CursorY - 1); CursorY--; + AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)1, ';', -(int)(Rows), 'r'); AddToSendBuffer(DeviceExtension, 2, ESC, 'D'); AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', -(int)CursorX, 'H'); } @@ -304,11 +372,20 @@ { PIO_STACK_LOCATION Stack; PSCREEN_DEVICE_EXTENSION DeviceExtension; + PDEVICE_OBJECT SerialDevice; NTSTATUS Status; Stack = IoGetCurrentIrpStackLocation(Irp); DeviceExtension = (PSCREEN_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + SerialDevice = ((PGREEN_DEVICE_EXTENSION)DeviceExtension->Green->DeviceExtension)->Seri al; + if (!SerialDevice) + { + DPRINT1("Calling blue\n"); + IoSkipCurrentIrpStackLocation(Irp); + return IoCallDriver(DeviceExtension->PreviousBlue, Irp); + } + switch (Stack->Parameters.DeviceIoControl.IoControlCode) { case IOCTL_CONSOLE_GET_SCREEN_BUFFER_INFO: @@ -510,7 +587,7 @@ -(int)(ConsoleDraw->Y + y), ';', -(int)(ConsoleDraw->X), 'H'); Video = (PUCHAR)(ConsoleDraw + 1); - Video = &Video[((ConsoleDraw->Y + y) * DeviceExtension->Columns + ConsoleDraw->X) * 2]; + Video = &Video[((ConsoleDraw->Y + y) * /*DeviceExtension->Columns +*/ ConsoleDraw->X) * 2]; for (x = 0; x < ConsoleDraw->SizeX; x++) { AddToSendBuffer(DeviceExtension, 1, Video[x * 2]);
19 years, 1 month
1
0
0
0
[blight] 18897: Add NtGdiAlphaBlend to w32ksvc.db (and fix tabs)
by blight@svn.reactos.com
Add NtGdiAlphaBlend to w32ksvc.db (and fix tabs) Forward gdi32:GdiAlphaBlend to NtGdiAlphaBlend Modified: trunk/reactos/lib/gdi32/gdi32.def Modified: trunk/reactos/lib/gdi32/misc/stubs.c Modified: trunk/reactos/tools/nci/w32ksvc.db _____ Modified: trunk/reactos/lib/gdi32/gdi32.def --- trunk/reactos/lib/gdi32/gdi32.def 2005-10-30 22:16:30 UTC (rev 18896) +++ trunk/reactos/lib/gdi32/gdi32.def 2005-10-30 22:19:33 UTC (rev 18897) @@ -248,7 +248,7 @@ GdiAddFontResourceW@12 GdiAddGlsBounds@8 GdiAddGlsRecord@16 -GdiAlphaBlend@44 +GdiAlphaBlend@44=NtGdiAlphaBlend@44 GdiArtificialDecrementDriver@8 GdiCleanCacheDC@4 GdiComment@12 _____ Modified: trunk/reactos/lib/gdi32/misc/stubs.c --- trunk/reactos/lib/gdi32/misc/stubs.c 2005-10-30 22:16:30 UTC (rev 18896) +++ trunk/reactos/lib/gdi32/misc/stubs.c 2005-10-30 22:19:33 UTC (rev 18897) @@ -1855,18 +1855,6 @@ */ BOOL STDCALL -GdiAlphaBlend(HDC hdcDst,LONG DstX,LONG DstY,LONG DstCx,LONG DstCy,HDC hdcSrc,LONG SrcX,LONG SrcY,LONG SrcCx,LONG SrcCy,BLENDFUNCTION BlendFunction) -{ - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -} - -/* - * @unimplemented - */ -BOOL -STDCALL GdiArtificialDecrementDriver(LPWSTR pDriverName,BOOL unknown) { UNIMPLEMENTED; _____ Modified: trunk/reactos/tools/nci/w32ksvc.db --- trunk/reactos/tools/nci/w32ksvc.db 2005-10-30 22:16:30 UTC (rev 18896) +++ trunk/reactos/tools/nci/w32ksvc.db 2005-10-30 22:19:33 UTC (rev 18897) @@ -2,18 +2,18 @@ NtGdiAbortDoc 1 NtGdiAbortPath 1 NtGdiAddFontResource 2 +NtGdiAlphaBlend 11 NtGdiAngleArc 6 NtGdiAnimatePalette 4 -NtGdiArc 9 +NtGdiArc 9 NtGdiArcTo 9 NtGdiBeginPath 1 NtGdiBitBlt 9 NtGdiCancelDC 1 NtGdiCheckColorsInGamut 4 -#NtGdiChoosePixelFormat (2?) NtGdiChord 9 NtGdiCloseEnhMetaFile 1 -NtGdiCloseFigure 1 +NtGdiCloseFigure 1 NtGdiCloseMetaFile 1 NtGdiColorMatchToTarget 3 NtGdiCombineRgn 4 @@ -56,7 +56,7 @@ NtGdiDeleteEnhMetaFile 1 NtGdiDeleteMetaFile 1 NtGdiDeleteObject 1 -NtGdiDescribePixelFormat 4 +NtGdiDescribePixelFormat 4 #NtGdiDeviceCapabilitiesEx ? NtGdiDrawEscape 4 NtGdiEllipse 5 @@ -67,7 +67,7 @@ NtGdiEnumFonts 4 NtGdiEnumICMProfiles 3 NtGdiEnumMetaFile 4 -NtGdiEnumObjects 4 +NtGdiEnumObjects 4 NtGdiEqualRgn 2 NtGdiEscape 5 NtGdiExcludeClipRect 5 @@ -79,7 +79,7 @@ NtGdiExtTextOut 8 NtGdiFillPath 1 NtGdiFillRgn 3 -NtGdiFlattenPath 1 +NtGdiFlattenPath 1 NtGdiFloodFill 4 NtGdiFrameRgn 5 NtGdiGdiComment 3 @@ -88,7 +88,7 @@ #NtGdiGdiPlayDCScript ? #NtGdiGdiPlayJournal ? #NtGdiGdiPlayScript ? -#NtGdiGdiPlaySpoolStream ? +#NtGdiGdiPlaySpoolStream ? NtGdiGdiSetBatchLimit 1 NtGdiGetArcDirection 1 NtGdiGetAspectRatioFilterEx 2 @@ -122,16 +122,16 @@ NtGdiGetEnhMetaFilePixelFormat 3 NtGdiGetFontData 5 NtGdiGetFontFamilyInfo 4 -NtGdiGetFontLanguageInfo 1 +NtGdiGetFontLanguageInfo 1 #NtGdiGetFontResourceInfo ? NtGdiGetGlyphOutline 7 -#NtGdiGetGlyphOutlineWow ? +#NtGdiGetGlyphOutlineWow ? NtGdiGetGraphicsMode 1 NtGdiGetICMProfile 3 NtGdiGetKerningPairs 3 NtGdiGetLogColorSpace 3 NtGdiGetMapMode 1 -NtGdiGetMetaFile 1 +NtGdiGetMetaFile 1 NtGdiGetMetaFileBitsEx 3 NtGdiGetMetaRgn 2 NtGdiGetMiterLimit 2 @@ -154,7 +154,7 @@ NtGdiGetStockObject 1 NtGdiGetStretchBltMode 1 NtGdiGetSystemPaletteEntries 4 -NtGdiGetSystemPaletteUse 1 +NtGdiGetSystemPaletteUse 1 NtGdiGetTextAlign 1 NtGdiGetTextCharset 1 NtGdiGetTextCharsetInfo 3 @@ -162,7 +162,7 @@ NtGdiGetTextExtentExPoint 7 NtGdiGetTextExtentPoint 4 NtGdiGetTextExtentPoint32 4 -NtGdiGetTextFace 3 +NtGdiGetTextFace 3 NtGdiGetTextMetrics 2 NtGdiGetViewportExtEx 2 NtGdiGetViewportOrgEx 2 @@ -180,12 +180,12 @@ NtGdiMoveToEx 4 NtGdiOffsetClipRgn 3 NtGdiOffsetRgn 3 -NtGdiOffsetViewportOrgEx 4 +NtGdiOffsetViewportOrgEx 4 NtGdiOffsetWindowOrgEx 4 NtGdiPaintRgn 2 NtGdiPatBlt 6 NtGdiPathToRegion 1 -NtGdiPie 9 +NtGdiPie 9 NtGdiPlayEnhMetaFile 3 NtGdiPlayEnhMetaFileRecord 4 NtGdiPlayMetaFile 2 @@ -198,14 +198,14 @@ NtGdiPolylineTo 3 NtGdiPolyPatBlt 5 NtGdiPolyPolyline 4 -NtGdiPolyTextOut 3 +NtGdiPolyTextOut 3 NtGdiPolygon 3 -NtGdiPolyPolygon 4 +NtGdiPolyPolygon 4 NtGdiPtInRegion 3 NtGdiPtVisible 3 NtGdiRealizePalette 1 NtGdiRectInRegion 2 -NtGdiRectVisible 2 +NtGdiRectVisible 2 NtGdiRectangle 5 NtGdiRemoveFontResource 1 NtGdiResetDC 2 @@ -236,7 +236,7 @@ NtGdiSetDIBitsToDevice 12 NtGdiSetDeviceGammaRamp 2 NtGdiSetEnhMetaFileBits 2 -#NtGdiSetFontEnumeration ? +#NtGdiSetFontEnumeration ? NtGdiSetGraphicsMode 2 NtGdiSetICMMode 2 NtGdiSetICMProfile 2 @@ -254,13 +254,13 @@ NtGdiSetRectRgn 5 #NtGdiSetRelAbs 2 NtGdiSetStretchBltMode 2 -NtGdiSetSystemPaletteUse 2 +NtGdiSetSystemPaletteUse 2 NtGdiSetTextAlign 2 NtGdiSetTextColor 2 NtGdiSetTextJustification 3 NtGdiSetViewportExtEx 4 NtGdiSetViewportOrgEx 4 -#NtGdiSetWinMetaFileBits 1 +#NtGdiSetWinMetaFileBits 1 NtGdiSetWindowExtEx 4 NtGdiSetWindowOrgEx 4 NtGdiSetWorldTransform 2 @@ -270,9 +270,9 @@ NtGdiStretchDIBits 13 NtGdiStrokeAndFillPath 1 NtGdiStrokePath 1 -NtGdiSwapBuffers 1 +NtGdiSwapBuffers 1 NtGdiTextOut 5 -NtGdiTransparentBlt 11 +NtGdiTransparentBlt 11 NtGdiTranslateCharsetInfo 3 NtGdiUnrealizeObject 1 NtGdiUpdateColors 1
19 years, 1 month
1
0
0
0
[blight] 18896: Add IntEngAlphaBlend and NtGdiAlphaBlend functions, EngAlphaBlend (the real implementation) is still missing.
by blight@svn.reactos.com
Add IntEngAlphaBlend and NtGdiAlphaBlend functions, EngAlphaBlend (the real implementation) is still missing. Modified: trunk/reactos/subsys/win32k/eng/bitblt.c Modified: trunk/reactos/subsys/win32k/include/inteng.h Modified: trunk/reactos/subsys/win32k/objects/bitmaps.c _____ Modified: trunk/reactos/subsys/win32k/eng/bitblt.c --- trunk/reactos/subsys/win32k/eng/bitblt.c 2005-10-30 22:14:11 UTC (rev 18895) +++ trunk/reactos/subsys/win32k/eng/bitblt.c 2005-10-30 22:16:30 UTC (rev 18896) @@ -889,6 +889,62 @@ return ret; } +BOOL STDCALL +IntEngAlphaBlend(IN SURFOBJ *Dest, + IN SURFOBJ *Source, + IN CLIPOBJ *Clip, + IN XLATEOBJ *ColorTranslation, + IN PRECTL DestRect, + IN PRECTL SourceRect, + IN BLENDOBJ *BlendObj) +{ + BOOL ret = FALSE; + BITMAPOBJ *DestObj; + BITMAPOBJ *SourceObj; + + ASSERT(Dest); + DestObj = CONTAINING_RECORD(Dest, BITMAPOBJ, SurfObj); + ASSERT(DestObj); + + ASSERT(Source); + SourceObj = CONTAINING_RECORD(Source, BITMAPOBJ, SurfObj); + ASSERT(SourceObj); + + ASSERT(DestRect); + ASSERT(SourceRect); + + BITMAPOBJ_LockBitmapBits(DestObj); + MouseSafetyOnDrawStart(Dest, DestRect->left, DestRect->top, + DestRect->right, DestRect->bottom); + + if (Source != Dest) + BITMAPOBJ_LockBitmapBits(SourceObj); + MouseSafetyOnDrawStart(Source, SourceRect->left, SourceRect->top, + SourceRect->right, SourceRect->bottom); + + /* Call the driver's DrvAlphaBlend if available */ + if (DestObj->flHooks & HOOK_ALPHABLEND) + { + ret = GDIDEVFUNCS(Dest).AlphaBlend( + Dest, Source, Clip, ColorTranslation, + DestRect, SourceRect, BlendObj); + } + + if (! ret) + { + ret = EngAlphaBlend(Dest, Source, Clip, ColorTranslation, + DestRect, SourceRect, BlendObj); + } + + MouseSafetyOnDrawEnd(Source); + if (Source != Dest) + BITMAPOBJ_UnlockBitmapBits(SourceObj); + MouseSafetyOnDrawEnd(Dest); + BITMAPOBJ_UnlockBitmapBits(DestObj); + + return ret; +} + /**** REACTOS FONT RENDERING CODE *********************************************/ /* renders the alpha mask bitmap */ _____ Modified: trunk/reactos/subsys/win32k/include/inteng.h --- trunk/reactos/subsys/win32k/include/inteng.h 2005-10-30 22:14:11 UTC (rev 18895) +++ trunk/reactos/subsys/win32k/include/inteng.h 2005-10-30 22:16:30 UTC (rev 18896) @@ -162,5 +162,14 @@ IN LONG y, IN RECTL *prcl); +BOOL STDCALL +IntEngAlphaBlend(IN SURFOBJ *Dest, + IN SURFOBJ *Source, + IN CLIPOBJ *Clip, + IN XLATEOBJ *ColorTranslation, + IN PRECTL DestRect, + IN PRECTL SourceRect, + IN BLENDOBJ *BlendObj); + #endif /* _WIN32K_INTENG_H */ _____ Modified: trunk/reactos/subsys/win32k/objects/bitmaps.c --- trunk/reactos/subsys/win32k/objects/bitmaps.c 2005-10-30 22:14:11 UTC (rev 18895) +++ trunk/reactos/subsys/win32k/objects/bitmaps.c 2005-10-30 22:16:30 UTC (rev 18896) @@ -1284,6 +1284,145 @@ return Status; } +BOOL STDCALL +NtGdiAlphaBlend( + HDC hDCDest, + INT XOriginDest, + INT YOriginDest, + INT WidthDest, + INT HeightDest, + HDC hDCSrc, + INT XOriginSrc, + INT YOriginSrc, + INT WidthSrc, + INT HeightSrc, + BLENDFUNCTION BlendFunc) +{ + PDC DCDest = NULL; + PDC DCSrc = NULL; + BITMAPOBJ *BitmapDest, *BitmapSrc; + RECTL DestRect, SourceRect; + BOOL Status; + XLATEOBJ *XlateObj; + BLENDOBJ BlendObj = {BlendFunc}; + HPALETTE SourcePalette = 0, DestPalette = 0; + + DCDest = DC_LockDc(hDCDest); + if (NULL == DCDest) + { + DPRINT1("Invalid destination dc handle (0x%08x) passed to NtGdiAlphaBlend\n", hDCDest); + SetLastWin32Error(ERROR_INVALID_HANDLE); + return FALSE; + } + if (DCDest->IsIC) + { + DC_UnlockDc(DCDest); + /* Yes, Windows really returns TRUE in this case */ + return TRUE; + } + + if (hDCSrc != hDCDest) + { + DCSrc = DC_LockDc(hDCSrc); + if (NULL == DCSrc) + { + DC_UnlockDc(DCDest); + DPRINT1("Invalid source dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCSrc); + SetLastWin32Error(ERROR_INVALID_HANDLE); + return FALSE; + } + if (DCSrc->IsIC) + { + DC_UnlockDc(DCSrc); + DC_UnlockDc(DCDest); + /* Yes, Windows really returns TRUE in this case */ + return TRUE; + } + } + else + { + DCSrc = DCDest; + } + + /* Offset the destination and source by the origin of their DCs. */ + XOriginDest += DCDest->w.DCOrgX; + YOriginDest += DCDest->w.DCOrgY; + XOriginSrc += DCSrc->w.DCOrgX; + YOriginSrc += DCSrc->w.DCOrgY; + + DestRect.left = XOriginDest; + DestRect.top = YOriginDest; + DestRect.right = XOriginDest + WidthDest; + DestRect.bottom = YOriginDest + HeightDest; + + SourceRect.left = XOriginSrc; + SourceRect.top = YOriginSrc; + SourceRect.right = XOriginSrc + WidthSrc; + SourceRect.bottom = YOriginSrc + HeightSrc; + + /* Determine surfaces to be used in the bitblt */ + BitmapDest = BITMAPOBJ_LockBitmap(DCDest->w.hBitmap); + if (DCSrc->w.hBitmap == DCDest->w.hBitmap) + BitmapSrc = BitmapDest; + else + BitmapSrc = BITMAPOBJ_LockBitmap(DCSrc->w.hBitmap); + + /* Create the XLATEOBJ. */ + if (DCDest->w.hPalette != 0) + DestPalette = DCDest->w.hPalette; + if (DCSrc->w.hPalette != 0) + SourcePalette = DCSrc->w.hPalette; + + /* KB41464 details how to convert between mono and color */ + if (DCDest->w.bitsPerPixel == 1 && DCSrc->w.bitsPerPixel == 1) + { + XlateObj = NULL; + } + else + { + if (DCDest->w.bitsPerPixel == 1) + { + XlateObj = IntEngCreateMonoXlate(0, DestPalette, SourcePalette, DCSrc->w.backgroundColor); + } + else if (DCSrc->w.bitsPerPixel == 1) + { + XlateObj = IntEngCreateSrcMonoXlate(DestPalette, DCSrc->w.backgroundColor, DCSrc->w.textColor); + } + else + { + XlateObj = IntEngCreateXlate(0, 0, DestPalette, SourcePalette); + } + if (NULL == XlateObj) + { + BITMAPOBJ_UnlockBitmap(BitmapDest); + if (BitmapSrc != BitmapDest) + BITMAPOBJ_UnlockBitmap(BitmapSrc); + DC_UnlockDc(DCDest); + if (hDCSrc != hDCDest) + DC_UnlockDc(DCSrc); + SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES); + return FALSE; + } + } + + /* Perform the alpha blend operation */ + Status = IntEngAlphaBlend(&BitmapDest->SurfObj, &BitmapSrc->SurfObj, + DCDest->CombinedClip, XlateObj, + &DestRect, &SourceRect, &BlendObj); + + if (XlateObj != NULL) + EngDeleteXlate(XlateObj); + + BITMAPOBJ_UnlockBitmap(BitmapDest); + if (BitmapSrc != BitmapDest) + BITMAPOBJ_UnlockBitmap(BitmapSrc); + DC_UnlockDc(DCDest); + if (hDCSrc != hDCDest) + DC_UnlockDc(DCSrc); + + return Status; +} + /* Internal Functions */ INT FASTCALL
19 years, 1 month
1
0
0
0
[blight] 18895: Add NtGdiAlphaBlend prototype.
by blight@svn.reactos.com
Add NtGdiAlphaBlend prototype. Modified: trunk/reactos/include/win32k/bitmaps.h _____ Modified: trunk/reactos/include/win32k/bitmaps.h --- trunk/reactos/include/win32k/bitmaps.h 2005-10-30 21:52:23 UTC (rev 18894) +++ trunk/reactos/include/win32k/bitmaps.h 2005-10-30 22:14:11 UTC (rev 18895) @@ -55,6 +55,21 @@ /* User Entry Points */ BOOL STDCALL +NtGdiAlphaBlend( + HDC hDCDest, + INT XOriginDest, + INT YOriginDest, + INT WidthDest, + INT HeightDest, + HDC hDCSrc, + INT XOriginSrc, + INT YOriginSrc, + INT WidthSrc, + INT HeightSrc, + BLENDFUNCTION BlendFunc); + +BOOL +STDCALL NtGdiBitBlt ( HDC hDCDest, INT XDest,
19 years, 1 month
1
0
0
0
[ekohl] 18894: - Implement GetServiceKeyNameW (untested).
by ekohl@svn.reactos.com
- Implement GetServiceKeyNameW (untested). - Mark deleted service in the service list. - Some SCM-Calls fail if the has been marked for delete. Modified: trunk/reactos/include/idl/svcctl.idl Modified: trunk/reactos/lib/advapi32/service/scm.c Modified: trunk/reactos/subsys/system/services/rpcserver.c Modified: trunk/reactos/subsys/system/services/services.h _____ Modified: trunk/reactos/include/idl/svcctl.idl --- trunk/reactos/include/idl/svcctl.idl 2005-10-30 19:37:11 UTC (rev 18893) +++ trunk/reactos/include/idl/svcctl.idl 2005-10-30 21:52:23 UTC (rev 18894) @@ -136,7 +136,14 @@ [out, size_is(*lpcchBuffer), unique] LPWSTR lpDisplayName, [in, out, ref] LPDWORD lpcchBuffer); + /* Function 21 */ + DWORD ScmrGetServiceKeyNameW([in] handle_t BindingHandle, + [in] SC_HANDLE hSCManager, + [in, string, ref] LPCWSTR lpDisplayName, + [out, size_is(*lpcchBuffer), unique] LPWSTR lpServiceName, + [in, out, ref] LPDWORD lpcchBuffer); + /* Function 27 */ DWORD ScmrOpenSCManagerA([in] handle_t BindingHandle, [in, string, unique] LPCSTR lpMachineName, _____ Modified: trunk/reactos/lib/advapi32/service/scm.c --- trunk/reactos/lib/advapi32/service/scm.c 2005-10-30 19:37:11 UTC (rev 18893) +++ trunk/reactos/lib/advapi32/service/scm.c 2005-10-30 21:52:23 UTC (rev 18894) @@ -618,7 +618,7 @@ /********************************************************************** * GetServiceKeyNameW * - * @unimplemented + * @implemented */ BOOL STDCALL GetServiceKeyNameW(SC_HANDLE hSCManager, @@ -626,7 +626,6 @@ LPWSTR lpServiceName, LPDWORD lpcchBuffer) { -#if 0 DWORD dwError; DPRINT("GetServiceKeyNameW() called\n"); @@ -646,10 +645,6 @@ } return TRUE; -#endif - DPRINT1("GetServiceKeyNameW is unimplemented\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; } _____ Modified: trunk/reactos/subsys/system/services/rpcserver.c --- trunk/reactos/subsys/system/services/rpcserver.c 2005-10-30 19:37:11 UTC (rev 18893) +++ trunk/reactos/subsys/system/services/rpcserver.c 2005-10-30 21:52:23 UTC (rev 18894) @@ -348,7 +348,15 @@ /* FIXME: Acquire service database lock exclusively */ + if (lpService->bDeleted) + { + DPRINT1("The service has already been marked for delete!\n"); + return ERROR_SERVICE_MARKED_FOR_DELETE; + } + /* Mark service for delete */ + lpService->bDeleted = TRUE; + dwError = ScmMarkServiceForDelete(lpService); /* FIXME: Release service database lock */ @@ -533,8 +541,19 @@ return ERROR_INVALID_HANDLE; } + /* FIXME: Lock database exclusively */ + + if (lpService->bDeleted) + { + /* FIXME: Unlock database */ + DPRINT1("The service has already been marked for delete!\n"); + return ERROR_SERVICE_MARKED_FOR_DELETE; + } + /* FIXME: ... */ + /* FIXME: Unlock database */ + DPRINT1("ScmrChangeServiceConfigW() done (Error %lu)\n", dwError); return dwError; @@ -1007,6 +1026,56 @@ } +/* Function 21 */ +unsigned long +ScmrGetServiceKeyNameW(handle_t BindingHandle, + unsigned int hSCManager, + wchar_t *lpDisplayName, + wchar_t *lpServiceName, /* [out, unique] */ + unsigned long *lpcchBuffer) +{ +// PMANAGER_HANDLE hManager; + PSERVICE lpService; + DWORD dwLength; + DWORD dwError; + + DPRINT1("ScmrGetServiceKeyNameW() called\n"); + DPRINT1("hSCManager = %x\n", hSCManager); + DPRINT1("lpDisplayName: %S\n", lpDisplayName); + DPRINT1("lpServiceName: %p\n", lpServiceName); + DPRINT1("*lpcchBuffer: %lu\n", *lpcchBuffer); + +// hManager = (PMANAGER_HANDLE)hSCManager; +// if (hManager->Handle.Tag != MANAGER_TAG) +// { +// DPRINT1("Invalid manager handle!\n"); +// return ERROR_INVALID_HANDLE; +// } + + /* Get service database entry */ + lpService = ScmGetServiceEntryByDisplayName(lpDisplayName); + if (lpService == NULL) + { + DPRINT1("Could not find a service!\n"); + return ERROR_SERVICE_DOES_NOT_EXIST; + } + + dwLength = wcslen(lpService->lpServiceName); + + if (lpServiceName != NULL && + *lpcchBuffer > dwLength) + { + wcscpy(lpServiceName, lpService->lpServiceName); + } + + dwError = (*lpcchBuffer > dwLength) ? ERROR_SUCCESS : ERROR_INSUFFICIENT_BUFFER; + + *lpcchBuffer = dwLength; + + return dwError; +} + + /* Function 27 */ unsigned long ScmrOpenSCManagerA(handle_t BindingHandle, _____ Modified: trunk/reactos/subsys/system/services/services.h --- trunk/reactos/subsys/system/services/services.h 2005-10-30 19:37:11 UTC (rev 18893) +++ trunk/reactos/subsys/system/services/services.h 2005-10-30 21:52:23 UTC (rev 18894) @@ -15,6 +15,7 @@ LPWSTR lpServiceName; LPWSTR lpDisplayName; UNICODE_STRING ServiceGroup; + BOOL bDeleted; SERVICE_STATUS Status; DWORD dwStartType;
19 years, 1 month
1
0
0
0
[hpoussin] 18893: Implement IRP_MJ_PNP / IRP_MN_QUERY_INTERFACE for GUID_BUS_INTERFACE_STANDARD
by hpoussin@svn.reactos.com
Implement IRP_MJ_PNP / IRP_MN_QUERY_INTERFACE for GUID_BUS_INTERFACE_STANDARD Modified: trunk/reactos/drivers/bus/pci/fdo.c Modified: trunk/reactos/drivers/bus/pci/pci.h Modified: trunk/reactos/drivers/bus/pci/pci.xml Modified: trunk/reactos/drivers/bus/pci/pdo.c _____ Modified: trunk/reactos/drivers/bus/pci/fdo.c --- trunk/reactos/drivers/bus/pci/fdo.c 2005-10-30 19:36:29 UTC (rev 18892) +++ trunk/reactos/drivers/bus/pci/fdo.c 2005-10-30 19:37:11 UTC (rev 18893) @@ -370,12 +370,12 @@ AllocatedResources = IoGetCurrentIrpStackLocation(Irp)->Parameters.StartDevice.AllocatedResou rces; if (!AllocatedResources) { - DPRINT("PCI: No allocated resources sent to driver\n"); + DPRINT("No allocated resources sent to driver\n"); return STATUS_INSUFFICIENT_RESOURCES; } if (AllocatedResources->Count < 1) { - DPRINT("PCI: Not enough allocated resources sent to driver\n"); + DPRINT("Not enough allocated resources sent to driver\n"); return STATUS_INSUFFICIENT_RESOURCES; } if (AllocatedResources->List[0].PartialResourceList.Version != 1 @@ -394,17 +394,17 @@ if (FoundBusNumber || ResourceDescriptor->u.BusNumber.Length != 1) return STATUS_INVALID_PARAMETER; DeviceExtension->BusNumber = ResourceDescriptor->u.BusNumber.Start; - DPRINT("PCI: Found bus number resource: %lu\n", DeviceExtension->BusNumber); + DPRINT("Found bus number resource: %lu\n", DeviceExtension->BusNumber); FoundBusNumber = TRUE; break; } default: - DPRINT1("PCI: Unknown resource descriptor type 0x%x\n", ResourceDescriptor->Type); + DPRINT1("Unknown resource descriptor type 0x%x\n", ResourceDescriptor->Type); } } if (!FoundBusNumber) { - DPRINT("PCI: All required resources were not found in allocated resources list\n"); + DPRINT("Some required resources were not found in allocated resources list\n"); return STATUS_INSUFFICIENT_RESOURCES; } @@ -519,7 +519,7 @@ break; #endif default: - DPRINT("Unknown IOCTL 0x%X\n", IrpSp->MinorFunction); + DPRINT1("Unknown IOCTL 0x%lx\n", IrpSp->MinorFunction); /* * Do NOT complete the IRP as it will be processed by the lower _____ Modified: trunk/reactos/drivers/bus/pci/pci.h --- trunk/reactos/drivers/bus/pci/pci.h 2005-10-30 19:36:29 UTC (rev 18892) +++ trunk/reactos/drivers/bus/pci/pci.h 2005-10-30 19:37:11 UTC (rev 18893) @@ -68,6 +68,8 @@ UNICODE_STRING DeviceDescription; // Textual description of device location UNICODE_STRING DeviceLocation; + // Number of interfaces references + LONG References; } PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION; /* Functional Device Object device extension for the PCI driver device object */ _____ Modified: trunk/reactos/drivers/bus/pci/pci.xml --- trunk/reactos/drivers/bus/pci/pci.xml 2005-10-30 19:36:29 UTC (rev 18892) +++ trunk/reactos/drivers/bus/pci/pci.xml 2005-10-30 19:37:11 UTC (rev 18893) @@ -1,4 +1,4 @@ -<module name="pci" type="kernelmodedriver" installbase="system32/drivers" installname="pci.sys" allowwarnings="true"> +<module name="pci" type="kernelmodedriver" installbase="system32/drivers" installname="pci.sys"> <include base="pci">.</include> <define name="__USE_W32API" /> <library>ntoskrnl</library> _____ Modified: trunk/reactos/drivers/bus/pci/pdo.c --- trunk/reactos/drivers/bus/pci/pdo.c 2005-10-30 19:36:29 UTC (rev 18892) +++ trunk/reactos/drivers/bus/pci/pdo.c 2005-10-30 19:37:11 UTC (rev 18893) @@ -828,31 +828,200 @@ } +static VOID NTAPI +InterfaceReference( + IN PVOID Context) +{ + PPDO_DEVICE_EXTENSION DeviceExtension; + + DPRINT("InterfaceReference(%p)\n", Context); + + DeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)Context)->DeviceExtension; + InterlockedIncrement(&DeviceExtension->References); +} + + +static VOID NTAPI +InterfaceDereference( + IN PVOID Context) +{ + PPDO_DEVICE_EXTENSION DeviceExtension; + + DPRINT("InterfaceDereference(%p)\n", Context); + + DeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)Context)->DeviceExtension; + InterlockedDecrement(&DeviceExtension->References); +} + + +static BOOLEAN NTAPI +InterfaceBusTranslateBusAddress( + IN PVOID Context, + IN PHYSICAL_ADDRESS BusAddress, + IN ULONG Length, + IN OUT PULONG AddressSpace, + OUT PPHYSICAL_ADDRESS TranslatedAddress) +{ + PPDO_DEVICE_EXTENSION DeviceExtension; + PFDO_DEVICE_EXTENSION FdoDeviceExtension; + + DPRINT("InterfaceBusTranslateBusAddress(%p %p 0x%lx %p %p)\n", + Context, BusAddress, Length, AddressSpace, TranslatedAddress); + + DeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)Context)->DeviceExtension; + FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceExtension->Fdo->DeviceExtension; + + return HalTranslateBusAddress( + PCIBus, FdoDeviceExtension->BusNumber, + BusAddress, AddressSpace, TranslatedAddress); +} + + +static PDMA_ADAPTER NTAPI +InterfaceBusGetDmaAdapter( + IN PVOID Context, + IN PDEVICE_DESCRIPTION DeviceDescription, + OUT PULONG NumberOfMapRegisters) +{ + DPRINT("InterfaceBusGetDmaAdapter(%p %p %p)\n", + Context, DeviceDescription, NumberOfMapRegisters); + return (PDMA_ADAPTER)HalGetAdapter(DeviceDescription, NumberOfMapRegisters); +} + + +static ULONG NTAPI +InterfaceBusSetBusData( + IN PVOID Context, + IN ULONG DataType, + IN PVOID Buffer, + IN ULONG Offset, + IN ULONG Length) +{ + PPDO_DEVICE_EXTENSION DeviceExtension; + ULONG Size; + + DPRINT("InterfaceBusSetBusData()\n", + Context, DataType, Buffer, Offset, Length); + + if (DataType != PCI_WHICHSPACE_CONFIG) + { + DPRINT("Unknown DataType %lu\n", DataType); + return 0; + } + + DeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)Context)->DeviceExtension; + + /* Get PCI configuration space */ + Size = HalSetBusDataByOffset(PCIConfiguration, + DeviceExtension->PciDevice->BusNumber, + DeviceExtension->PciDevice->SlotNumber.u.AsULONG, + Buffer, + Offset, + Length); + return Size; +} + + +static ULONG NTAPI +InterfaceBusGetBusData( + IN PVOID Context, + IN ULONG DataType, + IN PVOID Buffer, + IN ULONG Offset, + IN ULONG Length) +{ + PPDO_DEVICE_EXTENSION DeviceExtension; + ULONG Size; + + DPRINT("InterfaceBusGetBusData() called\n", + Context, DataType, Buffer, Offset, Length); + + if (DataType != PCI_WHICHSPACE_CONFIG) + { + DPRINT("Unknown DataType %lu\n", DataType); + return 0; + } + + DeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)Context)->DeviceExtension; + + /* Get PCI configuration space */ + Size = HalGetBusDataByOffset(PCIConfiguration, + DeviceExtension->PciDevice->BusNumber, + DeviceExtension->PciDevice->SlotNumber.u.AsULONG, + Buffer, + Offset, + Length); + return Size; +} + + static NTSTATUS +PdoQueryInterface( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + PIO_STACK_LOCATION IrpSp) +{ + NTSTATUS Status; + + if (RtlCompareMemory(IrpSp->Parameters.QueryInterface.InterfaceType, + &GUID_BUS_INTERFACE_STANDARD, sizeof(GUID)) == sizeof(GUID)) + { + /* BUS_INTERFACE STANDARD */ + if (IrpSp->Parameters.QueryInterface.Version < 1) + Status = STATUS_NOT_SUPPORTED; + else if (IrpSp->Parameters.QueryInterface.Size < sizeof(BUS_INTERFACE_STANDARD)) + Status = STATUS_BUFFER_TOO_SMALL; + else + { + PBUS_INTERFACE_STANDARD BusInterface; + BusInterface = (PBUS_INTERFACE_STANDARD)IrpSp->Parameters.QueryInterface.Interface; + BusInterface->Size = sizeof(BUS_INTERFACE_STANDARD); + BusInterface->Version = 1; + BusInterface->Context = DeviceObject; + BusInterface->InterfaceReference = InterfaceReference; + BusInterface->InterfaceDereference = InterfaceDereference; + BusInterface->TranslateBusAddress = InterfaceBusTranslateBusAddress; + BusInterface->GetDmaAdapter = InterfaceBusGetDmaAdapter; + BusInterface->SetBusData = InterfaceBusSetBusData; + BusInterface->GetBusData = InterfaceBusGetBusData; + Status = STATUS_SUCCESS; + } + } + else + { + /* Not a supported interface */ + return STATUS_NOT_SUPPORTED; + } + + if (NT_SUCCESS(Status)) + { + /* Add a reference for the returned interface */ + PINTERFACE Interface; + Interface = (PINTERFACE)IrpSp->Parameters.QueryInterface.Interface; + Interface->InterfaceReference(Interface->Context); + } + + return Status; +} + + +static NTSTATUS PdoReadConfig( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, PIO_STACK_LOCATION IrpSp) { - PPDO_DEVICE_EXTENSION DeviceExtension; ULONG Size; - DPRINT1("PdoReadConfig() called\n"); + DPRINT("PdoReadConfig() called\n"); - DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + Size = InterfaceBusGetBusData( + DeviceObject, + IrpSp->Parameters.ReadWriteConfig.WhichSpace, + IrpSp->Parameters.ReadWriteConfig.Buffer, + IrpSp->Parameters.ReadWriteConfig.Offset, + IrpSp->Parameters.ReadWriteConfig.Length); -#if 0 - if (IrpSp->Parameters.ReadWriteConfig.WhichSpace != PCI_WHICHSPACE_CONFIG) - return STATUS_NOT_SUPPORTED; -#endif - - /* Get PCI configuration space */ - Size= HalGetBusDataByOffset(PCIConfiguration, - DeviceExtension->PciDevice->BusNumber, - DeviceExtension->PciDevice->SlotNumber.u.AsULONG, - IrpSp->Parameters.ReadWriteConfig.Buffer, - IrpSp->Parameters.ReadWriteConfig.Offset, - IrpSp->Parameters.ReadWriteConfig.Length); if (Size != IrpSp->Parameters.ReadWriteConfig.Length) { DPRINT1("Size %lu Length %lu\n", Size, IrpSp->Parameters.ReadWriteConfig.Length); @@ -872,25 +1041,18 @@ IN PIRP Irp, PIO_STACK_LOCATION IrpSp) { - PPDO_DEVICE_EXTENSION DeviceExtension; ULONG Size; DPRINT1("PdoWriteConfig() called\n"); - DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + /* Get PCI configuration space */ + Size = InterfaceBusSetBusData( + DeviceObject, + IrpSp->Parameters.ReadWriteConfig.WhichSpace, + IrpSp->Parameters.ReadWriteConfig.Buffer, + IrpSp->Parameters.ReadWriteConfig.Offset, + IrpSp->Parameters.ReadWriteConfig.Length); -#if 0 - if (IrpSp->Parameters.ReadWriteConfig.WhichSpace != PCI_WHICHSPACE_CONFIG) - return STATUS_NOT_SUPPORTED; -#endif - - /* Get PCI configuration space */ - Size= HalSetBusDataByOffset(PCIConfiguration, - DeviceExtension->PciDevice->BusNumber, - DeviceExtension->PciDevice->SlotNumber.u.AsULONG, - IrpSp->Parameters.ReadWriteConfig.Buffer, - IrpSp->Parameters.ReadWriteConfig.Offset, - IrpSp->Parameters.ReadWriteConfig.Length); if (Size != IrpSp->Parameters.ReadWriteConfig.Length) { DPRINT1("Size %lu Length %lu\n", Size, IrpSp->Parameters.ReadWriteConfig.Length); @@ -1019,18 +1181,23 @@ Status = STATUS_SUCCESS; break; + case IRP_MN_QUERY_INTERFACE: + DPRINT("IRP_MN_QUERY_INTERFACE received\n"); + Status = PdoQueryInterface(DeviceObject, Irp, IrpSp); + break; + case IRP_MN_READ_CONFIG: - DPRINT1("IRP_MN_READ_CONFIG received\n"); + DPRINT("IRP_MN_READ_CONFIG received\n"); Status = PdoReadConfig(DeviceObject, Irp, IrpSp); break; case IRP_MN_WRITE_CONFIG: - DPRINT1("IRP_MN_WRITE_CONFIG received\n"); + DPRINT("IRP_MN_WRITE_CONFIG received\n"); Status = PdoWriteConfig(DeviceObject, Irp, IrpSp); break; default: - DPRINT("Unknown IOCTL 0x%X\n", IrpSp->MinorFunction); + DPRINT1("Unknown IOCTL 0x%lx\n", IrpSp->MinorFunction); break; }
19 years, 1 month
1
0
0
0
[greatlrd] 18892: Correct One struct
by greatlrd@svn.reactos.com
Correct One struct Modified: trunk/reactos/w32api/include/d3dtypes.h _____ Modified: trunk/reactos/w32api/include/d3dtypes.h --- trunk/reactos/w32api/include/d3dtypes.h 2005-10-30 18:43:16 UTC (rev 18891) +++ trunk/reactos/w32api/include/d3dtypes.h 2005-10-30 19:36:29 UTC (rev 18892) @@ -151,19 +151,19 @@ union { D3DVALUE r; D3DVALUE dvR; - } DUMMYUNIONNAME1; + }; union { D3DVALUE g; D3DVALUE dvG; - } DUMMYUNIONNAME2; + }; union { D3DVALUE b; D3DVALUE dvB; - } DUMMYUNIONNAME3; + }; union { D3DVALUE a; D3DVALUE dvA; - } DUMMYUNIONNAME4; + }; } D3DCOLORVALUE,*LPD3DCOLORVALUE; typedef struct _D3DRECT {
19 years, 1 month
1
0
0
0
[blight] 18891: Silence warning for non-win32 compilations.
by blight@svn.reactos.com
Silence warning for non-win32 compilations. Modified: trunk/reactos/tools/rbuild/backend/msvc/genguid.cpp _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/genguid.cpp --- trunk/reactos/tools/rbuild/backend/msvc/genguid.cpp 2005-10-30 18:01:50 UTC (rev 18890) +++ trunk/reactos/tools/rbuild/backend/msvc/genguid.cpp 2005-10-30 18:43:16 UTC (rev 18891) @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - + #include "../../pch.h" #include "msvc.h" #include <string> @@ -36,7 +36,7 @@ static CoInitializeFunc *pCoInitialize = NULL; static CoUninitializeFunc *pCoUninitialize = NULL; -static CoCreateGuidFunc *pCoCreateGuid = NULL; +static CoCreateGuidFunc *pCoCreateGuid = NULL; std::string @@ -85,11 +85,12 @@ return guid; } - + #else /* Linux, etc */ - + std::string MSVCBackend::_gen_guid() { -} -#endif /* WIN32/Linux */ + return std::string(); +} +#endif /* WIN32/Linux */
19 years, 1 month
1
0
0
0
[turner] 18890: Handle possible error from FindFirstFile. Thanks to Thomas for finding the problem.
by turner@svn.reactos.com
Handle possible error from FindFirstFile. Thanks to Thomas for finding the problem. Modified: trunk/reactos/subsys/system/cmd/misc.c _____ Modified: trunk/reactos/subsys/system/cmd/misc.c --- trunk/reactos/subsys/system/cmd/misc.c 2005-10-30 17:50:03 UTC (rev 18889) +++ trunk/reactos/subsys/system/cmd/misc.c 2005-10-30 18:01:50 UTC (rev 18890) @@ -101,6 +101,11 @@ else { hFind = FindFirstFile(TempPath,&FindFileData); + if(hFind == INVALID_HANDLE_VALUE) + { + _tcscpy(OutPath, Path); + return; + } _tcscat(TempPath, _T("\\")); _tcscat(OutPath, FindFileData.cFileName); _tcscat(OutPath, _T("\\"));
19 years, 1 month
1
0
0
0
← Newer
1
2
3
4
5
6
...
74
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
Results per page:
10
25
50
100
200