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
July 2009
----- 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
27 participants
605 discussions
Start a n
N
ew thread
[fireball] 42290: - Silence RealizeDefaultPalette call. - Remove some testing code from userdrv, and silence tracing debug prints there too.
by fireball@svn.reactos.org
Author: fireball Date: Wed Jul 29 17:44:37 2009 New Revision: 42290 URL:
http://svn.reactos.org/svn/reactos?rev=42290&view=rev
Log: - Silence RealizeDefaultPalette call. - Remove some testing code from userdrv, and silence tracing debug prints there too. Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] Wed Jul 29 17:44:37 2009 @@ -424,7 +424,7 @@ UINT CDECL RosDrv_RealizeDefaultPalette( NTDRV_PDEVICE *physDev ) { - UNIMPLEMENTED; + //UNIMPLEMENTED; return FALSE; } Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] Wed Jul 29 17:44:37 2009 @@ -494,13 +494,7 @@ if (offset == GWL_STYLE && (changed & WS_VISIBLE) && (style->styleNew & WS_VISIBLE)) { /* Do some magic... */ - ERR("Window %x is being made visible\n", hwnd); - GetWindowRect(hwnd, &rcWnd); - GetClientRect(hwnd, &rcClient); - //x=rcWnd.left;y=rcWnd.top;cx=rcWnd.right-rcWnd.left;cy=rcWnd.bottom-rcWnd.top; - x=0;y=0;cx=300;cy=300; - //ERR("x %d, y %d, cx %d, cy %d\n", x, y, cx, cy); - //SetWindowPos( hwnd, 0, x+1, y+1, cx, cy, SWP_NOACTIVATE | SWP_NOZORDER ); + TRACE("Window %x is being made visible\n", hwnd); } if (offset == GWL_STYLE && (changed & WS_DISABLED)) @@ -586,7 +580,7 @@ if (valid_rects) { - ERR("valid_rects[0] (%d, %d)-(%d,%d)\n", + TRACE("valid_rects[0] (%d, %d)-(%d,%d)\n", valid_rects[0].top, valid_rects[0].left, valid_rects[0].bottom, valid_rects[0].right); } #if 0
15 years, 4 months
1
0
0
0
[fireball] 42289: - Silence most of debug warnings. Only errors should have DPRINT1 now.
by fireball@svn.reactos.org
Author: fireball Date: Wed Jul 29 17:42:53 2009 New Revision: 42289 URL:
http://svn.reactos.org/svn/reactos?rev=42289&view=rev
Log: - Silence most of debug warnings. Only errors should have DPRINT1 now. Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c [iso-8859-1] Wed Jul 29 17:42:53 2009 @@ -29,7 +29,7 @@ BOOLEAN bRes; PDC pSrc, pDst; - DPRINT1("BitBlt %x -> %x\n", physDevSrc, physDevDst); + DPRINT("BitBlt %x -> %x\n", physDevSrc, physDevDst); /* Get a pointer to the DCs */ pSrc = GDI_GetObjPtr(physDevSrc, (SHORT)GDI_OBJECT_TYPE_DC); @@ -206,7 +206,7 @@ /* Get a pointer to the DCs */ pDC = GDI_GetObjPtr(physDev, (SHORT)GDI_OBJECT_TYPE_DC); - DPRINT1("RosGdiSetDIBits for bitmap %x (user handle %x), StartScan %d, ScanLines %d\n", + DPRINT("RosGdiSetDIBits for bitmap %x (user handle %x), StartScan %d, ScanLines %d\n", hBitmap, hUserBitmap, StartScan, ScanLines); /* Set the bits */ Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] Wed Jul 29 17:42:53 2009 @@ -113,12 +113,12 @@ /* Check if it's a compatible DC */ if (*pdev) { - DPRINT1("Creating a compatible with %x DC!\n", *pdev); + DPRINT("Creating a compatible with %x DC!\n", *pdev); } if (dc->dwType == OBJ_MEMDC) { - DPRINT1("Creating a memory DC %x\n", hNewDC); + DPRINT("Creating a memory DC %x\n", hNewDC); slSize.cx = 1; slSize.cy = 1; hStockBitmap = GreCreateBitmap(slSize, 1, 1, 0, NULL); pNewDC->pBitmap = GDI_GetObjPtr(hStockBitmap, (SHORT)GDI_OBJECT_TYPE_BITMAP); @@ -130,7 +130,7 @@ } else { - DPRINT1("Creating a display DC %x\n", hNewDC); + DPRINT("Creating a display DC %x\n", hNewDC); pNewDC->pBitmap = GDI_GetObjPtr(PrimarySurface.pSurface, (SHORT)GDI_OBJECT_TYPE_BITMAP); /* Set DC rectangles */ @@ -195,6 +195,8 @@ slSize.cx = 1; slSize.cy = 1; hBmpKern = GreCreateBitmap(slSize, 1, 1, 0, NULL); } + + DPRINT("Selecting %x bitmap to hdc %x\n", hBmpKern, physDev); /* Get a pointer to the DC and the bitmap*/ pDC = GDI_GetObjPtr(physDev, (SHORT)GDI_OBJECT_TYPE_DC); @@ -246,7 +248,7 @@ break; case BS_HATCHED: - DPRINT("BS_HATCHED\n" ); + DPRINT1("BS_HATCHED\n" ); //GreCreateHatchedBrush(); UNIMPLEMENTED; break;
15 years, 4 months
1
0
0
0
[fireball] 42288: - GDIO_GetObjPtr: Don't go through handles array without obtaining a lock.
by fireball@svn.reactos.org
Author: fireball Date: Wed Jul 29 17:29:50 2009 New Revision: 42288 URL:
http://svn.reactos.org/svn/reactos?rev=42288&view=rev
Log: - GDIO_GetObjPtr: Don't go through handles array without obtaining a lock. Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c [iso-8859-1] Wed Jul 29 17:29:50 2009 @@ -167,8 +167,8 @@ GDIOBJHDR *ptr = NULL; int i; - //KeEnterCriticalRegion(); - //ExAcquireResourceExclusiveLite(GDI_resource, TRUE); + KeEnterCriticalRegion(); + ExAcquireResourceExclusiveLite(GDI_resource, TRUE); i = ((UINT_PTR)handle >> 2) - FIRST_LARGE_HANDLE; if (i >= 0 && i < MAX_LARGE_HANDLES) @@ -179,11 +179,12 @@ if (!ptr) { - //ExReleaseResourceLite(GDI_resource); - //KeLeaveCriticalRegion(); DPRINT1( "Invalid handle %p\n", handle ); } //else TRACE("(%p): enter %d\n", handle, GDI_level.crst.RecursionCount); + + ExReleaseResourceLite(GDI_resource); + KeLeaveCriticalRegion(); return ptr; }
15 years, 4 months
1
0
0
0
[fireball] 42287: - Implement EngDeletePalette.
by fireball@svn.reactos.org
Author: fireball Date: Wed Jul 29 15:42:26 2009 New Revision: 42287 URL:
http://svn.reactos.org/svn/reactos?rev=42287&view=rev
Log: - Implement EngDeletePalette. Modified: branches/arwinss/reactos/subsystems/win32/win32k/eng/engpal.c Modified: branches/arwinss/reactos/subsystems/win32/win32k/eng/engpal.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/eng/engpal.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/eng/engpal.c [iso-8859-1] Wed Jul 29 15:42:26 2009 @@ -33,10 +33,10 @@ BOOL APIENTRY -EngDeletePalette(IN HPALETTE hpal) +EngDeletePalette(IN HPALETTE hpal) { - UNIMPLEMENTED; - return FALSE; + PALETTE_FreePaletteByHandle(hpal); + return TRUE; } ULONG
15 years, 4 months
1
0
0
0
[fireball] 42286: - RosGdiSelectBitmap: In case it gets an unknown bitmap, create a stock bitmap and select it. But warning is still printed for further investigation. - RosGdiSelectBrush: Nullify selected brush pointer after freeing last selected brush. It helps tracking selection failures. - RosGdiSelectBrush: Create a NULL brush if requested. - RosGdiSelectPen: Don't free previously selected brush if selecting new pen fails.
by fireball@svn.reactos.org
Author: fireball Date: Wed Jul 29 15:40:32 2009 New Revision: 42286 URL:
http://svn.reactos.org/svn/reactos?rev=42286&view=rev
Log: - RosGdiSelectBitmap: In case it gets an unknown bitmap, create a stock bitmap and select it. But warning is still printed for further investigation. - RosGdiSelectBrush: Nullify selected brush pointer after freeing last selected brush. It helps tracking selection failures. - RosGdiSelectBrush: Create a NULL brush if requested. - RosGdiSelectPen: Don't free previously selected brush if selecting new pen fails. Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] Wed Jul 29 15:40:32 2009 @@ -184,12 +184,16 @@ PDC pDC; PSURFACE pSurface; HGDIOBJ hBmpKern; + SIZEL slSize; hBmpKern = GDI_MapUserHandle(hbitmap); if (!hBmpKern) { DPRINT1("Trying to select an unknown bitmap %x to the DC %x!\n", hbitmap, physDev); - return; + + /* It probably is a stock bitmap, so select it */ + slSize.cx = 1; slSize.cy = 1; + hBmpKern = GreCreateBitmap(slSize, 1, 1, 0, NULL); } /* Get a pointer to the DC and the bitmap*/ @@ -222,13 +226,18 @@ DPRINT("RosGdiSelectBrush(): dc %x, brush style %x, brush color %x\n", physDev, pLogBrush->lbStyle, pLogBrush->lbColor); /* Free previous brush */ - if (pDC->pFillBrush) GreFreeBrush(pDC->pFillBrush); + if (pDC->pFillBrush) + { + GreFreeBrush(pDC->pFillBrush); + pDC->pFillBrush = NULL; + } /* Create the brush */ switch(pLogBrush->lbStyle) { case BS_NULL: DPRINT("BS_NULL\n" ); + pDC->pFillBrush = GreCreateNullBrush(); break; case BS_SOLID: @@ -278,14 +287,16 @@ DPRINT("RosGdiSelectPen(): dc %x, pen style %x, pen color %x\n", physDev, pLogPen->lopnStyle, pLogPen->lopnColor); + if (pExtLogPen) + { + DPRINT1("Ext pens aren't supported yet!"); + /* Release the object */ + GDI_ReleaseObj(physDev); + return; + } + /* Free previous brush */ if (pDC->pLineBrush) GreFreeBrush(pDC->pLineBrush); - - if (pExtLogPen) - { - DPRINT1("Ext pens aren't supported yet!"); - return; - } /* Create the pen */ pDC->pLineBrush =
15 years, 4 months
1
0
0
0
[fireball] 42285: - Uncomment mouse safety code in BitBlt (it doesn't do anything since it's stubbed anyway). - Add GreCreateNullBrush for creating NULL brushes. - Allocate/free surface objects using Eng routines using TAG_SURFOBJ.
by fireball@svn.reactos.org
Author: fireball Date: Wed Jul 29 15:32:00 2009 New Revision: 42285 URL:
http://svn.reactos.org/svn/reactos?rev=42285&view=rev
Log: - Uncomment mouse safety code in BitBlt (it doesn't do anything since it's stubbed anyway). - Add GreCreateNullBrush for creating NULL brushes. - Allocate/free surface objects using Eng routines using TAG_SURFOBJ. Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c branches/arwinss/reactos/subsystems/win32/win32k/include/brushobj.h Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c [iso-8859-1] Wed Jul 29 15:32:00 2009 @@ -80,7 +80,6 @@ if (bRemoveMouse) { -#if 0 SURFACE_LockBitmapBits(psurfTrg); if (psoSrc) @@ -94,7 +93,6 @@ } MouseSafetyOnDrawStart(psoTrg, rclClipped.left, rclClipped.top, rclClipped.right, rclClipped.bottom); -#endif } /* Is the target surface device managed? */ @@ -113,6 +111,7 @@ /* Is the source surface device managed? */ else if (psoSrc && psurfSrc->flHooks & HOOK_BITBLT) { + DPRINT1("psoSrc %p\n", psoSrc); pfnBitBlt = GDIDEVFUNCS(psoSrc).BitBlt; } else @@ -132,7 +131,6 @@ pptlBrush, rop4); -#if 0 if (bRemoveMouse) { MouseSafetyOnDrawEnd(psoTrg); @@ -147,7 +145,6 @@ SURFACE_UnlockBitmapBits(psurfTrg); } -#endif return bResult; } Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c [iso-8859-1] Wed Jul 29 15:32:00 2009 @@ -139,6 +139,24 @@ PBRUSHGDI NTAPI +GreCreateNullBrush() +{ + PBRUSHGDI pBrush; + + /* Allocate memory for the object */ + pBrush = EngAllocMem(FL_ZERO_MEMORY, sizeof(BRUSHGDI), TAG_BRUSHOBJ); + if (!pBrush) return NULL; + + /* Set NULL flag */ + pBrush->flAttrs |= GDIBRUSH_IS_NULL; + + /* Return newly created brush */ + return pBrush; +} + + +PBRUSHGDI +NTAPI GreCreateSolidBrush(COLORREF crColor) { PBRUSHGDI pBrush; Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c [iso-8859-1] Wed Jul 29 15:32:00 2009 @@ -136,11 +136,8 @@ return 0; /* Allocate storage for surface object */ - pSurface = ExAllocatePool(PagedPool, sizeof(SURFACE)); + pSurface = EngAllocMem(FL_ZERO_MEMORY, sizeof(SURFACE), TAG_SURFOBJ); if (!pSurface) return NULL; - - /* Zero it */ - RtlZeroMemory(pSurface, sizeof(SURFACE)); /* Create a handle for it */ hSurface = alloc_gdi_handle(&pSurface->BaseObject, (SHORT)GDI_OBJECT_TYPE_BITMAP); @@ -222,7 +219,7 @@ pSurf = free_gdi_handle(hBitmap); /* Free its storage */ - ExFreePool(pSurf); + EngFreeMem(pSurf); } LONG FASTCALL Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/brushobj.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/include/brushobj.h [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/include/brushobj.h [iso-8859-1] Wed Jul 29 15:32:00 2009 @@ -55,6 +55,9 @@ PBRUSHGDI NTAPI GreCreatePatternBrush(PSURFACE pSurface); +PBRUSHGDI NTAPI +GreCreateNullBrush(); + VOID NTAPI GreFreeBrush(PBRUSHGDI pBrush);
15 years, 4 months
1
0
0
0
[fireball] 42284: - Add surface object allocation tag.
by fireball@svn.reactos.org
Author: fireball Date: Wed Jul 29 15:29:26 2009 New Revision: 42284 URL:
http://svn.reactos.org/svn/reactos?rev=42284&view=rev
Log: - Add surface object allocation tag. Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/tags.h Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/tags.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/include/tags.h [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/include/tags.h [iso-8859-1] Wed Jul 29 15:29:26 2009 @@ -9,6 +9,7 @@ #define TAG_DIB TAG('D', 'I', 'B', ' ') /* dib */ #define TAG_DRIVER TAG('G', 'D', 'R', 'V') /* video drivers */ #define TAG_GSEM TAG('G', 's', 'e', 'm') /* Gdi Semaphore */ +#define TAG_SURFOBJ TAG('S', 'R', 'F', 'O') /* surface object */ #define TAG_PALETTE TAG('G', 'l', 'a', '8') #define TAG_RTLREGISTRY TAG('R', 'q', 'r', 'v') /* RTL registry */ #define TAG_XLATEOBJ TAG('X', 'L', 'A', 'O') /* xlate object */
15 years, 4 months
1
0
0
0
[janderwald] 42283: - Start Implementing IKsPin interface - Increment PinInstanceCount when a pin has succcessfully been created - Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex - Initialize pin dispatch table
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Jul 29 11:48:36 2009 New Revision: 42283 URL:
http://svn.reactos.org/svn/reactos?rev=42283&view=rev
Log: - Start Implementing IKsPin interface - Increment PinInstanceCount when a pin has succcessfully been created - Implement KsPinAcquireProcessingMutex, KsPinGetConnectedPinDeviceObject, KsPinGetConnectedFileObject, KsPinGetConnectedPinInterface, KsPinGetNextSiblingPin, KsPinGetParentFilter, KsPinRegisterFrameReturnCallback, KsPinRegisterHandshakeCallback, KsPinRegisterIrpCompletionCallback, KsPinRegisterPowerCallbacks, KsPinReleaseProcessingMutex - Initialize pin dispatch table - Add create items for allocator, clock, node create requests - AVStream clients should now be able to instantiated pins, streaming not yet supported Modified: trunk/reactos/drivers/ksfilter/ks/filter.c trunk/reactos/drivers/ksfilter/ks/ksfunc.h trunk/reactos/drivers/ksfilter/ks/ksiface.h trunk/reactos/drivers/ksfilter/ks/pin.c Modified: trunk/reactos/drivers/ksfilter/ks/filter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/filter…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/filter.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/filter.c [iso-8859-1] Wed Jul 29 11:48:36 2009 @@ -924,8 +924,22 @@ if (NT_SUCCESS(Status)) { - /* create the pin */ - Status = KspCreatePin(DeviceObject, Irp, This->Header.KsDevice, This->FilterFactory, (IKsFilter*)&This->lpVtbl, Connect); + if (This->PinInstanceCount[Connect->PinId] < This->Filter.Descriptor->PinDescriptors[Connect->PinId].InstancesPossible) + { + /* create the pin */ + Status = KspCreatePin(DeviceObject, Irp, This->Header.KsDevice, This->FilterFactory, (IKsFilter*)&This->lpVtbl, Connect, (KSPIN_DESCRIPTOR_EX*)&This->Filter.Descriptor->PinDescriptors[Connect->PinId]); + + if (NT_SUCCESS(Status)) + { + /* successfully created pin, increment pin instance count */ + This->PinInstanceCount[Connect->PinId]++; + } + } + else + { + /* maximum instance count reached, bye-bye */ + Status = STATUS_UNSUCCESSFUL; + } } /* release control mutex */ @@ -1040,11 +1054,13 @@ This->Factory = Factory; This->FilterFactory = iface; This->FileObject = IoStack->FileObject; + KeInitializeMutex(&This->ProcessingMutex, 0); + /* initialize basic header */ This->Header.KsDevice = &DeviceExtension->DeviceHeader->KsDevice; This->Header.Parent.KsFilterFactory = iface->lpVtbl->GetStruct(iface); This->Header.Type = KsObjectTypeFilter; KeInitializeMutex(&This->Header.ControlMutex, 0); - KeInitializeMutex(&This->ProcessingMutex, 0); + /* allocate the stream descriptors */ @@ -1095,9 +1111,7 @@ return Status; } - /* initialize object header */ - This->Header.Type = KsObjectTypeFilter; - This->Header.KsDevice = &DeviceExtension->DeviceHeader->KsDevice; + /* initialize object header extra fields */ This->ObjectHeader->Type = KsObjectTypeFilter; This->ObjectHeader->Unknown = (PUNKNOWN)&This->lpVtbl; This->ObjectHeader->ObjectType = (PVOID)&This->Filter; Modified: trunk/reactos/drivers/ksfilter/ks/ksfunc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/ksfunc…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/ksfunc.h [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/ksfunc.h [iso-8859-1] Wed Jul 29 11:48:36 2009 @@ -121,7 +121,8 @@ IN PKSDEVICE KsDevice, IN IKsFilterFactory * FilterFactory, IN IKsFilter* Filter, - IN PKSPIN_CONNECT Connect); + IN PKSPIN_CONNECT Connect, + IN KSPIN_DESCRIPTOR_EX* Descriptor); #endif Modified: trunk/reactos/drivers/ksfilter/ks/ksiface.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/ksifac…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/ksiface.h [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/ksiface.h [iso-8859-1] Wed Jul 29 11:48:36 2009 @@ -63,6 +63,20 @@ }; /***************************************************************************** + * IKsTransport + ***************************************************************************** + */ + +#undef INTERFACE +#define INTERFACE IKsTransport + +DECLARE_INTERFACE_(IKsTransport, IUnknown) +{ + DEFINE_ABSTRACT_UNKNOWN() +}; + + +/***************************************************************************** * IKsPin ***************************************************************************** */ @@ -70,9 +84,60 @@ #undef INTERFACE #define INTERFACE IKsPin +struct KSPTRANSPORTCONFIG; + DECLARE_INTERFACE_(IKsPin, IUnknown) { DEFINE_ABSTRACT_UNKNOWN() + + STDMETHOD_(NTSTATUS, TransferKsIrp)(THIS_ + IN PIRP Irp, + IN IKsTransport **OutTransport) PURE; + + STDMETHOD_(VOID, DiscardKsIrp)(THIS_ + IN PIRP Irp, + IN IKsTransport * *OutTransport) PURE; + + STDMETHOD_(NTSTATUS, Connect)(THIS_ + IN IKsTransport * TransportIn, + OUT IKsTransport ** OutTransportIn, + OUT IKsTransport * *OutTransportOut, + IN KSPIN_DATAFLOW DataFlow) PURE; + + STDMETHOD_(NTSTATUS, SetDeviceState)(THIS_ + IN KSSTATE OldState, + IN KSSTATE NewState, + IN IKsTransport * *OutTransport) PURE; + + STDMETHOD_(VOID, SetResetState)(THIS_ + IN KSRESET ResetState, + OUT IKsTransport * * OutTransportOut) PURE; + + STDMETHOD_(NTSTATUS, GetTransportConfig)(THIS_ + IN struct KSPTRANSPORTCONFIG * TransportConfig, + OUT IKsTransport ** OutTransportIn, + OUT IKsTransport ** OutTransportOut) PURE; + + STDMETHOD_(NTSTATUS, SetTransportConfig)(THIS_ + IN struct KSPTRANSPORTCONFIG const * TransportConfig, + OUT IKsTransport ** OutTransportIn, + OUT IKsTransport ** OutTransportOut) PURE; + + STDMETHOD_(NTSTATUS, ResetTransportConfig)(THIS_ + OUT IKsTransport ** OutTransportIn, + OUT IKsTransport ** OutTransportOut) PURE; + + STDMETHOD_(PKSPIN, GetStruct)(THIS) PURE; + STDMETHOD_(PKSPROCESSPIN, GetProcessPin)(THIS) PURE; + STDMETHOD_(NTSTATUS, AttemptBypass)(THIS) PURE; + STDMETHOD_(NTSTATUS, AttemptUnbypass)(THIS) PURE; + + STDMETHOD_(VOID, GenerateConnectionEvents)(THIS_ + IN ULONG EventMask) PURE; + + STDMETHOD_(NTSTATUS, ClientSetDeviceState)(THIS_ + IN KSSTATE StateIn, + IN KSSTATE StateOut) PURE; }; /***************************************************************************** Modified: trunk/reactos/drivers/ksfilter/ks/pin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/pin.c?…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/pin.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/pin.c [iso-8859-1] Wed Jul 29 11:48:36 2009 @@ -9,15 +9,256 @@ #include "priv.h" -/* - @unimplemented +typedef struct +{ + KSBASIC_HEADER BasicHeader; + KSPIN Pin; + PKSIOBJECT_HEADER ObjectHeader; + LIST_ENTRY Entry; + + IKsPinVtbl *lpVtbl; + + LONG ref; + KMUTEX ProcessingMutex; + PFILE_OBJECT FileObject; + + PFNKSPINPOWER Sleep; + PFNKSPINPOWER Wake; + PFNKSPINHANDSHAKE Handshake; + PFNKSPINFRAMERETURN FrameReturn; + PFNKSPINIRPCOMPLETION IrpCompletion; + +}IKsPinImpl; + +NTSTATUS +NTAPI +IKsPin_fnQueryInterface( + IKsPin * iface, + IN REFIID refiid, + OUT PVOID* Output) +{ + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(iface, IKsPinImpl, lpVtbl); + + if (IsEqualGUIDAligned(refiid, &IID_IUnknown)) + { + *Output = &This->lpVtbl; + _InterlockedIncrement(&This->ref); + return STATUS_SUCCESS; + } + return STATUS_UNSUCCESSFUL; +} + +ULONG +NTAPI +IKsPin_fnAddRef( + IKsPin * iface) +{ + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(iface, IKsPinImpl, lpVtbl); + + return InterlockedIncrement(&This->ref); +} + +ULONG +NTAPI +IKsPin_fnRelease( + IKsPin * iface) +{ + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(iface, IKsPinImpl, lpVtbl); + + InterlockedDecrement(&This->ref); + + if (This->ref == 0) + { + FreeItem(This); + return 0; + } + /* Return new reference count */ + return This->ref; +} + +NTSTATUS +NTAPI +IKsPin_fnTransferKsIrp( + IN IKsPin *iface, + IN PIRP Irp, + IN IKsTransport **OutTransport) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + +VOID +NTAPI +IKsPin_fnDiscardKsIrp( + IN IKsPin *iface, + IN PIRP Irp, + IN IKsTransport * *OutTransport) +{ + UNIMPLEMENTED +} + + +NTSTATUS +NTAPI +IKsPin_fnConnect( + IN IKsPin *iface, + IN IKsTransport * TransportIn, + OUT IKsTransport ** OutTransportIn, + OUT IKsTransport * *OutTransportOut, + IN KSPIN_DATAFLOW DataFlow) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +IKsPin_fnSetDeviceState( + IN IKsPin *iface, + IN KSSTATE OldState, + IN KSSTATE NewState, + IN IKsTransport * *OutTransport) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + +VOID +NTAPI +IKsPin_fnSetResetState( + IN IKsPin *iface, + IN KSRESET ResetState, + OUT IKsTransport * * OutTransportOut) +{ + UNIMPLEMENTED +} + +NTSTATUS +NTAPI +IKsPin_fnGetTransportConfig( + IN IKsPin *iface, + IN struct KSPTRANSPORTCONFIG * TransportConfig, + OUT IKsTransport ** OutTransportIn, + OUT IKsTransport ** OutTransportOut) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +IKsPin_fnSetTransportConfig( + IN IKsPin *iface, + IN struct KSPTRANSPORTCONFIG const * TransportConfig, + OUT IKsTransport ** OutTransportIn, + OUT IKsTransport ** OutTransportOut) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +IKsPin_fnResetTransportConfig( + IN IKsPin *iface, + OUT IKsTransport ** OutTransportIn, + OUT IKsTransport ** OutTransportOut) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + +PKSPIN +NTAPI +IKsPin_fnGetStruct( + IN IKsPin *iface) +{ + UNIMPLEMENTED + return NULL; +} + +PKSPROCESSPIN +NTAPI +IKsPin_fnGetProcessPin( + IN IKsPin *iface) +{ + UNIMPLEMENTED + return NULL; +} + +NTSTATUS +NTAPI +IKsPin_fnAttemptBypass( + IN IKsPin *iface) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +IKsPin_fnAttemptUnbypass( + IN IKsPin *iface) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + +VOID +NTAPI +IKsPin_fnGenerateConnectionEvents( + IN IKsPin *iface, + IN ULONG EventMask) +{ + UNIMPLEMENTED +} + +NTSTATUS +NTAPI +IKsPin_fnClientSetDeviceState( + IN IKsPin *iface, + IN KSSTATE StateIn, + IN KSSTATE StateOut) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + +static IKsPinVtbl vt_IKsPin = +{ + IKsPin_fnQueryInterface, + IKsPin_fnAddRef, + IKsPin_fnRelease, + IKsPin_fnTransferKsIrp, + IKsPin_fnDiscardKsIrp, + IKsPin_fnConnect, + IKsPin_fnSetDeviceState, + IKsPin_fnSetResetState, + IKsPin_fnGetTransportConfig, + IKsPin_fnSetTransportConfig, + IKsPin_fnResetTransportConfig, + IKsPin_fnGetStruct, + IKsPin_fnGetProcessPin, + IKsPin_fnAttemptBypass, + IKsPin_fnAttemptUnbypass, + IKsPin_fnGenerateConnectionEvents, + IKsPin_fnClientSetDeviceState +}; + + +//============================================================== + +/* + @implemented */ VOID NTAPI KsPinAcquireProcessingMutex( IN PKSPIN Pin) { - UNIMPLEMENTED + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin); + + KeWaitForSingleObject(&This->ProcessingMutex, Executive, KernelMode, FALSE, NULL); } /* @@ -96,31 +337,34 @@ } /* - @unimplemented + @implemented */ PDEVICE_OBJECT NTAPI KsPinGetConnectedPinDeviceObject( IN PKSPIN Pin) { - UNIMPLEMENTED - return NULL; -} - -/* - @unimplemented + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin); + + /* return related file object */ + return IoGetRelatedDeviceObject(This->FileObject); +} + +/* + @implemented */ PFILE_OBJECT NTAPI KsPinGetConnectedPinFileObject( IN PKSPIN Pin) { - UNIMPLEMENTED - return NULL; -} - -/* - @unimplemented + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin); + + return This->FileObject; +} + +/* + @implemented */ NTSTATUS NTAPI @@ -129,8 +373,14 @@ IN const GUID* InterfaceId, OUT PVOID* Interface) { - UNIMPLEMENTED - return STATUS_UNSUCCESSFUL; + IKsPin * KsPin; + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin); + + /* get pin interface */ + KsPin = (IKsPin*)&This->lpVtbl; + + /* query pin interface for the requested interface */ + return KsPin->lpVtbl->QueryInterface(KsPin, InterfaceId, Interface); } /* @@ -147,27 +397,28 @@ } /* - @unimplemented + @implemented */ PKSPIN NTAPI KsPinGetNextSiblingPin( IN PKSPIN Pin) { - UNIMPLEMENTED - return NULL; -} - -/* - @unimplemented + return KsGetNextSibling((PVOID)Pin); +} + +/* + @implemented */ PKSFILTER NTAPI KsPinGetParentFilter( IN PKSPIN Pin) { - UNIMPLEMENTED - return NULL; + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin); + + /* return parent filter */ + return This->BasicHeader.Parent.KsFilter; } /* @@ -184,7 +435,7 @@ } /* - @unimplemented + @implemented */ VOID NTAPI @@ -192,11 +443,14 @@ IN PKSPIN Pin, IN PFNKSPINFRAMERETURN FrameReturn) { - UNIMPLEMENTED -} - -/* - @unimplemented + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin); + + /* register frame return callback */ + This->FrameReturn = FrameReturn; +} + +/* + @implemented */ VOID NTAPI @@ -204,11 +458,14 @@ IN PKSPIN Pin, IN PFNKSPINHANDSHAKE Handshake) { - UNIMPLEMENTED -} - -/* - @unimplemented + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin); + + /* register private protocol handshake callback */ + This->Handshake = Handshake; +} + +/* + @implemented */ VOID NTAPI @@ -216,11 +473,14 @@ IN PKSPIN Pin, IN PFNKSPINIRPCOMPLETION IrpCompletion) { - UNIMPLEMENTED -} - -/* - @unimplemented + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin); + + /* register irp completion callback */ + This->IrpCompletion = IrpCompletion; +} + +/* + @implemented */ VOID NTAPI @@ -229,18 +489,25 @@ IN PFNKSPINPOWER Sleep OPTIONAL, IN PFNKSPINPOWER Wake OPTIONAL) { - UNIMPLEMENTED -} - -/* - @unimplemented + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin); + + /* register power callbacks */ + This->Sleep = Sleep; + This->Wake = Wake; +} + +/* + @implemented */ VOID NTAPI KsPinReleaseProcessingMutex( IN PKSPIN Pin) { - UNIMPLEMENTED + IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin); + + /* release processing mutex */ + KeReleaseMutex(&This->ProcessingMutex, FALSE); } /* @@ -521,15 +788,225 @@ } NTSTATUS +NTAPI +IKsPin_DispatchDeviceIoControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + UNIMPLEMENTED; + + Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +IKsPin_Close( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + UNIMPLEMENTED; + + Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +IKsPin_DispatchCreateAllocator( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + UNIMPLEMENTED; + + Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +IKsPin_DispatchCreateClock( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + UNIMPLEMENTED; + + Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +IKsPin_DispatchCreateNode( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + UNIMPLEMENTED; + + Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_NOT_IMPLEMENTED; +} + +static KSDISPATCH_TABLE PinDispatchTable = +{ + IKsPin_DispatchDeviceIoControl, + KsDispatchInvalidDeviceRequest, + KsDispatchInvalidDeviceRequest, + KsDispatchInvalidDeviceRequest, + IKsPin_Close, + KsDispatchQuerySecurity, + KsDispatchSetSecurity, + KsDispatchFastIoDeviceControlFailure, + KsDispatchFastReadFailure, + KsDispatchFastReadFailure +}; + + +NTSTATUS KspCreatePin( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, - IN PKSDEVICE KsDevice, - IN IKsFilterFactory * FilterFactory, + IN PKSDEVICE KsDevice, + IN IKsFilterFactory * FilterFactory, IN IKsFilter* Filter, - IN PKSPIN_CONNECT Connect) -{ - - return STATUS_NOT_IMPLEMENTED; -} - + IN PKSPIN_CONNECT Connect, + IN KSPIN_DESCRIPTOR_EX* Descriptor) +{ + IKsPinImpl * This; + PIO_STACK_LOCATION IoStack; + IKsDevice * Device; + PDEVICE_EXTENSION DeviceExtension; + PKSOBJECT_CREATE_ITEM CreateItem; + NTSTATUS Status; + + /* sanity checks */ + ASSERT(Descriptor->Dispatch); + ASSERT(Descriptor->Dispatch->Create); + + /* get current irp stack */ + IoStack = IoGetCurrentIrpStackLocation(Irp); + + /* get device extension */ + DeviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension; + + /* get ks device interface */ + Device = (IKsDevice*)&DeviceExtension->DeviceHeader->lpVtblIKsDevice; + + /* first allocate pin ctx */ + This = AllocateItem(NonPagedPool, sizeof(IKsPinImpl)); + if (!This) + { + /* not enough memory */ + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* allocate create item */ + CreateItem = AllocateItem(NonPagedPool, sizeof(KSOBJECT_CREATE_ITEM) * 3); + if (!CreateItem) + { + /* not enough memory */ + FreeItem(This); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* initialize basic header */ + This->BasicHeader.KsDevice = KsDevice; + This->BasicHeader.Type = KsObjectTypePin; + This->BasicHeader.Parent.KsFilter = Filter->lpVtbl->GetStruct(Filter); + KeInitializeMutex(&This->BasicHeader.ControlMutex, 0); + + /* initialize pin */ + This->lpVtbl = &vt_IKsPin; + This->ref = 1; + This->FileObject = IoStack->FileObject; + KeInitializeMutex(&This->ProcessingMutex, 0); + + /* initialize ks pin descriptor */ + This->Pin.Descriptor = Descriptor; + This->Pin.Id = Connect->PinId; + + /* allocate object bag */ + This->Pin.Bag = AllocateItem(NonPagedPool, sizeof(KSIOBJECT_BAG)); + if (!This->Pin.Bag) + { + /* not enough memory */ + FreeItem(This); + FreeItem(CreateItem); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* initialize object bag */ + Device->lpVtbl->InitializeObjectBag(Device, This->Pin.Bag, &This->BasicHeader.ControlMutex); /* is using control mutex right? */ + + This->Pin.Communication = Descriptor->PinDescriptor.Communication; + This->Pin.ConnectionIsExternal = FALSE; /* FIXME */ + //FIXME This->Pin.ConnectionInterface = Descriptor->PinDescriptor.Interfaces; + //FIXME This->Pin.ConnectionMedium = Descriptor->PinDescriptor.Mediums; + //FIXME This->Pin.ConnectionPriority = KSPRIORITY_NORMAL; + This->Pin.ConnectionFormat = (PKSDATAFORMAT) (Connect + 1); + This->Pin.AttributeList = NULL; //FIXME + This->Pin.StreamHeaderSize = sizeof(KSSTREAM_HEADER); + This->Pin.DataFlow = Descriptor->PinDescriptor.DataFlow; + This->Pin.DeviceState = KSSTATE_STOP; + This->Pin.ResetState = KSRESET_END; + This->Pin.ClientState = KSSTATE_STOP; + + /* intialize allocator create item */ + CreateItem[0].Context = (PVOID)This; + CreateItem[0].Create = IKsPin_DispatchCreateAllocator; + CreateItem[0].Flags = KSCREATE_ITEM_FREEONSTOP; + RtlInitUnicodeString(&CreateItem[0].ObjectClass, KSSTRING_Allocator); + + /* intialize clock create item */ + CreateItem[1].Context = (PVOID)This; + CreateItem[1].Create = IKsPin_DispatchCreateClock; + CreateItem[1].Flags = KSCREATE_ITEM_FREEONSTOP; + RtlInitUnicodeString(&CreateItem[1].ObjectClass, KSSTRING_Clock); + + /* intialize topology node create item */ + CreateItem[2].Context = (PVOID)This; + CreateItem[2].Create = IKsPin_DispatchCreateNode; + CreateItem[2].Flags = KSCREATE_ITEM_FREEONSTOP; + RtlInitUnicodeString(&CreateItem[2].ObjectClass, KSSTRING_TopologyNode); + + /* now allocate object header */ + Status = KsAllocateObjectHeader((KSOBJECT_HEADER*)&This->ObjectHeader, 3, CreateItem, Irp, &PinDispatchTable); + if (!NT_SUCCESS(Status)) + { + /* failed to create object header */ + KsFreeObjectBag((KSOBJECT_BAG)This->Pin.Bag); + FreeItem(This); + FreeItem(CreateItem); + + /* return failure code */ + return Status; + } + + /* add extra info to object header */ + This->ObjectHeader->Type = KsObjectTypePin; + This->ObjectHeader->Unknown = (PUNKNOWN)&This->lpVtbl; + This->ObjectHeader->ObjectType = (PVOID)&This->Pin; + + /* now inform the driver to create a new pin */ + Status = Descriptor->Dispatch->Create(&This->Pin, Irp); + + if (!NT_SUCCESS(Status) && Status != STATUS_PENDING) + { + /* failed to create pin, release resources */ + KsFreeObjectHeader((KSOBJECT_HEADER)This->ObjectHeader); + KsFreeObjectBag((KSOBJECT_BAG)This->Pin.Bag); + FreeItem(This); + + /* return failure code */ + return Status; + } + + /* FIXME add pin instance to filter instance */ + + return Status; +}
15 years, 4 months
1
0
0
0
[janderwald] 42282: - Add KsGetNextSibling, KsFreeObjectBag
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Jul 29 11:33:40 2009 New Revision: 42282 URL:
http://svn.reactos.org/svn/reactos?rev=42282&view=rev
Log: - Add KsGetNextSibling, KsFreeObjectBag Modified: trunk/reactos/include/psdk/ks.h Modified: trunk/reactos/include/psdk/ks.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ks.h?rev=4228…
============================================================================== --- trunk/reactos/include/psdk/ks.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ks.h [iso-8859-1] Wed Jul 29 11:33:40 2009 @@ -3477,6 +3477,11 @@ Misc. Helper Functions */ +KSDDKAPI PVOID NTAPI +KsGetNextSibling( + IN PVOID Object); + + KSDDKAPI NTSTATUS NTAPI KsCacheMedium( IN PUNICODE_STRING SymbolicLink, @@ -3642,6 +3647,13 @@ KsAllocateObjectBag( IN PKSDEVICE Device, OUT KSOBJECT_BAG* ObjectBag); + +KSDDKAPI +VOID +NTAPI +KsFreeObjectBag( + IN KSOBJECT_BAG ObjectBag + ); KSDDKAPI VOID
15 years, 4 months
1
0
0
0
[gschneider] 42281: RosDbg: - Don't try to send data to an unconnected debugger ('cos it crashes) - Opening a connection may fail, don't change connection tool strip text in that case - Add some basic credits, joined two labels
by gschneider@svn.reactos.org
Author: gschneider Date: Wed Jul 29 00:54:03 2009 New Revision: 42281 URL:
http://svn.reactos.org/svn/reactos?rev=42281&view=rev
Log: RosDbg: - Don't try to send data to an unconnected debugger ('cos it crashes) - Opening a connection may fail, don't change connection tool strip text in that case - Add some basic credits, joined two labels Modified: trunk/tools/reactosdbg/RosDBG/AboutDlg.Designer.cs trunk/tools/reactosdbg/RosDBG/AboutDlg.cs trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs trunk/tools/reactosdbg/RosDBG/MainWindow.cs trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs Modified: trunk/tools/reactosdbg/RosDBG/AboutDlg.Designer.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/AboutDlg.D…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/AboutDlg.Designer.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/RosDBG/AboutDlg.Designer.cs [iso-8859-1] Wed Jul 29 00:54:03 2009 @@ -30,8 +30,8 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutDlg)); this.btnOK = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.versionLabel = new System.Windows.Forms.Label(); + this.rosDbgLabel = new System.Windows.Forms.Label(); + this.creditsLabel = new System.Windows.Forms.Label(); this.SuspendLayout(); // // btnOK @@ -45,23 +45,25 @@ this.btnOK.UseVisualStyleBackColor = true; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // - // label1 + // rosDbgLabel // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(37, 30); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(164, 13); - this.label1.TabIndex = 1; - this.label1.Text = "ReactOS Remote Debugger"; + this.rosDbgLabel.AutoSize = true; + this.rosDbgLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rosDbgLabel.Location = new System.Drawing.Point(37, 30); + this.rosDbgLabel.Name = "rosDbgLabel"; + this.rosDbgLabel.Size = new System.Drawing.Size(164, 13); + this.rosDbgLabel.TabIndex = 1; + this.rosDbgLabel.Text = "ReactOS Remote Debugger"; // - // versionLabel + // creditsLabel // - this.versionLabel.AutoSize = true; - this.versionLabel.Location = new System.Drawing.Point(37, 56); - this.versionLabel.Name = "versionLabel"; - this.versionLabel.Size = new System.Drawing.Size(0, 13); - this.versionLabel.TabIndex = 2; + this.creditsLabel.AutoSize = true; + this.creditsLabel.Location = new System.Drawing.Point(37, 70); + this.creditsLabel.Name = "creditsLabel"; + this.creditsLabel.Size = new System.Drawing.Size(108, 78); + this.creditsLabel.TabIndex = 3; + this.creditsLabel.Text = "Brought to you by:\r\n\r\nArt Yerkes\r\nChristoph von Wittich\r\nGed Murphy\r\nGregor Schne" + + "ider\r\n"; // // AboutDlg // @@ -69,8 +71,8 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(284, 264); - this.Controls.Add(this.versionLabel); - this.Controls.Add(this.label1); + this.Controls.Add(this.creditsLabel); + this.Controls.Add(this.rosDbgLabel); this.Controls.Add(this.btnOK); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -88,7 +90,7 @@ #endregion private System.Windows.Forms.Button btnOK; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label versionLabel; + private System.Windows.Forms.Label rosDbgLabel; + private System.Windows.Forms.Label creditsLabel; } } Modified: trunk/tools/reactosdbg/RosDBG/AboutDlg.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/AboutDlg.c…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/AboutDlg.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/RosDBG/AboutDlg.cs [iso-8859-1] Wed Jul 29 00:54:03 2009 @@ -24,7 +24,7 @@ private void AboutDlg_Load(object sender, EventArgs e) { - versionLabel.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + rosDbgLabel.Text += " " + Assembly.GetExecutingAssembly().GetName().Version.ToString(); } } } Modified: trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Dockable%2…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs [iso-8859-1] Wed Jul 29 00:54:03 2009 @@ -137,7 +137,7 @@ private void SendCommandToDebugger() { - if (RawTrafficTextBox.Text.Length > 0) + if (RawTrafficTextBox.Text.Length > 0 && mConnection.Debugger != null) { RawTrafficText.AppendText(kdbPrompt); mConnection.Debugger.Write(RawTrafficTextBox.Text); Modified: trunk/tools/reactosdbg/RosDBG/MainWindow.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/MainWindow…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/MainWindow.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/RosDBG/MainWindow.cs [iso-8859-1] Wed Jul 29 00:54:03 2009 @@ -315,7 +315,10 @@ mConnection.StartTCP(newConnection.Host, newConnection.Port); break; } - connectToolStripMenuItem.Text = "&Disconnect"; + if (mConnection.ConnectionMode != DebugConnection.Mode.ClosedMode) + { + connectToolStripMenuItem.Text = "&Disconnect"; + } } } else Modified: trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Properties…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] Wed Jul 29 00:54:03 2009 @@ -39,5 +39,5 @@ // will be increased as well. MSI installers must not be generated with the same Build Number // otherwise they won't upgrade the old installation! -[assembly: AssemblyVersion("1.0.2.67")] -[assembly: AssemblyFileVersion("1.0.2.67")] +[assembly: AssemblyVersion("1.0.2.68")] +[assembly: AssemblyFileVersion("1.0.2.68")]
15 years, 4 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
61
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
Results per page:
10
25
50
100
200