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
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
February 2010
----- 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
22 participants
365 discussions
Start a n
N
ew thread
[sir_richard] 45611: Patch by Daniel Zimmermann <netzimme@aim.com>: [DDK]: Add PCI_ADDRESS_MEMORY_SPACE. [HAL]: Use it in HalpAssignPCISlotResources.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Thu Feb 18 18:00:09 2010 New Revision: 45611 URL:
http://svn.reactos.org/svn/reactos?rev=45611&view=rev
Log: Patch by Daniel Zimmermann <netzimme(a)aim.com>: [DDK]: Add PCI_ADDRESS_MEMORY_SPACE. [HAL]: Use it in HalpAssignPCISlotResources. Modified: trunk/reactos/hal/halx86/generic/bus/pcibus.c trunk/reactos/include/ddk/winddk.h Modified: trunk/reactos/hal/halx86/generic/bus/pcibus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/bus/pci…
============================================================================== --- trunk/reactos/hal/halx86/generic/bus/pcibus.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/bus/pcibus.c [iso-8859-1] Thu Feb 18 18:00:09 2010 @@ -614,7 +614,7 @@ { if (0 != PciConfig.u.type0.BaseAddresses[Address]) { - if (/*PCI_BASE_ADDRESS_SPACE_MEMORY*/ 0 == + if (PCI_ADDRESS_MEMORY_SPACE == (PciConfig.u.type0.BaseAddresses[Address] & 0x1)) { Descriptor->Type = CmResourceTypeMemory; Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=4…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Thu Feb 18 18:00:09 2010 @@ -4063,9 +4063,10 @@ #define PCI_INVALID_VENDORID 0xFFFF #define PCI_COMMON_HDR_LENGTH (FIELD_OFFSET(PCI_COMMON_CONFIG, DeviceSpecific)) -#define PCI_ADDRESS_IO_SPACE 0x01 -#define PCI_ADDRESS_MEMORY_TYPE_MASK 0x06 -#define PCI_ADDRESS_MEMORY_PREFETCHABLE 0x08 +#define PCI_ADDRESS_MEMORY_SPACE 0x00000000 +#define PCI_ADDRESS_IO_SPACE 0x00000001 +#define PCI_ADDRESS_MEMORY_TYPE_MASK 0x00000006 +#define PCI_ADDRESS_MEMORY_PREFETCHABLE 0x00000008 #define PCI_ADDRESS_IO_ADDRESS_MASK 0xfffffffc #define PCI_ADDRESS_MEMORY_ADDRESS_MASK 0xfffffff0 #define PCI_ADDRESS_ROM_ADDRESS_MASK 0xfffff800
14 years, 8 months
1
0
0
0
[sir_richard] 45610: [NTOS]: Build the actual ARM3 PFN database.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Thu Feb 18 17:56:54 2010 New Revision: 45610 URL:
http://svn.reactos.org/svn/reactos?rev=45610&view=rev
Log: [NTOS]: Build the actual ARM3 PFN database. Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Thu Feb 18 17:56:54 2010 @@ -636,14 +636,13 @@ if (MiIsRegularMemory(LoaderBlock, PageFrameIndex)) { /* Yes we do, set it up */ - //DPRINT1("PDE is valid, setting up PFN entry\n"); Pfn1 = MI_PFN_TO_PFNENTRY(PageFrameIndex); Pfn1->u4.PteFrame = StartupPdIndex; Pfn1->PteAddress = PointerPde; Pfn1->u2.ShareCount++; Pfn1->u3.e2.ReferenceCount = 1; Pfn1->u3.e1.PageLocation = ActiveAndValid; - Pfn1->u3.e1.CacheAttribute = MiCached; + Pfn1->u3.e1.CacheAttribute = MiNonCached; } else { @@ -686,7 +685,7 @@ Pfn2->u2.ShareCount++; Pfn2->u3.e2.ReferenceCount = 1; Pfn2->u3.e1.PageLocation = ActiveAndValid; - Pfn2->u3.e1.CacheAttribute = MiCached; + Pfn2->u3.e1.CacheAttribute = MiNonCached; } } } @@ -712,21 +711,181 @@ NTAPI MiBuildPfnDatabaseZeroPage(VOID) { - /* FIXME: TODO */ + PMMPFN Pfn1; + PMMPDE PointerPde; + + /* Grab the lowest page and check if it has no real references */ + Pfn1 = MI_PFN_TO_PFNENTRY(MmLowestPhysicalPage); + if (!(MmLowestPhysicalPage) && !(Pfn1->u3.e2.ReferenceCount)) + { + /* Make it a bogus page to catch errors */ + PointerPde = MiAddressToPde(0xFFFFFFFF); + Pfn1->u4.PteFrame = PFN_FROM_PTE(PointerPde); + Pfn1->PteAddress = PointerPde; + Pfn1->u2.ShareCount++; + Pfn1->u3.e2.ReferenceCount = 0xFFF0; + Pfn1->u3.e1.PageLocation = ActiveAndValid; + Pfn1->u3.e1.CacheAttribute = MiNonCached; + } } VOID NTAPI MiBuildPfnDatabaseFromLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { - /* FIXME: TODO */ + PLIST_ENTRY NextEntry; + PFN_NUMBER PageCount = 0; + PMEMORY_ALLOCATION_DESCRIPTOR MdBlock; + PFN_NUMBER PageFrameIndex; + PMMPFN Pfn1; + PMMPTE PointerPte; + PMMPDE PointerPde; + + /* Now loop through the descriptors */ + NextEntry = LoaderBlock->MemoryDescriptorListHead.Flink; + while (NextEntry != &LoaderBlock->MemoryDescriptorListHead) + { + /* Get the current descriptor */ + MdBlock = CONTAINING_RECORD(NextEntry, + MEMORY_ALLOCATION_DESCRIPTOR, + ListEntry); + + /* Read its data */ + PageCount = MdBlock->PageCount; + PageFrameIndex = MdBlock->BasePage; + + /* Don't allow memory above what the PFN database is mapping */ + if (PageFrameIndex > MmHighestPhysicalPage) + { + /* Since they are ordered, everything past here will be larger */ + break; + } + + /* On the other hand, the end page might be higher up... */ + if ((PageFrameIndex + PageCount) > (MmHighestPhysicalPage + 1)) + { + /* In which case we'll trim the descriptor to go as high as we can */ + PageCount = MmHighestPhysicalPage + 1 - PageFrameIndex; + MdBlock->PageCount = PageCount; + + /* But if there's nothing left to trim, we got too high, so quit */ + if (!PageCount) break; + } + + /* Now check the descriptor type */ + switch (MdBlock->MemoryType) + { + /* Check for bad RAM */ + case LoaderBad: + + DPRINT1("You have damaged RAM modules. Stopping boot\n"); + while (TRUE); + break; + + /* Check for free RAM */ + case LoaderFree: + case LoaderLoadedProgram: + case LoaderFirmwareTemporary: + case LoaderOsloaderStack: + + /* Get the last page of this descriptor. Note we loop backwards */ + PageFrameIndex += PageCount - 1; + Pfn1 = MI_PFN_TO_PFNENTRY(PageFrameIndex); + while (PageCount--) + { + /* If the page really has no references, mark it as free */ + if (!Pfn1->u3.e2.ReferenceCount) + { + Pfn1->u3.e1.CacheAttribute = MiNonCached; + MiInsertPageInFreeList(PageFrameIndex); + } + + /* Go to the next page */ + Pfn1--; + PageFrameIndex--; + } + + /* Done with this block */ + break; + + /* Check for pages that are invisible to us */ + case LoaderFirmwarePermanent: + case LoaderSpecialMemory: + case LoaderBBTMemory: + + /* And skip them */ + break; + + default: + + /* Map these pages with the KSEG0 mapping that adds 0x80000000 */ + PointerPte = MiAddressToPte(KSEG0_BASE + (PageFrameIndex << PAGE_SHIFT)); + Pfn1 = MI_PFN_TO_PFNENTRY(PageFrameIndex); + while (PageCount--) + { + /* Check if the page is really unused */ + PointerPde = MiAddressToPde(KSEG0_BASE + (PageFrameIndex << PAGE_SHIFT)); + if (!Pfn1->u3.e2.ReferenceCount) + { + /* Mark it as being in-use */ + Pfn1->u4.PteFrame = PFN_FROM_PTE(PointerPde); + Pfn1->PteAddress = PointerPte; + Pfn1->u2.ShareCount++; + Pfn1->u3.e2.ReferenceCount = 1; + Pfn1->u3.e1.PageLocation = ActiveAndValid; + Pfn1->u3.e1.CacheAttribute = MiNonCached; + + /* Check for RAM disk page */ + if (MdBlock->MemoryType == LoaderXIPRom) + { + /* Make it a pseudo-I/O ROM mapping */ + Pfn1->u1.Flink = 0; + Pfn1->u2.ShareCount = 0; + Pfn1->u3.e2.ReferenceCount = 0; + Pfn1->u3.e1.PageLocation = 0; + Pfn1->u3.e1.Rom = 1; + Pfn1->u4.InPageError = 0; + Pfn1->u3.e1.PrototypePte = 1; + } + } + + /* Advance page structures */ + Pfn1++; + PageFrameIndex++; + PointerPte++; + } + break; + } + + /* Next descriptor entry */ + NextEntry = MdBlock->ListEntry.Flink; + } } VOID NTAPI MiBuildPfnDatabaseSelf(VOID) { - /* FIXME: TODO */ + PMMPTE PointerPte, LastPte; + PMMPFN Pfn1; + + /* Loop the PFN database page */ + PointerPte = MiAddressToPte(MI_PFN_TO_PFNENTRY(MmLowestPhysicalPage)); + LastPte = MiAddressToPte(MI_PFN_TO_PFNENTRY(MmHighestPhysicalPage)); + while (PointerPte <= LastPte) + { + /* Make sure the page is valid */ + if (PointerPte->u.Hard.Valid == 1) + { + /* Get the PFN entry and just mark it referenced */ + Pfn1 = MI_PFN_TO_PFNENTRY(PointerPte->u.Hard.PageFrameNumber); + Pfn1->u2.ShareCount = 1; + Pfn1->u3.e2.ReferenceCount = 1; + } + + /* Next */ + PointerPte++; + } } VOID @@ -744,6 +903,69 @@ /* Finally add the pages for the PFN database itself */ MiBuildPfnDatabaseSelf(); +} + +VOID +NTAPI +MmDumpArmPfnDatabase(VOID) +{ + ULONG i; + PMMPFN Pfn1; + PCHAR Consumer = "Unknown"; + KIRQL OldIrql; + ULONG ActivePages = 0, FreePages = 0, OtherPages = 0; + + KeRaiseIrql(HIGH_LEVEL, &OldIrql); + + // + // Loop the PFN database + // + for (i = 0; i <= MmHighestPhysicalPage; i++) + { + Pfn1 = MI_PFN_TO_PFNENTRY(i); + if (!Pfn1) continue; + + // + // Get the page location + // + switch (Pfn1->u3.e1.PageLocation) + { + case ActiveAndValid: + + Consumer = "Active and Valid"; + ActivePages++; + break; + + case FreePageList: + + Consumer = "Free Page List"; + FreePages++; + break; + + default: + + Consumer = "Other (ASSERT!)"; + OtherPages++; + break; + } + + // + // Pretty-print the page + // + DbgPrint("0x%08p:\t%20s\t(%02d.%02d) [%08p-%08p])\n", + i << PAGE_SHIFT, + Consumer, + Pfn1->u3.e2.ReferenceCount, + Pfn1->u2.ShareCount, + Pfn1->PteAddress, + Pfn1->u4.PteFrame); + } + + DbgPrint("Active: %d pages\t[%d KB]\n", ActivePages, (ActivePages << PAGE_SHIFT) / 1024); + DbgPrint("Free: %d pages\t[%d KB]\n", FreePages, (FreePages << PAGE_SHIFT) / 1024); + DbgPrint("Other: %d pages\t[%d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); + + KeLowerIrql(OldIrql); } PFN_NUMBER
14 years, 8 months
1
0
0
0
[sir_richard] 45609: [NTOS]: Remove unused code.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Thu Feb 18 17:50:55 2010 New Revision: 45609 URL:
http://svn.reactos.org/svn/reactos?rev=45609&view=rev
Log: [NTOS]: Remove unused code. Modified: trunk/reactos/ntoskrnl/mm/mpw.c Modified: trunk/reactos/ntoskrnl/mm/mpw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mpw.c?rev=4560…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mpw.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mpw.c [iso-8859-1] Thu Feb 18 17:50:55 2010 @@ -22,35 +22,6 @@ BOOLEAN MpwThreadShouldTerminate; /* FUNCTIONS *****************************************************************/ - -NTSTATUS NTAPI -MmWriteDirtyPages(ULONG Target, PULONG Actual) -{ - PFN_TYPE Page; - PFN_TYPE NextPage; - NTSTATUS Status; - - Page = MmGetLRUFirstUserPage(); - while (Page != 0 && Target > 0) - { - /* - * FIXME: While the current page is write back it is possible - * that the next page is freed and not longer a user page. - */ - NextPage = MmGetLRUNextUserPage(Page); - if (MmIsDirtyPageRmap(Page)) - { - Status = MmWritePagePhysicalAddress(Page); - if (NT_SUCCESS(Status)) - { - Target--; - } - } - Page = NextPage; - } - *Actual = Target; - return(STATUS_SUCCESS); -} NTSTATUS NTAPI MmMpwThreadMain(PVOID Ignored) @@ -81,12 +52,6 @@ } PagesWritten = 0; -#if 0 - /* - * FIXME: MmWriteDirtyPages doesn't work correctly. - */ - MmWriteDirtyPages(128, &PagesWritten); -#endif CcRosFlushDirtyPages(128, &PagesWritten); }
14 years, 8 months
1
0
0
0
[janderwald] 45608: [KSPROXY] - Stub interfaces for CBasicAudio, CKsClockForwarder, CVPConfig, CVPVBIConfig, CKsDataTypeHandler, CKsInterfaceHandler, CKsProxy, CKsQualityForwarder - Implement KsSynchronousDeviceControl, KsOpenDefaultDevice, KsGetMultiplePinFactoryItems, KsGetMediaTypeCount, DllGetClassObject
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Feb 18 16:24:29 2010 New Revision: 45608 URL:
http://svn.reactos.org/svn/reactos?rev=45608&view=rev
Log: [KSPROXY] - Stub interfaces for CBasicAudio, CKsClockForwarder, CVPConfig, CVPVBIConfig, CKsDataTypeHandler, CKsInterfaceHandler, CKsProxy, CKsQualityForwarder - Implement KsSynchronousDeviceControl, KsOpenDefaultDevice, KsGetMultiplePinFactoryItems, KsGetMediaTypeCount, DllGetClassObject Added: trunk/reactos/dll/directx/ksproxy/basicaudio.cpp (with props) trunk/reactos/dll/directx/ksproxy/classfactory.cpp (with props) trunk/reactos/dll/directx/ksproxy/clockforward.cpp (with props) trunk/reactos/dll/directx/ksproxy/cvpconfig.cpp (with props) trunk/reactos/dll/directx/ksproxy/cvpvbiconfig.cpp (with props) trunk/reactos/dll/directx/ksproxy/datatype.cpp (with props) trunk/reactos/dll/directx/ksproxy/interface.cpp (with props) trunk/reactos/dll/directx/ksproxy/ksproxy.cpp - copied, changed from r45593, trunk/reactos/dll/directx/ksproxy/ksproxy.c trunk/reactos/dll/directx/ksproxy/precomp.h (with props) trunk/reactos/dll/directx/ksproxy/proxy.cpp (with props) trunk/reactos/dll/directx/ksproxy/qualityforward.cpp (with props) Removed: trunk/reactos/dll/directx/ksproxy/ksproxy.c Modified: trunk/reactos/dll/directx/ksproxy/ksproxy.rbuild Added: trunk/reactos/dll/directx/ksproxy/basicaudio.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/basica…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/basicaudio.cpp (added) +++ trunk/reactos/dll/directx/ksproxy/basicaudio.cpp [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,0 +1,256 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy + * FILE: dll/directx/ksproxy/cvpvbiconfig.cpp + * PURPOSE: CVPVBIConfig interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +const GUID IID_IBasicAudio = {0x56a868b3, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}}; + +class CKsBasicAudio : public IBasicAudio, + public IDistributorNotify +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + + if (!m_Ref) + { + delete this; + return 0; + } + return m_Ref; + } + + // IDistributorNotify methods + HRESULT STDMETHODCALLTYPE Stop(); + HRESULT STDMETHODCALLTYPE Pause(); + HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart); + HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock); + HRESULT STDMETHODCALLTYPE NotifyGraphChange(); + + // IDispatch methods + HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo); + HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); + HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); + HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); + + + // IBasicAudio methods + HRESULT STDMETHODCALLTYPE put_Volume(long lVolume); + HRESULT STDMETHODCALLTYPE get_Volume(long *plVolume); + HRESULT STDMETHODCALLTYPE put_Balance(long lBalance); + HRESULT STDMETHODCALLTYPE get_Balance(long *plBalance); + + + CKsBasicAudio() : m_Ref(0){} + virtual ~CKsBasicAudio(){} + +protected: + LONG m_Ref; +}; + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + if (IsEqualGUID(refiid, IID_IUnknown)) + { + *Output = PVOID(this); + reinterpret_cast<IUnknown*>(*Output)->AddRef(); + return NOERROR; + } + if (IsEqualGUID(refiid, IID_IDistributorNotify)) + { + *Output = (IDistributorNotify*)(this); + reinterpret_cast<IDistributorNotify*>(*Output)->AddRef(); + return NOERROR; + } + + if (IsEqualGUID(refiid, IID_IBasicAudio)) + { + *Output = (IBasicAudio*)(this); + reinterpret_cast<IBasicAudio*>(*Output)->AddRef(); + return NOERROR; + } + + return E_NOINTERFACE; +} + +//------------------------------------------------------------------- +// IDistributorNotify interface +// + + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::Stop() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::Pause() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::Run( + REFERENCE_TIME tStart) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::SetSyncSource( + IReferenceClock *pClock) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::NotifyGraphChange() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +//------------------------------------------------------------------- +// IDispatch interface +// + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::GetTypeInfoCount( + UINT *pctinfo) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::GetTypeInfo( + UINT iTInfo, + LCID lcid, + ITypeInfo **ppTInfo) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::GetIDsOfNames( + REFIID riid, + LPOLESTR *rgszNames, + UINT cNames, + LCID lcid, + DISPID *rgDispId) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::Invoke( + DISPID dispIdMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS *pDispParams, + VARIANT *pVarResult, + EXCEPINFO *pExcepInfo, + UINT *puArgErr) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +//------------------------------------------------------------------- +// IBasicAudio interface +// + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::put_Volume( + long lVolume) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::get_Volume( + long *plVolume) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::put_Balance( + long lBalance) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + + +HRESULT +STDMETHODCALLTYPE +CKsBasicAudio::get_Balance( + long *plBalance) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +WINAPI +CKsBasicAudio_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv) +{ + CKsBasicAudio * handler = new CKsBasicAudio(); + + if (!handler) + return E_OUTOFMEMORY; + + if (FAILED(handler->QueryInterface(riid, ppv))) + { + /* not supported */ + delete handler; + return E_NOINTERFACE; + } + + return NOERROR; +} Propchange: trunk/reactos/dll/directx/ksproxy/basicaudio.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/directx/ksproxy/classfactory.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/classf…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/classfactory.cpp (added) +++ trunk/reactos/dll/directx/ksproxy/classfactory.cpp [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,0 +1,103 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy + * FILE: dll/directx/ksproxy/classfactory.cpp + * PURPOSE: ClassFactory interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +class CClassFactory : public IClassFactory +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + + if (!m_Ref) + { + delete this; + return 0; + } + return m_Ref; + } + + HRESULT WINAPI CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject); + HRESULT WINAPI LockServer(BOOL fLock); + + CClassFactory(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, IID *riidInst) : m_Ref(1), m_lpfnCI(lpfnCI), m_IID(riidInst) + {}; + + virtual ~CClassFactory(){}; + +protected: + LONG m_Ref; + LPFNCREATEINSTANCE m_lpfnCI; + IID * m_IID; +}; + +HRESULT +WINAPI +CClassFactory::QueryInterface( + REFIID riid, + LPVOID *ppvObj) +{ + *ppvObj = NULL; + if(IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IClassFactory)) + { + *ppvObj = PVOID(this); + InterlockedIncrement(&m_Ref); + return S_OK; + } + return E_NOINTERFACE; +} + +HRESULT +WINAPI +CClassFactory::CreateInstance( + LPUNKNOWN pUnkOuter, + REFIID riid, + LPVOID *ppvObject) +{ + *ppvObject = NULL; + + if ( m_IID == NULL || IsEqualCLSID(riid, *m_IID) || IsEqualCLSID(riid, IID_IUnknown)) + { + return m_lpfnCI(pUnkOuter, riid, ppvObject); + } + + return E_NOINTERFACE; +} + +HRESULT +WINAPI +CClassFactory::LockServer( + BOOL fLock) +{ + return E_NOTIMPL; +} + +IClassFactory * +CClassFactory_fnConstructor( + LPFNCREATEINSTANCE lpfnCI, + PLONG pcRefDll, + IID * riidInst) +{ + CClassFactory* factory = new CClassFactory(lpfnCI, pcRefDll, riidInst); + + if (!factory) + return NULL; + + if (pcRefDll) + InterlockedIncrement(pcRefDll); + + return (LPCLASSFACTORY)factory; +} Propchange: trunk/reactos/dll/directx/ksproxy/classfactory.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/directx/ksproxy/clockforward.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/clockf…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/clockforward.cpp (added) +++ trunk/reactos/dll/directx/ksproxy/clockforward.cpp [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,0 +1,187 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy + * FILE: dll/directx/ksproxy/clockforward.cpp + * PURPOSE: IKsClockForwarder interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +const GUID IID_IDistributorNotify = {0x56a868af, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}}; +const GUID KSCATEGORY_CLOCK = {0x53172480, 0x4791, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}; + +class CKsClockForwarder : public IDistributorNotify, + public IKsObject +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + + if (!m_Ref) + { + delete this; + return 0; + } + return m_Ref; + } + + // IDistributorNotify interface + HRESULT STDMETHODCALLTYPE Stop(); + HRESULT STDMETHODCALLTYPE Pause(); + HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart); + HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock); + HRESULT STDMETHODCALLTYPE NotifyGraphChange(); + + // IKsObject interface + HANDLE STDMETHODCALLTYPE KsGetObjectHandle(); + + CKsClockForwarder(HANDLE handle) : m_Ref(0), m_Handle(handle){} + virtual ~CKsClockForwarder(){ if (m_Handle) CloseHandle(m_Handle);} + +protected: + LONG m_Ref; + HANDLE m_Handle; +}; + +HRESULT +STDMETHODCALLTYPE +CKsClockForwarder::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + if (IsEqualGUID(refiid, IID_IUnknown)) + { + *Output = PVOID(this); + reinterpret_cast<IUnknown*>(*Output)->AddRef(); + return NOERROR; + } + if (IsEqualGUID(refiid, IID_IKsObject)) + { + *Output = (IKsObject*)(this); + reinterpret_cast<IKsObject*>(*Output)->AddRef(); + return NOERROR; + } + + if (IsEqualGUID(refiid, IID_IDistributorNotify)) + { + *Output = (IDistributorNotify*)(this); + reinterpret_cast<IDistributorNotify*>(*Output)->AddRef(); + return NOERROR; + } + +#if 0 + if (IsEqualGUID(refiid, IID_IKsClockForwarder)) + { + *Output = PVOID(this); + reinterpret_cast<IKsObject*>(*Output)->AddRef(); + return NOERROR; + } +#endif + + return E_NOINTERFACE; +} + +//------------------------------------------------------------------- +// IDistributorNotify interface +// + + +HRESULT +STDMETHODCALLTYPE +CKsClockForwarder::Stop() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsClockForwarder::Pause() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsClockForwarder::Run( + REFERENCE_TIME tStart) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsClockForwarder::SetSyncSource( + IReferenceClock *pClock) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsClockForwarder::NotifyGraphChange() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +//------------------------------------------------------------------- +// IKsObject interface +// + +HANDLE +STDMETHODCALLTYPE +CKsClockForwarder::KsGetObjectHandle() +{ + return m_Handle; +} + +HRESULT +WINAPI +CKsClockForwarder_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv) +{ + HRESULT hr; + HANDLE handle; + + // open default clock + hr = KsOpenDefaultDevice(KSCATEGORY_CLOCK, GENERIC_READ | GENERIC_WRITE, &handle); + + if (hr != NOERROR) + { + OutputDebugString("CKsClockForwarder_Constructor failed to open device\n"); + return hr; + } + + CKsClockForwarder * clock = new CKsClockForwarder(handle); + + if (!clock) + { + // free clock handle + CloseHandle(handle); + return E_OUTOFMEMORY; + } + + if (FAILED(clock->QueryInterface(riid, ppv))) + { + /* not supported */ + delete clock; + return E_NOINTERFACE; + } + + return NOERROR; +} Propchange: trunk/reactos/dll/directx/ksproxy/clockforward.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/directx/ksproxy/cvpconfig.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/cvpcon…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/cvpconfig.cpp (added) +++ trunk/reactos/dll/directx/ksproxy/cvpconfig.cpp [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,0 +1,319 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy + * FILE: dll/directx/ksproxy/cvpconfig.cpp + * PURPOSE: IVPConfig interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +const GUID IID_IVPConfig = {0xbc29a660, 0x30e3, 0x11d0, {0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b}}; + +class CVPConfig : public IVPConfig, + public IDistributorNotify +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + + if (!m_Ref) + { + delete this; + return 0; + } + return m_Ref; + } + + // IDistributorNotify interface + HRESULT STDMETHODCALLTYPE Stop(); + HRESULT STDMETHODCALLTYPE Pause(); + HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart); + HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock); + HRESULT STDMETHODCALLTYPE NotifyGraphChange(); + + // IVPBaseConfig + HRESULT STDMETHODCALLTYPE GetConnectInfo(LPDWORD pdwNumConnectInfo, IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo); + HRESULT STDMETHODCALLTYPE SetConnectInfo(DWORD dwChosenEntry); + HRESULT STDMETHODCALLTYPE GetVPDataInfo(LPAMVPDATAINFO pamvpDataInfo); + HRESULT STDMETHODCALLTYPE GetMaxPixelRate(LPAMVPSIZE pamvpSize, OUT LPDWORD pdwMaxPixelsPerSecond); + HRESULT STDMETHODCALLTYPE InformVPInputFormats(DWORD dwNumFormats, IN LPDDPIXELFORMAT pDDPixelFormats); + HRESULT STDMETHODCALLTYPE GetVideoFormats(LPDWORD pdwNumFormats, IN OUT LPDDPIXELFORMAT pddPixelFormats); + HRESULT STDMETHODCALLTYPE SetVideoFormat(DWORD dwChosenEntry); + HRESULT STDMETHODCALLTYPE SetInvertPolarity(); + HRESULT STDMETHODCALLTYPE GetOverlaySurface(LPDIRECTDRAWSURFACE* ppddOverlaySurface); + HRESULT STDMETHODCALLTYPE SetDirectDrawKernelHandle(ULONG_PTR dwDDKernelHandle); + HRESULT STDMETHODCALLTYPE SetVideoPortID(IN DWORD dwVideoPortID); + HRESULT STDMETHODCALLTYPE SetDDSurfaceKernelHandles(DWORD cHandles, IN ULONG_PTR *rgDDKernelHandles); + HRESULT STDMETHODCALLTYPE SetSurfaceParameters(DWORD dwPitch, IN DWORD dwXOrigin, IN DWORD dwYOrigin); + // IVPConfig + HRESULT STDMETHODCALLTYPE IsVPDecimationAllowed(LPBOOL pbIsDecimationAllowed); + HRESULT STDMETHODCALLTYPE SetScalingFactors(LPAMVPSIZE pamvpSize); + + CVPConfig() : m_Ref(0){} + virtual ~CVPConfig(){} + +protected: + LONG m_Ref; +}; + + +HRESULT +STDMETHODCALLTYPE +CVPConfig::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + if (IsEqualGUID(refiid, IID_IUnknown)) + { + *Output = PVOID(this); + reinterpret_cast<IUnknown*>(*Output)->AddRef(); + return NOERROR; + } + if (IsEqualGUID(refiid, IID_IDistributorNotify)) + { + *Output = (IDistributorNotify*)(this); + reinterpret_cast<IDistributorNotify*>(*Output)->AddRef(); + return NOERROR; + } + + if (IsEqualGUID(refiid, IID_IVPConfig)) + { + *Output = (IVPConfig*)(this); + reinterpret_cast<IVPConfig*>(*Output)->AddRef(); + return NOERROR; + } + + return E_NOINTERFACE; +} + +//------------------------------------------------------------------- +// IDistributorNotify interface +// + + +HRESULT +STDMETHODCALLTYPE +CVPConfig::Stop() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::Pause() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::Run( + REFERENCE_TIME tStart) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::SetSyncSource( + IReferenceClock *pClock) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::NotifyGraphChange() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +//------------------------------------------------------------------- +// IVPBaseConfig +// +HRESULT +STDMETHODCALLTYPE +CVPConfig::GetConnectInfo( + LPDWORD pdwNumConnectInfo, + IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::SetConnectInfo( + DWORD dwChosenEntry) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::GetVPDataInfo( + LPAMVPDATAINFO pamvpDataInfo) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::GetMaxPixelRate( + LPAMVPSIZE pamvpSize, + OUT LPDWORD pdwMaxPixelsPerSecond) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::InformVPInputFormats( + DWORD dwNumFormats, + IN LPDDPIXELFORMAT pDDPixelFormats) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::GetVideoFormats( + LPDWORD pdwNumFormats, + IN OUT LPDDPIXELFORMAT pddPixelFormats) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::SetVideoFormat( + DWORD dwChosenEntry) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::SetInvertPolarity() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::GetOverlaySurface( + LPDIRECTDRAWSURFACE* ppddOverlaySurface) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::SetDirectDrawKernelHandle( + ULONG_PTR dwDDKernelHandle) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::SetVideoPortID( + IN DWORD dwVideoPortID) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + + +HRESULT +STDMETHODCALLTYPE +CVPConfig::SetDDSurfaceKernelHandles( + DWORD cHandles, + IN ULONG_PTR *rgDDKernelHandles) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + + +HRESULT +STDMETHODCALLTYPE +CVPConfig::SetSurfaceParameters( + DWORD dwPitch, + IN DWORD dwXOrigin, + IN DWORD dwYOrigin) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +//------------------------------------------------------------------- +// IVPConfig +// + +HRESULT +STDMETHODCALLTYPE +CVPConfig::IsVPDecimationAllowed( + LPBOOL pbIsDecimationAllowed) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPConfig::SetScalingFactors( + LPAMVPSIZE pamvpSize) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + + + + +HRESULT +WINAPI +CVPConfig_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv) +{ + CVPConfig * handler = new CVPConfig(); + + if (!handler) + return E_OUTOFMEMORY; + + if (FAILED(handler->QueryInterface(riid, ppv))) + { + /* not supported */ + delete handler; + return E_NOINTERFACE; + } + + return NOERROR; +} + Propchange: trunk/reactos/dll/directx/ksproxy/cvpconfig.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/directx/ksproxy/cvpvbiconfig.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/cvpvbi…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/cvpvbiconfig.cpp (added) +++ trunk/reactos/dll/directx/ksproxy/cvpvbiconfig.cpp [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,0 +1,290 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy + * FILE: dll/directx/ksproxy/cvpvbiconfig.cpp + * PURPOSE: CVPVBIConfig interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +const GUID IID_IVPVBIConfig = {0xec529b00, 0x1a1f, 0x11d1, {0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a}}; + +class CVPVBIConfig : public IVPVBIConfig, + public IDistributorNotify +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + + if (!m_Ref) + { + delete this; + return 0; + } + return m_Ref; + } + + // IDistributorNotify interface + HRESULT STDMETHODCALLTYPE Stop(); + HRESULT STDMETHODCALLTYPE Pause(); + HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart); + HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock); + HRESULT STDMETHODCALLTYPE NotifyGraphChange(); + + // IVPBaseConfig + HRESULT STDMETHODCALLTYPE GetConnectInfo(LPDWORD pdwNumConnectInfo, IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo); + HRESULT STDMETHODCALLTYPE SetConnectInfo(DWORD dwChosenEntry); + HRESULT STDMETHODCALLTYPE GetVPDataInfo(LPAMVPDATAINFO pamvpDataInfo); + HRESULT STDMETHODCALLTYPE GetMaxPixelRate(LPAMVPSIZE pamvpSize, OUT LPDWORD pdwMaxPixelsPerSecond); + HRESULT STDMETHODCALLTYPE InformVPInputFormats(DWORD dwNumFormats, IN LPDDPIXELFORMAT pDDPixelFormats); + HRESULT STDMETHODCALLTYPE GetVideoFormats(LPDWORD pdwNumFormats, IN OUT LPDDPIXELFORMAT pddPixelFormats); + HRESULT STDMETHODCALLTYPE SetVideoFormat(DWORD dwChosenEntry); + HRESULT STDMETHODCALLTYPE SetInvertPolarity(); + HRESULT STDMETHODCALLTYPE GetOverlaySurface(LPDIRECTDRAWSURFACE* ppddOverlaySurface); + HRESULT STDMETHODCALLTYPE SetDirectDrawKernelHandle(ULONG_PTR dwDDKernelHandle); + HRESULT STDMETHODCALLTYPE SetVideoPortID(IN DWORD dwVideoPortID); + HRESULT STDMETHODCALLTYPE SetDDSurfaceKernelHandles(DWORD cHandles, IN ULONG_PTR *rgDDKernelHandles); + HRESULT STDMETHODCALLTYPE SetSurfaceParameters(DWORD dwPitch, IN DWORD dwXOrigin, IN DWORD dwYOrigin); + + CVPVBIConfig() : m_Ref(0){} + virtual ~CVPVBIConfig(){} + +protected: + LONG m_Ref; +}; + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + if (IsEqualGUID(refiid, IID_IUnknown)) + { + *Output = PVOID(this); + reinterpret_cast<IUnknown*>(*Output)->AddRef(); + return NOERROR; + } + if (IsEqualGUID(refiid, IID_IDistributorNotify)) + { + *Output = (IDistributorNotify*)(this); + reinterpret_cast<IDistributorNotify*>(*Output)->AddRef(); + return NOERROR; + } + + if (IsEqualGUID(refiid, IID_IVPVBIConfig)) + { + *Output = (IVPConfig*)(this); + reinterpret_cast<IVPConfig*>(*Output)->AddRef(); + return NOERROR; + } + + return E_NOINTERFACE; +} + +//------------------------------------------------------------------- +// IDistributorNotify interface +// + + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::Stop() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::Pause() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::Run( + REFERENCE_TIME tStart) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::SetSyncSource( + IReferenceClock *pClock) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::NotifyGraphChange() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +//------------------------------------------------------------------- +// IVPBaseConfig +// +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::GetConnectInfo( + LPDWORD pdwNumConnectInfo, + IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::SetConnectInfo( + DWORD dwChosenEntry) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::GetVPDataInfo( + LPAMVPDATAINFO pamvpDataInfo) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::GetMaxPixelRate( + LPAMVPSIZE pamvpSize, + OUT LPDWORD pdwMaxPixelsPerSecond) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::InformVPInputFormats( + DWORD dwNumFormats, + IN LPDDPIXELFORMAT pDDPixelFormats) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::GetVideoFormats( + LPDWORD pdwNumFormats, + IN OUT LPDDPIXELFORMAT pddPixelFormats) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::SetVideoFormat( + DWORD dwChosenEntry) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::SetInvertPolarity() +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::GetOverlaySurface( + LPDIRECTDRAWSURFACE* ppddOverlaySurface) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::SetDirectDrawKernelHandle( + ULONG_PTR dwDDKernelHandle) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::SetVideoPortID( + IN DWORD dwVideoPortID) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::SetDDSurfaceKernelHandles( + DWORD cHandles, + IN ULONG_PTR *rgDDKernelHandles) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + + +HRESULT +STDMETHODCALLTYPE +CVPVBIConfig::SetSurfaceParameters( + DWORD dwPitch, + IN DWORD dwXOrigin, + IN DWORD dwYOrigin) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + + +HRESULT +WINAPI +CVPVBIConfig_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv) +{ + CVPVBIConfig * handler = new CVPVBIConfig(); + + if (!handler) + return E_OUTOFMEMORY; + + if (FAILED(handler->QueryInterface(riid, ppv))) + { + /* not supported */ + delete handler; + return E_NOINTERFACE; + } + + return NOERROR; +} Propchange: trunk/reactos/dll/directx/ksproxy/cvpvbiconfig.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/directx/ksproxy/datatype.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/dataty…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/datatype.cpp (added) +++ trunk/reactos/dll/directx/ksproxy/datatype.cpp [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,0 +1,154 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy + * FILE: dll/directx/ksproxy/ksproxy.c + * PURPOSE: IKsDataTypeHandler interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +/* FIXME guid mess */ +const GUID IID_IUnknown = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x46}}; +const GUID IID_IClassFactory = {0x00000001, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}}; +const GUID IID_IKsDataTypeHandler = {0x5FFBAA02, 0x49A3, 0x11D0, {0x9F, 0x36, 0x00, 0xAA, 0x00, 0xA2, 0x16, 0xA1}}; +const GUID MEDIATYPE_Audio = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; + + +class CKsDataTypeHandler : public IKsDataTypeHandler +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + + if (!m_Ref) + { + delete this; + return 0; + } + return m_Ref; + } + + HRESULT STDMETHODCALLTYPE KsCompleteIoOperation(IN OUT IMediaSample *Sample, IN OUT PVOID StreamHeader, IN KSIOOPERATION IoOperation, IN BOOL Cancelled); + HRESULT STDMETHODCALLTYPE KsIsMediaTypeInRanges(IN PVOID DataRanges); + HRESULT STDMETHODCALLTYPE KsPrepareIoOperation(IN OUT IMediaSample *Sample, IN OUT PVOID StreamHeader, IN KSIOOPERATION IoOperation); + HRESULT STDMETHODCALLTYPE KsQueryExtendedSize(OUT ULONG* ExtendedSize); + HRESULT STDMETHODCALLTYPE KsSetMediaType(IN const AM_MEDIA_TYPE* AmMediaType); + + CKsDataTypeHandler() : m_Ref(0){}; + virtual ~CKsDataTypeHandler(){}; + +protected: + //CMediaType * m_Type; + LONG m_Ref; +}; + + +HRESULT +STDMETHODCALLTYPE +CKsDataTypeHandler::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + if (IsEqualGUID(refiid, IID_IUnknown) || + IsEqualGUID(refiid, IID_IKsDataTypeHandler)) + { + *Output = PVOID(this); + reinterpret_cast<IUnknown*>(*Output)->AddRef(); + return NOERROR; + } + return E_NOINTERFACE; +} + + +HRESULT +STDMETHODCALLTYPE +CKsDataTypeHandler::KsCompleteIoOperation( + IN OUT IMediaSample *Sample, + IN OUT PVOID StreamHeader, + IN KSIOOPERATION IoOperation, + IN BOOL Cancelled) +{ + return NOERROR; +} + + +HRESULT +STDMETHODCALLTYPE +CKsDataTypeHandler::KsIsMediaTypeInRanges( + IN PVOID DataRanges) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsDataTypeHandler::KsPrepareIoOperation( + IN OUT IMediaSample *Sample, + IN OUT PVOID StreamHeader, + IN KSIOOPERATION IoOperation) +{ + return NOERROR; +} + +HRESULT +STDMETHODCALLTYPE +CKsDataTypeHandler::KsQueryExtendedSize( + OUT ULONG* ExtendedSize) +{ + /* no header extension required */ + *ExtendedSize = 0; + + return NOERROR; +} + +HRESULT +STDMETHODCALLTYPE +CKsDataTypeHandler::KsSetMediaType( + IN const AM_MEDIA_TYPE* AmMediaType) +{ +#if 0 + if (m_Type) + { + /* media type can only be set once */ + return E_FAIL; + } +#endif + + /* + * TODO: allocate CMediaType and copy parameters + */ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +WINAPI +CKsDataTypeHandler_Constructor ( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv) +{ + CKsDataTypeHandler * handler = new CKsDataTypeHandler(); + + if (!handler) + return E_OUTOFMEMORY; + + if (FAILED(handler->QueryInterface(riid, ppv))) + { + /* not supported */ + delete handler; + return E_NOINTERFACE; + } + + return NOERROR; +} Propchange: trunk/reactos/dll/directx/ksproxy/datatype.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/directx/ksproxy/interface.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/interf…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/interface.cpp (added) +++ trunk/reactos/dll/directx/ksproxy/interface.cpp [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,0 +1,135 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy + * FILE: dll/directx/ksproxy/interface.cpp + * PURPOSE: IKsInterfaceHandler interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +const GUID IID_IKsInterfaceHandler = {0xD3ABC7E0, 0x9A61, 0x11D0, {0xA4, 0x0D, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}; +const GUID IID_IKsObject = {0x423c13a2, 0x2070, 0x11d0, {0x9e, 0xf7, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1}}; + +class CKsInterfaceHandler : public IKsInterfaceHandler +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + + if (!m_Ref) + { + delete this; + return 0; + } + return m_Ref; + } + HRESULT STDMETHODCALLTYPE KsSetPin(IKsPin *KsPin); + HRESULT STDMETHODCALLTYPE KsProcessMediaSamples(IKsDataTypeHandler *KsDataTypeHandler, IMediaSample** SampleList, PLONG SampleCount, KSIOOPERATION IoOperation, PKSSTREAM_SEGMENT *StreamSegment); + HRESULT STDMETHODCALLTYPE KsCompleteIo(PKSSTREAM_SEGMENT StreamSegment); + + CKsInterfaceHandler() : m_Ref(0), m_Handle(NULL){}; + virtual ~CKsInterfaceHandler(){}; + +protected: + LONG m_Ref; + HANDLE m_Handle; +}; + +HRESULT +STDMETHODCALLTYPE +CKsInterfaceHandler::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + if (IsEqualGUID(refiid, IID_IUnknown) || + IsEqualGUID(refiid, IID_IKsInterfaceHandler)) + { + *Output = PVOID(this); + reinterpret_cast<IUnknown*>(*Output)->AddRef(); + return NOERROR; + } + return E_NOINTERFACE; +} + +HRESULT +STDMETHODCALLTYPE +CKsInterfaceHandler::KsSetPin( + IKsPin *KsPin) +{ + HRESULT hr; + IKsObject * KsObject; + + // check if IKsObject is supported + hr = KsPin->QueryInterface(IID_IKsObject, (void**)&KsObject); + + if (SUCCEEDED(hr)) + { + // get pin handle + m_Handle = KsObject->KsGetObjectHandle(); + + // release IKsObject interface + KsObject->Release(); + + if (!m_Handle) + { + // expected a file handle + return E_UNEXPECTED; + } + } + + // done + return hr; +} + +HRESULT +STDMETHODCALLTYPE +CKsInterfaceHandler::KsProcessMediaSamples( + IKsDataTypeHandler *KsDataTypeHandler, + IMediaSample** SampleList, + PLONG SampleCount, + KSIOOPERATION IoOperation, + PKSSTREAM_SEGMENT *StreamSegment) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CKsInterfaceHandler::KsCompleteIo( + PKSSTREAM_SEGMENT StreamSegment) +{ + OutputDebugString("UNIMPLEMENTED\n"); + return E_NOTIMPL; +} + +HRESULT +WINAPI +CKsInterfaceHandler_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv) +{ + CKsInterfaceHandler * handler = new CKsInterfaceHandler(); + + if (!handler) + return E_OUTOFMEMORY; + + if (FAILED(handler->QueryInterface(riid, ppv))) + { + /* not supported */ + delete handler; + return E_NOINTERFACE; + } + + return NOERROR; +} Propchange: trunk/reactos/dll/directx/ksproxy/interface.cpp ------------------------------------------------------------------------------ svn:eol-style = native Removed: trunk/reactos/dll/directx/ksproxy/ksproxy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/ksprox…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/ksproxy.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/ksproxy.c (removed) @@ -1,113 +1,0 @@ -/* - * KSPROXY.AX - ReactOS WDM Streaming ActiveMovie Proxy - * - * Copyright 2008 Dmitry Chapyshev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include <windows.h> -#include <stdio.h> -#include <wchar.h> -#include <tchar.h> -#include <ks.h> -#include <dshow.h> - -HRESULT WINAPI -KsSynchronousDeviceControl( - HANDLE Handle, - ULONG IoControl, - PVOID InBuffer, - ULONG InLength, - PVOID OutBuffer, - ULONG OutLength, - PULONG BytesReturned) -{ - return NOERROR; -} - -HRESULT WINAPI -KsResolveRequiredAttributes( - PKSDATARANGE DataRange, - KSMULTIPLE_ITEM *Attributes OPTIONAL) -{ - return NOERROR; -} - -HRESULT WINAPI -KsOpenDefaultDevice( - REFGUID Category, - ACCESS_MASK Access, - PHANDLE DeviceHandle) -{ - return NOERROR; -} - -HRESULT WINAPI -KsGetMultiplePinFactoryItems( - HANDLE FilterHandle, - ULONG PinFactoryId, - ULONG PropertyId, - PVOID *Items) -{ - return NOERROR; -} - -HRESULT WINAPI -KsGetMediaTypeCount( - HANDLE FilterHandle, - ULONG PinFactoryId, - ULONG *MediaTypeCount) -{ - return NOERROR; -} - -HRESULT WINAPI -KsGetMediaType( - int Position, - AM_MEDIA_TYPE *AmMediaType, - HANDLE FilterHandle, - ULONG PinFactoryId) -{ - return NOERROR; -} - -HRESULT WINAPI -DllUnregisterServer(void) -{ - return S_OK; -} - -HRESULT WINAPI -DllRegisterServer(void) -{ - return S_OK; -} - -HRESULT WINAPI -DllGetClassObject( - REFCLSID rclsid, - REFIID riid, - LPVOID *ppv) -{ - return S_OK; -} - -HRESULT WINAPI -DllCanUnloadNow(void) -{ - return S_OK; -} - Copied: trunk/reactos/dll/directx/ksproxy/ksproxy.cpp (from r45593, trunk/reactos/dll/directx/ksproxy/ksproxy.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/ksprox…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/ksproxy.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/ksproxy.cpp [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,31 +1,39 @@ /* - * KSPROXY.AX - ReactOS WDM Streaming ActiveMovie Proxy + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy + * FILE: dll/directx/ksproxy/ksproxy.c + * PURPOSE: ActiveMovie Proxy functions * - * Copyright 2008 Dmitry Chapyshev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * PROGRAMMERS: Dmitry Chapyshev + Johannes Anderwald (janderwald(a)reactos.org) */ -#include <windows.h> -#include <stdio.h> -#include <wchar.h> -#include <tchar.h> -#include <ks.h> -#include <dshow.h> - -HRESULT WINAPI +#include "precomp.h" + +const GUID KSPROPSETID_Pin = {0x8C134960, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}}; +const GUID KSINTERFACESETID_Standard = {STATIC_KSINTERFACESETID_Standard}; +const GUID CLSID_KsClockForwarder = {0x877e4351, 0x6fea, 0x11d0, {0xb8, 0x63, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1}}; +const GUID CLSID_KsQualityForwarder = {0xe05592e4, 0xc0b5, 0x11d0, {0xa4, 0x39, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96}}; +const GUID CLSID_KsIBasicAudioInterfaceHandler = {0xb9f8ac3e, 0x0f71, 0x11d2, {0xb7, 0x2c, 0x00, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d}}; +const GUID CLSID_Proxy = {0x17CCA71B, 0xECD7, 0x11D0, {0xB9, 0x08, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}; + + +static INTERFACE_TABLE InterfaceTable[] = +{ + {&MEDIATYPE_Audio, CKsDataTypeHandler_Constructor}, + {&KSINTERFACESETID_Standard, CKsInterfaceHandler_Constructor}, + {&CLSID_KsClockForwarder, CKsClockForwarder_Constructor}, + {&CLSID_KsQualityForwarder, CKsQualityForwarder_Constructor}, + {&IID_IVPConfig, CVPConfig_Constructor}, + {&IID_IVPVBIConfig, CVPVBIConfig_Constructor}, + {&CLSID_KsIBasicAudioInterfaceHandler, CKsBasicAudio_Constructor}, + {&CLSID_Proxy, CKsProxy_Constructor}, + {NULL, NULL} +}; + +KSDDKAPI +HRESULT +WINAPI KsSynchronousDeviceControl( HANDLE Handle, ULONG IoControl, @@ -35,79 +43,285 @@ ULONG OutLength, PULONG BytesReturned) { + OVERLAPPED Overlapped; + DWORD Transferred; + + /* zero overlapped */ + RtlZeroMemory(&Overlapped, sizeof(OVERLAPPED)); + + /* create notification event */ + Overlapped.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); + + if (!Overlapped.hEvent) + { + /* failed */ + return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError()); + } + + if (!DeviceIoControl(Handle, IoControl, InBuffer, InLength, OutBuffer, OutLength, BytesReturned, &Overlapped)) + { + /* operation failed */ + if (GetLastError() != ERROR_IO_PENDING) + { + /* failed */ + CloseHandle(Overlapped.hEvent); + return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError()); + } + } + + /* get result of pending operation */ + if (!GetOverlappedResult(Handle, &Overlapped, &Transferred, TRUE)) + { + /* failed */ + CloseHandle(Overlapped.hEvent); + return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError()); + } + + /* store number of bytes transferred */ + *BytesReturned = Transferred; + + /* close event object */ + CloseHandle(Overlapped.hEvent); + + /* done */ return NOERROR; } -HRESULT WINAPI +KSDDKAPI +HRESULT +WINAPI KsResolveRequiredAttributes( PKSDATARANGE DataRange, KSMULTIPLE_ITEM *Attributes OPTIONAL) { + //UNIMPLEMENTED return NOERROR; } -HRESULT WINAPI +KSDDKAPI +HRESULT +WINAPI KsOpenDefaultDevice( REFGUID Category, ACCESS_MASK Access, PHANDLE DeviceHandle) { - return NOERROR; -} - -HRESULT WINAPI + HDEVINFO hList; + SP_DEVINFO_DATA DeviceInfoData; + SP_DEVICE_INTERFACE_DATA DeviceInterfaceData; + PSP_DEVICE_INTERFACE_DETAIL_DATA_W DeviceInterfaceDetailData; + WCHAR Path[MAX_PATH+sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W)]; + + /* open device list */ + hList = SetupDiGetClassDevsW(&Category, NULL, NULL, DIGCF_DEVICEINTERFACE /* | DIGCF_PRESENT*/); + + if (hList == INVALID_HANDLE_VALUE) + { + /* failed */ + return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError()); + } + + /* setup parameters */ + DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); + DeviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA); + + if (SetupDiEnumDeviceInterfaces(hList, &DeviceInfoData, &Category, 0, &DeviceInterfaceData)) + { + /* setup interface data struct */ + DeviceInterfaceDetailData = (PSP_DEVICE_INTERFACE_DETAIL_DATA_W)Path; + DeviceInterfaceDetailData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W); + + /* get device interface details */ + if (SetupDiGetDeviceInterfaceDetailW(hList, &DeviceInterfaceData, DeviceInterfaceDetailData, sizeof(Path), NULL, NULL)) + { + /* open device */ + *DeviceHandle = CreateFileW(DeviceInterfaceDetailData->DevicePath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED | FILE_ATTRIBUTE_NORMAL, NULL); + + if (*DeviceHandle != INVALID_HANDLE_VALUE) + { + /* operation succeeded */ + SetupDiDestroyDeviceInfoList(hList); + return NOERROR; + } + } + } + + /* free device list */ + SetupDiDestroyDeviceInfoList(hList); + + /* failed */ + return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError()); +} + +KSDDKAPI +HRESULT +WINAPI KsGetMultiplePinFactoryItems( HANDLE FilterHandle, ULONG PinFactoryId, ULONG PropertyId, PVOID *Items) { - return NOERROR; -} - -HRESULT WINAPI + KSP_PIN Property; + ULONG BytesReturned, NumData; + HRESULT hResult; + + /* zero pin property */ + RtlZeroMemory(&Property, sizeof(KSP_PIN)); + Property.Property.Set = KSPROPSETID_Pin; + Property.Property.Id = PropertyId; + Property.Property.Flags = KSPROPERTY_TYPE_GET; + Property.PinId = PinFactoryId; + + /* query pin factory */ + hResult = KsSynchronousDeviceControl(FilterHandle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSP_PIN), NULL, 0, &BytesReturned); + + if (hResult == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INSUFFICIENT_BUFFER)) + { + /* buffer too small */ + hResult = KsSynchronousDeviceControl(FilterHandle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSP_PIN), (PVOID)&NumData, sizeof(ULONG), &BytesReturned); + + if (SUCCEEDED(hResult)) + { + /* store required data size */ + BytesReturned = NumData; + hResult = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_MORE_DATA); + } + } + + if (hResult == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_MORE_DATA)) + { + /* allocate data */ + *Items = CoTaskMemAlloc(BytesReturned); + + if (!*Items) + { + /* no memory */ + return E_OUTOFMEMORY; + } + + /* retry querying property */ + hResult = KsSynchronousDeviceControl(FilterHandle, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSP_PIN), (PVOID)*Items, BytesReturned, &BytesReturned); + + /* check for success */ + if (FAILED(hResult)) + { + /* free memory */ + CoTaskMemFree(*Items); + } + } + + /* done */ + return hResult; +} + +KSDDKAPI +HRESULT +WINAPI KsGetMediaTypeCount( HANDLE FilterHandle, ULONG PinFactoryId, ULONG *MediaTypeCount) { - return NOERROR; -} - -HRESULT WINAPI + PKSMULTIPLE_ITEM MultipleItem; + HRESULT hr; + + /* try get contrained data ranges */ + hr = KsGetMultiplePinFactoryItems(FilterHandle, PinFactoryId, KSPROPERTY_PIN_CONSTRAINEDDATARANGES, (PVOID*)&MultipleItem); + + /* check for failure*/ + if (FAILED(hr)) + { + /* try getting default data ranges */ + hr = KsGetMultiplePinFactoryItems(FilterHandle, PinFactoryId, KSPROPERTY_PIN_DATARANGES, (PVOID*)&MultipleItem); + } + + if (SUCCEEDED(hr)) + { + /* store number of media types */ + *MediaTypeCount = MultipleItem->Count; + + /* free memory */ + CoTaskMemFree(MultipleItem); + } + + /* done */ + return hr; +} + +KSDDKAPI +HRESULT +WINAPI KsGetMediaType( int Position, AM_MEDIA_TYPE *AmMediaType, HANDLE FilterHandle, ULONG PinFactoryId) { + //UNIMPLEMENTED return NOERROR; } -HRESULT WINAPI +extern "C" +KSDDKAPI +HRESULT +WINAPI DllUnregisterServer(void) { return S_OK; } -HRESULT WINAPI +extern "C" +KSDDKAPI +HRESULT +WINAPI DllRegisterServer(void) { return S_OK; } -HRESULT WINAPI +KSDDKAPI +HRESULT +WINAPI DllGetClassObject( - REFCLSID rclsid, - REFIID riid, - LPVOID *ppv) + REFCLSID rclsid, + REFIID riid, + LPVOID *ppv) +{ + UINT i; + HRESULT hres = E_OUTOFMEMORY; + IClassFactory * pcf = NULL; + + if (!ppv) + return E_INVALIDARG; + + *ppv = NULL; + + for (i = 0; InterfaceTable[i].riid; i++) + { + if (IsEqualIID(InterfaceTable[i].riid, rclsid)) + { + pcf = CClassFactory_fnConstructor(InterfaceTable[i].lpfnCI, NULL, NULL); + break; + } + } + + if (!pcf) + { + return CLASS_E_CLASSNOTAVAILABLE; + } + + hres = pcf->QueryInterface(riid, ppv); + pcf->Release(); + + return hres; +} + +KSDDKAPI +HRESULT +WINAPI +DllCanUnloadNow(void) { return S_OK; } -HRESULT WINAPI -DllCanUnloadNow(void) -{ - return S_OK; -} - Modified: trunk/reactos/dll/directx/ksproxy/ksproxy.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/ksprox…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/ksproxy.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/ksproxy.rbuild [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -4,9 +4,32 @@ <module name="ksproxy" type="win32dll" entrypoint="0" baseaddress="${BASEADDRESS_KSPROXY}" installbase="system32" installname="ksproxy.ax"> <importlibrary definition="ksproxy.spec" /> <include base="ksproxy">.</include> + <library>ntdll</library> + <library>kernel32</library> <library>advapi32</library> - <library>ntdll</library> - <file>ksproxy.c</file> + <library>ole32</library> + <library>setupapi</library> + <library>msvcrt</library> + + <group compilerset="gcc"> + <compilerflag compiler="cxx">-fno-exceptions</compilerflag> + <compilerflag compiler="cxx">-fno-rtti</compilerflag> + </group> + + <group compilerset="msc"> + <compilerflag compiler="cxx">/GR-</compilerflag> + </group> + + <file>basicaudio.cpp</file> + <file>classfactory.cpp</file> + <file>clockforward.cpp</file> + <file>cvpconfig.cpp</file> + <file>cvpvbiconfig.cpp</file> + <file>datatype.cpp</file> + <file>interface.cpp</file> + <file>ksproxy.cpp</file> <file>ksproxy.rc</file> + <file>proxy.cpp</file> + <file>qualityforward.cpp</file> </module> </group> Added: trunk/reactos/dll/directx/ksproxy/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/precom…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/precomp.h (added) +++ trunk/reactos/dll/directx/ksproxy/precomp.h [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,0 +1,101 @@ +#ifndef PRECOMP_H_ +#define PRECOMP_H_ + +#define BUILDING_KS +#define _KSDDK_ +#include <dshow.h> +//#include <streams.h> +#include <ks.h> +#define __STREAMS__ +#include <ksproxy.h> +#include <stdio.h> +#include <wchar.h> +#include <tchar.h> +#include <uuids.h> +#include <dvp.h> +#include <vptype.h> +#include <vpconfig.h> + +#include <setupapi.h> +#include <debug.h> + +typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject); + +typedef struct { + const GUID* riid; + LPFNCREATEINSTANCE lpfnCI; +} INTERFACE_TABLE; + +/* classfactory.cpp */ + +IClassFactory * +CClassFactory_fnConstructor( + LPFNCREATEINSTANCE lpfnCI, + PLONG pcRefDll, + IID * riidInst); + +/* datatype.cpp */ +HRESULT +WINAPI +CKsDataTypeHandler_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv); + +/* interface.cpp */ +HRESULT +WINAPI +CKsInterfaceHandler_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv); + +/* clockforward.cpp */ +HRESULT +WINAPI +CKsClockForwarder_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv); + +/* qualityforward.cpp */ +HRESULT +WINAPI +CKsQualityForwarder_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv); + +/* cvpconfig.cpp */ +HRESULT +WINAPI +CVPConfig_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv); + +/* cvpvbiconfig.cpp */ +HRESULT +WINAPI +CVPVBIConfig_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv); + +/* basicaudio.cpp */ +HRESULT +WINAPI +CKsBasicAudio_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv); + +/* proxy.cpp */ +HRESULT +WINAPI +CKsProxy_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv); + +#endif Propchange: trunk/reactos/dll/directx/ksproxy/precomp.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/directx/ksproxy/proxy.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/proxy.…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/proxy.cpp (added) +++ trunk/reactos/dll/directx/ksproxy/proxy.cpp [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,0 +1,46 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy + * FILE: dll/directx/ksproxy/proxy.cpp + * PURPOSE: IKsProxy interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +/* + Needs IKsClock, IKsNotifyEvent +*/ + +class CKsProxy : public IBaseFilter, + public IAMovieSetup, + public IPersistStream, + public ISpecifyPropertyPages, + public IPersistPropertyBag, + public IReferenceClock, + public IMediaSeeking, + public IKsObject, + public IKsPropertySet, + public IKsClockPropertySet, + public IAMFilterMiscFlags, + public IKsControl, + public IKsTopology, + public IKsAggregateControl, + public IAMDeviceRemoval +{ + + +}; + + + +HRESULT +WINAPI +CKsProxy_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv) +{ + OutputDebugString("CKsProxy_Constructor UNIMPLEMENTED\n"); + return E_NOTIMPL; +} Propchange: trunk/reactos/dll/directx/ksproxy/proxy.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/directx/ksproxy/qualityforward.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/qualit…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/qualityforward.cpp (added) +++ trunk/reactos/dll/directx/ksproxy/qualityforward.cpp [iso-8859-1] Thu Feb 18 16:24:29 2010 @@ -1,0 +1,128 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy + * FILE: dll/directx/ksproxy/clockforward.cpp + * PURPOSE: IKsClockForwarder interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +const GUID KSCATEGORY_QUALITY = {0x97EBAACB, 0x95BD, 0x11D0, {0xA3, 0xEA, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}; + +class CKsQualityForwarder : public IKsQualityForwarder +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + + if (!m_Ref) + { + delete this; + return 0; + } + return m_Ref; + } + + // IKsObject interface + HANDLE STDMETHODCALLTYPE KsGetObjectHandle(); + + // IKsQualityForwarder + VOID STDMETHODCALLTYPE KsFlushClient(IN IKsPin *Pin); + + CKsQualityForwarder(HANDLE handle) : m_Ref(0), m_Handle(handle){} + virtual ~CKsQualityForwarder(){ if (m_Handle) CloseHandle(m_Handle);} + +protected: + LONG m_Ref; + HANDLE m_Handle; + + +}; + +HRESULT +STDMETHODCALLTYPE +CKsQualityForwarder::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + if (IsEqualGUID(refiid, IID_IUnknown) || + IsEqualGUID(refiid, IID_IKsQualityForwarder)) + { + *Output = PVOID(this); + reinterpret_cast<IUnknown*>(*Output)->AddRef(); + return NOERROR; + } + + return E_NOINTERFACE; +} + +//------------------------------------------------------------------- +// IKsObject interface +// + +HANDLE +STDMETHODCALLTYPE +CKsQualityForwarder::KsGetObjectHandle() +{ + return m_Handle; +} + +//------------------------------------------------------------------- +// IKsQualityForwarder interface +// +VOID +STDMETHODCALLTYPE +CKsQualityForwarder::KsFlushClient( + IN IKsPin *Pin) +{ + OutputDebugString("UNIMPLEMENTED\n"); +} + + + +HRESULT +WINAPI +CKsQualityForwarder_Constructor( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv) +{ + HRESULT hr; + HANDLE handle; + + // open default clock + hr = KsOpenDefaultDevice(KSCATEGORY_QUALITY, GENERIC_READ | GENERIC_WRITE, &handle); + + if (hr != NOERROR) + { + OutputDebugString("CKsClockForwarder_Constructor failed to open device\n"); + return hr; + } + + CKsQualityForwarder * quality = new CKsQualityForwarder(handle); + + if (!quality) + { + // free clock handle + CloseHandle(handle); + return E_OUTOFMEMORY; + } + + if (FAILED(quality->QueryInterface(riid, ppv))) + { + /* not supported */ + delete quality; + return E_NOINTERFACE; + } + + return NOERROR; +} Propchange: trunk/reactos/dll/directx/ksproxy/qualityforward.cpp ------------------------------------------------------------------------------ svn:eol-style = native
14 years, 8 months
1
0
0
0
[janderwald] 45607: [PSDK] - KSM_PIN is defined in bdasup.h not bdatypes.h - Add IReferenceClockTimerControl, IAMDeviceRemoval. IDistributorNotify, IAMClockAdjust, IAMStreamControl, IDeferredCommand interface - Add AM_STREAM_INFO_FLAGS, AM_STREAM_INFO struct - Modify VMRGUID struct so that gnu compilers can digest it too - Remove useless KSINTERFACESETID_Standard define from ks.h - Define LOCALE_INVARIANT macro
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Feb 18 16:04:54 2010 New Revision: 45607 URL:
http://svn.reactos.org/svn/reactos?rev=45607&view=rev
Log: [PSDK] - KSM_PIN is defined in bdasup.h not bdatypes.h - Add IReferenceClockTimerControl, IAMDeviceRemoval. IDistributorNotify, IAMClockAdjust, IAMStreamControl, IDeferredCommand interface - Add AM_STREAM_INFO_FLAGS, AM_STREAM_INFO struct - Modify VMRGUID struct so that gnu compilers can digest it too - Remove useless KSINTERFACESETID_Standard define from ks.h - Define LOCALE_INVARIANT macro Modified: trunk/reactos/include/ddk/bdasup.h trunk/reactos/include/dxsdk/axcore.idl trunk/reactos/include/dxsdk/axextend.idl trunk/reactos/include/dxsdk/bdatypes.h trunk/reactos/include/dxsdk/vmrender.idl trunk/reactos/include/psdk/control.idl trunk/reactos/include/psdk/ks.h trunk/reactos/include/psdk/winnt.h Modified: trunk/reactos/include/ddk/bdasup.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/bdasup.h?rev=4…
============================================================================== --- trunk/reactos/include/ddk/bdasup.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/bdasup.h [iso-8859-1] Thu Feb 18 16:04:54 2010 @@ -25,6 +25,18 @@ ULONG ulcPinPairs; const BDA_PIN_PAIRING *pPinPairs; } BDA_FILTER_TEMPLATE, *PBDA_FILTER_TEMPLATE; + + +typedef struct _KSM_PIN +{ + KSMETHOD Method; + union + { + ULONG PinId; + ULONG PinType; + }; + ULONG Reserved; +} KSM_PIN, * PKSM_PIN; /* Functions */ Modified: trunk/reactos/include/dxsdk/axcore.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/dxsdk/axcore.idl?r…
============================================================================== --- trunk/reactos/include/dxsdk/axcore.idl [iso-8859-1] (original) +++ trunk/reactos/include/dxsdk/axcore.idl [iso-8859-1] Thu Feb 18 16:04:54 2010 @@ -348,6 +348,22 @@ typedef IReferenceClock *PREFERENCECLOCK; + +[ +local, +object, +uuid(ebec459c-2eca-4d42-a8af-30df557614b8), +pointer_default(unique) +] +interface IReferenceClockTimerControl : IUnknown { + + HRESULT SetDefaultTimerResolution( + REFERENCE_TIME timerResolution); + HRESULT GetDefaultTimerResolution( + [out] REFERENCE_TIME* pTimerResolution); +} + + /* [ object, Modified: trunk/reactos/include/dxsdk/axextend.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/dxsdk/axextend.idl…
============================================================================== --- trunk/reactos/include/dxsdk/axextend.idl [iso-8859-1] (original) +++ trunk/reactos/include/dxsdk/axextend.idl [iso-8859-1] Thu Feb 18 16:04:54 2010 @@ -548,6 +548,21 @@ typedef IFileSinkFilter2 *PFILESINKFILTER2; +[ + object, + uuid(f90a6130-b658-11d2-ae49-0000f8754b99), + pointer_default(unique) +] +interface IAMDeviceRemoval : IUnknown +{ + HRESULT DeviceInfo( + [out] CLSID *pclsidInterfaceClass, + [out] LPWSTR *pwszSymbolicLink); + HRESULT Reassociate(); + HRESULT Disassociate(); +} + + typedef enum { AM_FILE_OVERWRITE = 0x00000001, @@ -774,6 +789,37 @@ [in] IGraphBuilder * pGraph ); } + +[ + object, + uuid(56a868af-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IDistributorNotify : IUnknown +{ + HRESULT Stop(void); + HRESULT Pause(void); + HRESULT Run(REFERENCE_TIME tStart); + HRESULT SetSyncSource([in] IReferenceClock * pClock); + HRESULT NotifyGraphChange(void); +} + +typedef enum +{ + AM_STREAM_INFO_START_DEFINED = 0x01, + AM_STREAM_INFO_STOP_DEFINED = 0x02, + AM_STREAM_INFO_DISCARDING = 0x04, + AM_STREAM_INFO_STOP_SEND_EXTRA = 0x10 +} AM_STREAM_INFO_FLAGS; + +typedef struct +{ + REFERENCE_TIME tStart; + REFERENCE_TIME tStop; + DWORD dwStartCookie; + DWORD dwStopCookie; + DWORD dwFlags; +}AM_STREAM_INFO; /***************************************************************************** @@ -990,6 +1036,19 @@ HRESULT Init( [in] BOOL bSupportRendering, [in] IPin *pPin); } +[ + local, + object, + uuid(4d5466b0-a49c-11d1-abe8-00a0c905f375), + pointer_default(unique) + +] +interface IAMClockAdjust : IUnknown +{ + HRESULT SetClockDelta([in] REFERENCE_TIME rtDelta); +}; + + enum _AM_FILTER_MISC_FLAGS { AM_FILTER_MISC_FLAGS_IS_RENDERER = 0x1, @@ -1006,3 +1065,19 @@ { ULONG GetMiscFlags(); }; + + +[ + object, + uuid(36b73881-c2c8-11cf-8b46-00805f6cef60), + pointer_default(unique) +] +interface IAMStreamControl : IUnknown +{ + HRESULT StartAt( [in] REFERENCE_TIME * ptStart, + [in] DWORD dwCookie ); + HRESULT StopAt( [in] REFERENCE_TIME * ptStop, + [in] BOOL bSendExtra, + [in] DWORD dwCookie ); + HRESULT GetInfo( [out] AM_STREAM_INFO *pInfo); +} Modified: trunk/reactos/include/dxsdk/bdatypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/dxsdk/bdatypes.h?r…
============================================================================== --- trunk/reactos/include/dxsdk/bdatypes.h [iso-8859-1] (original) +++ trunk/reactos/include/dxsdk/bdatypes.h [iso-8859-1] Thu Feb 18 16:04:54 2010 @@ -161,19 +161,6 @@ ULONG ulPID ; MEDIA_SAMPLE_CONTENT MediaSampleContent ; } PID_MAP ; - - -typedef struct _KSM_PIN -{ - KSMETHOD Method; - union - { - ULONG PinId; - ULONG PinType; - }; - ULONG Reserved; -} KSM_PIN, * PKSM_PIN; - typedef struct _BDA_PID_MAP { Modified: trunk/reactos/include/dxsdk/vmrender.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/dxsdk/vmrender.idl…
============================================================================== --- trunk/reactos/include/dxsdk/vmrender.idl [iso-8859-1] (original) +++ trunk/reactos/include/dxsdk/vmrender.idl [iso-8859-1] Thu Feb 18 16:04:54 2010 @@ -168,8 +168,7 @@ typedef struct tagVMRGUID { - GUID* pGUID; - GUID GUID; + struct _GUID *pGUID, GUID; } VMRGUID; typedef struct tagVMRMONITORINFO Modified: trunk/reactos/include/psdk/control.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/control.idl?r…
============================================================================== --- trunk/reactos/include/psdk/control.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/control.idl [iso-8859-1] Thu Feb 18 16:04:54 2010 @@ -244,3 +244,21 @@ HRESULT CanSeekForward( [out] LONG *pCanSeekForward ); HRESULT CanSeekBackward( [out] LONG *pCanSeekBackward ); } + +/***************************************************************************** + * IDeferredCommand interface + */ +[ + object, + uuid(56a868b8-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IDeferredCommand : IUnknown +{ + HRESULT Cancel( void); + HRESULT Confidence([out] LONG *pConfidence); + HRESULT Postpone([in] REFTIME newtime); + HRESULT GetHResult([out] HRESULT *phrResult); + +} + Modified: trunk/reactos/include/psdk/ks.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ks.h?rev=4560…
============================================================================== --- trunk/reactos/include/psdk/ks.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ks.h [iso-8859-1] Thu Feb 18 16:04:54 2010 @@ -290,7 +290,6 @@ #if 0 #define KSINTERFACESETID_Media -#define KSINTERFACESETID_Standard #define KSINTERFACE_STANDARD_STREAMING #define KSINTERFACE_STANDARD_LOOPED_STREAMING #define KSINTERFACE_STANDARD_CONTROL Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=4…
============================================================================== --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Thu Feb 18 16:04:54 2010 @@ -1124,6 +1124,7 @@ #define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT) #define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT) #define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT) +#define LOCALE_INVARIANT MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT) #define ACL_REVISION 2 #define ACL_REVISION_DS 4 #define ACL_REVISION1 1
14 years, 8 months
1
0
0
0
[dgorbachev] 45606: [SYSSETUP] Wait until PlugPlay service is up. Bug #4142.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Thu Feb 18 03:28:51 2010 New Revision: 45606 URL:
http://svn.reactos.org/svn/reactos?rev=45606&view=rev
Log: [SYSSETUP] Wait until PlugPlay service is up. Bug #4142. Modified: branches/arwinss/reactos/dll/win32/syssetup/install.c Modified: branches/arwinss/reactos/dll/win32/syssetup/install.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/sysse…
============================================================================== --- branches/arwinss/reactos/dll/win32/syssetup/install.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/syssetup/install.c [iso-8859-1] Thu Feb 18 03:28:51 2010 @@ -20,7 +20,7 @@ * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: System setup - * FILE: lib/syssetup/install.c + * FILE: dll/win32/syssetup/install.c * PROGRAMER: Eric Kohl */ @@ -473,30 +473,103 @@ static BOOL EnableUserModePnpManager(VOID) { + SERVICE_STATUS_PROCESS ServiceStatus; SC_HANDLE hSCManager = NULL; SC_HANDLE hService = NULL; + DWORD dwStartTickCount; + DWORD dwOldCheckPoint; + DWORD BytesNeeded = 0; + DWORD dwWaitTime; + DWORD dwMaxWait; BOOL ret = FALSE; hSCManager = OpenSCManager(NULL, NULL, 0); if (hSCManager == NULL) goto cleanup; - hService = OpenServiceW(hSCManager, L"PlugPlay", SERVICE_CHANGE_CONFIG | SERVICE_START); + hService = OpenServiceW(hSCManager, + L"PlugPlay", + SERVICE_CHANGE_CONFIG | + SERVICE_START | + SERVICE_QUERY_STATUS); if (hService == NULL) goto cleanup; - ret = ChangeServiceConfigW( - hService, - SERVICE_NO_CHANGE, SERVICE_AUTO_START, SERVICE_NO_CHANGE, - NULL, NULL, NULL, NULL, NULL, NULL, NULL); + ret = ChangeServiceConfigW(hService, + SERVICE_NO_CHANGE, + SERVICE_AUTO_START, + SERVICE_NO_CHANGE, + NULL, NULL, NULL, + NULL, NULL, NULL, NULL); if (!ret) goto cleanup; ret = StartServiceW(hService, 0, NULL); + + if (!ret) + { + /* If the service is already running, just return TRUE */ + ret = GetLastError() == ERROR_SERVICE_ALREADY_RUNNING; + goto cleanup; + } + + ret = QueryServiceStatusEx(hService, + SC_STATUS_PROCESS_INFO, + (LPBYTE)&ServiceStatus, + sizeof(SERVICE_STATUS_PROCESS), + &BytesNeeded); if (!ret) goto cleanup; - ret = TRUE; + /* We don't want to wait for more than 30 seconds */ + dwMaxWait = 30000; + dwStartTickCount = GetTickCount(); + + /* Loop until it's running */ + while (ServiceStatus.dwCurrentState != SERVICE_RUNNING) + { + dwOldCheckPoint = ServiceStatus.dwCheckPoint; + dwWaitTime = ServiceStatus.dwWaitHint / 10; + + /* Get the latest status info */ + if (!QueryServiceStatusEx(hService, + SC_STATUS_PROCESS_INFO, + (LPBYTE)&ServiceStatus, + sizeof(SERVICE_STATUS_PROCESS), + &BytesNeeded)) + { + /* Something went wrong... */ + break; + } + + /* Is the service making progress? */ + if (ServiceStatus.dwCheckPoint > dwOldCheckPoint) + { + /* It is, get the latest tickcount to reset the max wait time */ + dwStartTickCount = GetTickCount(); + dwOldCheckPoint = ServiceStatus.dwCheckPoint; + } + else + { + /* It's not, make sure we haven't exceeded our wait time */ + if (GetTickCount() >= dwStartTickCount + dwMaxWait) + { + /* We have, give up */ + break; + } + } + + /* Adjust the wait hint times */ + if (dwWaitTime < 200) + dwWaitTime = 200; + else if (dwWaitTime > 10000) + dwWaitTime = 10000; + + /* Wait before trying again */ + Sleep(dwWaitTime); + } + + ret = ServiceStatus.dwCurrentState == SERVICE_RUNNING; cleanup: if (hSCManager != NULL)
14 years, 8 months
1
0
0
0
[dgorbachev] 45605: [UMPNPMGR] Update the service control manager's status information.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Thu Feb 18 03:28:48 2010 New Revision: 45605 URL:
http://svn.reactos.org/svn/reactos?rev=45605&view=rev
Log: [UMPNPMGR] Update the service control manager's status information. Modified: branches/arwinss/reactos/base/services/umpnpmgr/umpnpmgr.c Modified: branches/arwinss/reactos/base/services/umpnpmgr/umpnpmgr.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/base/services/u…
============================================================================== --- branches/arwinss/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] (original) +++ branches/arwinss/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] Thu Feb 18 03:28:48 2010 @@ -51,13 +51,12 @@ /* GLOBALS ******************************************************************/ -static VOID CALLBACK -ServiceMain(DWORD argc, LPTSTR *argv); - -static SERVICE_TABLE_ENTRY ServiceTable[2] = -{ - {TEXT("PlugPlay"), ServiceMain}, - {NULL, NULL} +static VOID CALLBACK ServiceMain(DWORD, LPWSTR *); +static WCHAR ServiceName[] = L"PlugPlay"; +static SERVICE_TABLE_ENTRYW ServiceTable[] = +{ + { ServiceName, ServiceMain }, + { NULL, NULL } }; static WCHAR szRootDeviceId[] = L"HTREE\\ROOT\\0"; @@ -2365,17 +2364,82 @@ return ERROR_SUCCESS; } - -static VOID CALLBACK -ServiceMain(DWORD argc, LPTSTR *argv) +static DWORD WINAPI +ServiceControlHandler(DWORD dwControl, + DWORD dwEventType, + LPVOID lpEventData, + LPVOID lpContext) +{ + /* FIXME */ + DPRINT1("ServiceControlHandler() called (control code %lu)\n", dwControl); + return ERROR_SUCCESS; +} + +static DWORD +ServiceInit(VOID) { HANDLE hThread; DWORD dwThreadId; - - UNREFERENCED_PARAMETER(argc); - UNREFERENCED_PARAMETER(argv); - - DPRINT("ServiceMain() called\n"); + DWORD dwError; + BOOLEAN OldValue; + + /* We need this privilege for using CreateProcessAsUserW */ + RtlAdjustPrivilege(SE_ASSIGNPRIMARYTOKEN_PRIVILEGE, TRUE, FALSE, &OldValue); + + hInstallEvent = CreateEvent(NULL, TRUE, SetupIsActive()/*FALSE*/, NULL); + if (hInstallEvent == NULL) + { + dwError = GetLastError(); + DPRINT1("Could not create the Install Event! (Error %lu)\n", dwError); + return dwError; + } + + hDeviceInstallListNotEmpty = CreateEvent(NULL, FALSE, FALSE, NULL); + if (hDeviceInstallListNotEmpty == NULL) + { + dwError = GetLastError(); + DPRINT1("Could not create the Event! (Error %lu)\n", dwError); + return dwError; + } + + hNoPendingInstalls = CreateEventW(NULL, + TRUE, + FALSE, + L"Global\\PnP_No_Pending_Install_Events"); + if (hNoPendingInstalls == NULL) + { + dwError = GetLastError(); + DPRINT1("Could not create the Event! (Error %lu)\n", dwError); + return dwError; + } + +#ifdef HAVE_SLIST_ENTRY_IMPLEMENTED + InitializeSListHead(&DeviceInstallListHead); +#else + InitializeListHead(&DeviceInstallListHead); +#endif + + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"System\\CurrentControlSet\\Enum", + 0, + KEY_ALL_ACCESS, + &hEnumKey); + if (dwError != ERROR_SUCCESS) + { + DPRINT1("Could not open the Enum Key! (Error %lu)\n", dwError); + return dwError; + } + + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"System\\CurrentControlSet\\Control\\Class", + 0, + KEY_ALL_ACCESS, + &hClassKey); + if (dwError != ERROR_SUCCESS) + { + DPRINT1("Could not open the Class Key! (Error %lu)\n", dwError); + return dwError; + } hThread = CreateThread(NULL, 0, @@ -2383,8 +2447,11 @@ NULL, 0, &dwThreadId); - if (hThread != NULL) - CloseHandle(hThread); + if (hThread == NULL) + { + return GetLastError(); + } + CloseHandle(hThread); hThread = CreateThread(NULL, 0, @@ -2392,8 +2459,11 @@ NULL, 0, &dwThreadId); - if (hThread != NULL) - CloseHandle(hThread); + if (hThread == NULL) + { + return GetLastError(); + } + CloseHandle(hThread); hThread = CreateThread(NULL, 0, @@ -2401,88 +2471,73 @@ NULL, 0, &dwThreadId); - if (hThread != NULL) - CloseHandle(hThread); + if (hThread == NULL) + { + return GetLastError(); + } + CloseHandle(hThread); + + return ERROR_SUCCESS; +} + +static VOID CALLBACK +ServiceMain(DWORD argc, LPWSTR *argv) +{ + SERVICE_STATUS ServiceStatus; + SERVICE_STATUS_HANDLE ServiceStatusHandle; + DWORD dwError; + + UNREFERENCED_PARAMETER(argc); + UNREFERENCED_PARAMETER(argv); + + DPRINT("ServiceMain() called\n"); + + ServiceStatusHandle = RegisterServiceCtrlHandlerExW(ServiceName, + ServiceControlHandler, + NULL); + if (!ServiceStatusHandle) + { + dwError = GetLastError(); + DPRINT1("RegisterServiceCtrlHandlerW() failed! (Error %lu)\n", dwError); + return; + } + + ServiceStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; + ServiceStatus.dwCurrentState = SERVICE_START_PENDING; + ServiceStatus.dwControlsAccepted = 0; + ServiceStatus.dwWin32ExitCode = NO_ERROR; + ServiceStatus.dwServiceSpecificExitCode = 0; + ServiceStatus.dwCheckPoint = 0; + ServiceStatus.dwWaitHint = 2000; + + SetServiceStatus(ServiceStatusHandle, &ServiceStatus); + + dwError = ServiceInit(); + + if (dwError != ERROR_SUCCESS) + { + DPRINT1("Service stopped\n"); + ServiceStatus.dwCurrentState = SERVICE_STOPPED; + } + else + { + ServiceStatus.dwCurrentState = SERVICE_RUNNING; + } + + SetServiceStatus(ServiceStatusHandle, &ServiceStatus); DPRINT("ServiceMain() done\n"); } - int wmain(int argc, WCHAR *argv[]) { - BOOLEAN OldValue; - DWORD dwError; - UNREFERENCED_PARAMETER(argc); UNREFERENCED_PARAMETER(argv); - DPRINT("Umpnpmgr: main() started\n"); - - /* We need this privilege for using CreateProcessAsUserW */ - RtlAdjustPrivilege(SE_ASSIGNPRIMARYTOKEN_PRIVILEGE, TRUE, FALSE, &OldValue); - - hInstallEvent = CreateEvent(NULL, TRUE, SetupIsActive()/*FALSE*/, NULL); - if (hInstallEvent == NULL) - { - dwError = GetLastError(); - DPRINT1("Could not create the Install Event! (Error %lu)\n", dwError); - return dwError; - } - - hDeviceInstallListNotEmpty = CreateEvent(NULL, FALSE, FALSE, NULL); - if (hDeviceInstallListNotEmpty == NULL) - { - dwError = GetLastError(); - DPRINT1("Could not create the Event! (Error %lu)\n", dwError); - return dwError; - } - - hNoPendingInstalls = CreateEventW(NULL, - TRUE, - FALSE, - L"Global\\PnP_No_Pending_Install_Events"); - if (hNoPendingInstalls == NULL) - { - dwError = GetLastError(); - DPRINT1("Could not create the Event! (Error %lu)\n", dwError); - return dwError; - } - -#ifdef HAVE_SLIST_ENTRY_IMPLEMENTED - InitializeSListHead(&DeviceInstallListHead); -#else - InitializeListHead(&DeviceInstallListHead); -#endif - - dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, - L"System\\CurrentControlSet\\Enum", - 0, - KEY_ALL_ACCESS, - &hEnumKey); - if (dwError != ERROR_SUCCESS) - { - DPRINT1("Could not open the Enum Key! (Error %lu)\n", dwError); - return dwError; - } - - dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, - L"System\\CurrentControlSet\\Control\\Class", - 0, - KEY_ALL_ACCESS, - &hClassKey); - if (dwError != ERROR_SUCCESS) - { - DPRINT1("Could not open the Class Key! (Error %lu)\n", dwError); - return dwError; - } - - StartServiceCtrlDispatcher(ServiceTable); - - DPRINT("Umpnpmgr: main() done\n"); - - ExitThread(0); - + DPRINT1("Umpnpmgr: main() started\n"); + StartServiceCtrlDispatcherW(ServiceTable); + DPRINT1("Umpnpmgr: main() done\n"); return 0; }
14 years, 8 months
1
0
0
0
[dgorbachev] 45604: [SERVICES] Set default status to SERVICE_START_PENDING when starting a service.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Thu Feb 18 03:28:45 2010 New Revision: 45604 URL:
http://svn.reactos.org/svn/reactos?rev=45604&view=rev
Log: [SERVICES] Set default status to SERVICE_START_PENDING when starting a service. Modified: branches/arwinss/reactos/base/system/services/database.c Modified: branches/arwinss/reactos/base/system/services/database.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/base/system/ser…
============================================================================== --- branches/arwinss/reactos/base/system/services/database.c [iso-8859-1] (original) +++ branches/arwinss/reactos/base/system/services/database.c [iso-8859-1] Thu Feb 18 03:28:45 2010 @@ -1054,7 +1054,7 @@ { Group->ServicesRunning = TRUE; } - Service->Status.dwCurrentState = SERVICE_RUNNING; + Service->Status.dwCurrentState = SERVICE_START_PENDING; } #if 0 else
14 years, 8 months
1
0
0
0
[dgorbachev] 45603: [WINLOGON] Fix a comment.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Thu Feb 18 03:27:57 2010 New Revision: 45603 URL:
http://svn.reactos.org/svn/reactos?rev=45603&view=rev
Log: [WINLOGON] Fix a comment. Modified: branches/arwinss/reactos/base/system/winlogon/winlogon.c Modified: branches/arwinss/reactos/base/system/winlogon/winlogon.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/base/system/win…
============================================================================== --- branches/arwinss/reactos/base/system/winlogon/winlogon.c [iso-8859-1] (original) +++ branches/arwinss/reactos/base/system/winlogon/winlogon.c [iso-8859-1] Thu Feb 18 03:27:57 2010 @@ -167,7 +167,7 @@ LPCWSTR ServiceString = L"lsass.exe"; BOOL res; - /* Start the service control manager (services.exe) */ + /* Start the local security authentication subsystem (lsass.exe) */ ZeroMemory(&StartupInfo, sizeof(STARTUPINFOW)); StartupInfo.cb = sizeof(StartupInfo); StartupInfo.lpReserved = NULL;
14 years, 8 months
1
0
0
0
[cgutman] 45602: - Fix incorrect sector size detection which caused seeking to fail when booting from a floppy - FreeLoader can load from a floppy disk now
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Feb 16 21:32:58 2010 New Revision: 45602 URL:
http://svn.reactos.org/svn/reactos?rev=45602&view=rev
Log: - Fix incorrect sector size detection which caused seeking to fail when booting from a floppy - FreeLoader can load from a floppy disk now Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Tue Feb 16 21:32:58 2010 @@ -433,21 +433,33 @@ ULONGLONG SectorOffset = 0; ULONGLONG SectorCount = 0; PARTITION_TABLE_ENTRY PartitionTableEntry; + GEOMETRY Geometry; + EXTENDED_GEOMETRY ExtGeometry; CHAR FileName[1]; if (!DissectArcPath(Path, FileName, &DriveNumber, &DrivePartition)) return EINVAL; - SectorSize = (DrivePartition == 0xff ? 2048 : 512); + + ExtGeometry.Size = sizeof(EXTENDED_GEOMETRY); + if (DiskGetExtendedDriveParameters(DriveNumber, &ExtGeometry, ExtGeometry.Size)) + { + SectorSize = ExtGeometry.BytesPerSector; + SectorCount = ExtGeometry.Sectors; + } + else if (MachDiskGetDriveGeometry(DriveNumber, &Geometry)) + { + SectorSize = Geometry.BytesPerSector; + SectorCount = Geometry.Sectors; + } + else + return EINVAL; + if (DrivePartition != 0xff && DrivePartition != 0) { if (!DiskGetPartitionEntry(DriveNumber, DrivePartition, &PartitionTableEntry)) return EINVAL; SectorOffset = PartitionTableEntry.SectorCountBeforePartition; SectorCount = PartitionTableEntry.PartitionSectorCount; - } - else - { - SectorCount = 0; /* FIXME */ } Context = MmHeapAlloc(sizeof(DISKCONTEXT));
14 years, 8 months
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
37
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
Results per page:
10
25
50
100
200