ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2010
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
896 discussions
Start a n
N
ew thread
[janderwald] 46209: - Fix build
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Mar 15 17:23:45 2010 New Revision: 46209 URL:
http://svn.reactos.org/svn/reactos?rev=46209&view=rev
Log: - Fix build Modified: trunk/reactos/dll/directx/ksproxy/input_pin.cpp Modified: trunk/reactos/dll/directx/ksproxy/input_pin.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/input_…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/input_pin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/input_pin.cpp [iso-8859-1] Mon Mar 15 17:23:45 2010 @@ -159,8 +159,8 @@ KSPIN_INTERFACE m_Interface; KSPIN_MEDIUM m_Medium; IPin * m_Pin; + BOOL m_ReadOnly; IKsInterfaceHandler * m_InterfaceHandler; - BOOL m_ReadOnly; }; HRESULT
14 years, 9 months
1
0
0
0
[janderwald] 46208: [KSPROXY] - Implement IKsDataTypeHandler::KsIsMediaTypeInRanges, IKsDataTypeHandler::KsSetMediaType - Instantiate the IKsInterfaceHandler for the CInputPin
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Mar 15 17:22:41 2010 New Revision: 46208 URL:
http://svn.reactos.org/svn/reactos?rev=46208&view=rev
Log: [KSPROXY] - Implement IKsDataTypeHandler::KsIsMediaTypeInRanges, IKsDataTypeHandler::KsSetMediaType - Instantiate the IKsInterfaceHandler for the CInputPin Modified: trunk/reactos/dll/directx/ksproxy/datatype.cpp trunk/reactos/dll/directx/ksproxy/input_pin.cpp trunk/reactos/dll/directx/ksproxy/interface.cpp trunk/reactos/dll/directx/ksproxy/ksproxy.cpp trunk/reactos/dll/directx/ksproxy/output_pin.cpp trunk/reactos/dll/directx/ksproxy/precomp.h trunk/reactos/dll/directx/ksproxy/proxy.cpp Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/datatype.cpp [iso-8859-1] Mon Mar 15 17:22:41 2010 @@ -42,12 +42,25 @@ HRESULT STDMETHODCALLTYPE KsQueryExtendedSize(OUT ULONG* ExtendedSize); HRESULT STDMETHODCALLTYPE KsSetMediaType(IN const AM_MEDIA_TYPE* AmMediaType); - CKsDataTypeHandler() : m_Ref(0){}; - virtual ~CKsDataTypeHandler(){}; + CKsDataTypeHandler() : m_Ref(0), m_Type(0){}; + virtual ~CKsDataTypeHandler() + { + if (m_Type) + { + if (m_Type->pbFormat) + CoTaskMemFree(m_Type->pbFormat); + + if (m_Type->pUnk) + m_Type->pUnk->Release(); + + CoTaskMemFree(m_Type); + } + + }; protected: - //CMediaType * m_Type; LONG m_Ref; + AM_MEDIA_TYPE * m_Type; }; @@ -85,8 +98,68 @@ CKsDataTypeHandler::KsIsMediaTypeInRanges( IN PVOID DataRanges) { - OutputDebugString("UNIMPLEMENTED\n"); - return E_NOTIMPL; + PKSMULTIPLE_ITEM DataList; + PKSDATARANGE DataRange; + ULONG Index; + HRESULT hr = S_FALSE; + + OutputDebugStringW(L"CKsDataTypeHandler::KsIsMediaTypeInRanges\n"); + + DataList = (PKSMULTIPLE_ITEM)DataRanges; + DataRange = (PKSDATARANGE)(DataList + 1); + + for(Index = 0; Index < DataList->Count; Index++) + { + BOOL bMatch = FALSE; + + if (DataRange->FormatSize >= sizeof(KSDATARANGE)) + { + bMatch = IsEqualGUID(DataRange->MajorFormat, GUID_NULL); + } + + if (!bMatch && DataRange->FormatSize >= sizeof(KSDATARANGE_AUDIO)) + { + bMatch = IsEqualGUID(DataRange->MajorFormat, MEDIATYPE_Audio); + } + + if (bMatch) + { + if (IsEqualGUID(DataRange->SubFormat, m_Type->subtype) || + IsEqualGUID(DataRange->SubFormat, GUID_NULL)) + { + if (IsEqualGUID(DataRange->Specifier, m_Type->formattype) || + IsEqualGUID(DataRange->Specifier, GUID_NULL)) + { + if (!IsEqualGUID(m_Type->formattype, FORMAT_WaveFormatEx) && !IsEqualGUID(DataRange->Specifier, FORMAT_WaveFormatEx)) + { + //found match + hr = S_OK; + break; + } + + if (DataRange->FormatSize >= sizeof(KSDATARANGE_AUDIO) && m_Type->cbFormat >= sizeof(WAVEFORMATEX)) + { + LPWAVEFORMATEX Format = (LPWAVEFORMATEX)m_Type->pbFormat; + PKSDATARANGE_AUDIO AudioRange = (PKSDATARANGE_AUDIO)DataRange; + + if (Format->nSamplesPerSec >= AudioRange->MinimumSampleFrequency && + Format->nSamplesPerSec <= AudioRange->MaximumSampleFrequency && + Format->wBitsPerSample >= AudioRange->MinimumSampleFrequency && + Format->wBitsPerSample <= AudioRange->MaximumBitsPerSample && + Format->nChannels <= AudioRange->MaximumChannels) + { + // found match + hr = S_OK; + break; + } + } + } + } + } + + DataRange = (PKSDATARANGE)(((ULONG_PTR)DataRange + DataRange->FormatSize + 7) & ~7); + } + return S_OK; } HRESULT @@ -106,7 +179,6 @@ { /* no header extension required */ *ExtendedSize = 0; - return NOERROR; } @@ -115,19 +187,38 @@ CKsDataTypeHandler::KsSetMediaType( IN const AM_MEDIA_TYPE* AmMediaType) { -#if 0 + OutputDebugString("CKsDataTypeHandler::KsSetMediaType\n"); + 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; + + m_Type = (AM_MEDIA_TYPE*)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); + if (!m_Type) + return E_OUTOFMEMORY; + + CopyMemory(m_Type, AmMediaType, sizeof(AM_MEDIA_TYPE)); + + if (m_Type->cbFormat) + { + m_Type->pbFormat = (BYTE*)CoTaskMemAlloc(m_Type->cbFormat); + + if (!m_Type->pbFormat) + { + CoTaskMemFree(m_Type); + return E_OUTOFMEMORY; + } + + CopyMemory(m_Type->pbFormat, AmMediaType->pbFormat, m_Type->cbFormat); + } + + if (m_Type->pUnk) + m_Type->pUnk->AddRef(); + + + return S_OK; } HRESULT @@ -138,7 +229,6 @@ LPVOID * ppv) { OutputDebugStringW(L"CKsDataTypeHandler_Constructor\n"); - CKsDataTypeHandler * handler = new CKsDataTypeHandler(); if (!handler) Modified: trunk/reactos/dll/directx/ksproxy/input_pin.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/input_…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/input_pin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/input_pin.cpp [iso-8859-1] Mon Mar 15 17:22:41 2010 @@ -143,7 +143,7 @@ HRESULT STDMETHODCALLTYPE CheckFormat(const AM_MEDIA_TYPE *pmt); HRESULT STDMETHODCALLTYPE CreatePin(const AM_MEDIA_TYPE *pmt); HRESULT STDMETHODCALLTYPE CreatePinHandle(PKSPIN_MEDIUM Medium, PKSPIN_INTERFACE Interface, const AM_MEDIA_TYPE *pmt); - CInputPin(IBaseFilter * ParentFilter, LPCWSTR PinName, HANDLE hFilter, ULONG PinId, KSPIN_COMMUNICATION Communication) : m_Ref(0), m_ParentFilter(ParentFilter), m_PinName(PinName), m_hFilter(hFilter), m_hPin(INVALID_HANDLE_VALUE), m_PinId(PinId), m_MemAllocator(0), m_IoCount(0), m_Communication(Communication), m_Pin(0), m_ReadOnly(0){}; + CInputPin(IBaseFilter * ParentFilter, LPCWSTR PinName, HANDLE hFilter, ULONG PinId, KSPIN_COMMUNICATION Communication) : m_Ref(0), m_ParentFilter(ParentFilter), m_PinName(PinName), m_hFilter(hFilter), m_hPin(INVALID_HANDLE_VALUE), m_PinId(PinId), m_MemAllocator(0), m_IoCount(0), m_Communication(Communication), m_Pin(0), m_ReadOnly(0), m_InterfaceHandler(0){}; virtual ~CInputPin(){}; protected: @@ -159,6 +159,7 @@ KSPIN_INTERFACE m_Interface; KSPIN_MEDIUM m_Medium; IPin * m_Pin; + IKsInterfaceHandler * m_InterfaceHandler; BOOL m_ReadOnly; }; @@ -666,16 +667,17 @@ if (m_Pin) { + // already connected return VFW_E_ALREADY_CONNECTED; } // first check format hr = CheckFormat(pmt); if (FAILED(hr)) + { + // format is not supported return hr; - - if (FAILED(CheckFormat(pmt))) - return hr; + } hr = CreatePin(pmt); if (FAILED(hr)) @@ -683,9 +685,8 @@ return hr; } - //FIXME create pin - m_Pin = pConnector; - m_Pin->AddRef(); + m_Pin = pConnector; + m_Pin->AddRef(); return S_OK; } @@ -925,6 +926,7 @@ PKSMULTIPLE_ITEM InterfaceList; PKSPIN_MEDIUM Medium; PKSPIN_INTERFACE Interface; + IKsInterfaceHandler * InterfaceHandler; HRESULT hr; // query for pin medium @@ -963,8 +965,43 @@ Interface = &StandardPinInterface; } - // now create pin - hr = CreatePinHandle(Medium, Interface, pmt); + if (m_Communication != KSPIN_COMMUNICATION_BRIDGE && m_Communication != KSPIN_COMMUNICATION_NONE) + { + // now load the IKsInterfaceHandler plugin + hr = CoCreateInstance(Interface->Set, NULL, CLSCTX_INPROC_SERVER, IID_IKsInterfaceHandler, (void**)&InterfaceHandler); + if (FAILED(hr)) + { + // failed to load interface handler plugin + OutputDebugStringW(L"CInputPin::CreatePin failed to load InterfaceHandlerPlugin\n"); + CoTaskMemFree(MediumList); + CoTaskMemFree(InterfaceList); + + return hr; + } + + // now set the pin + hr = InterfaceHandler->KsSetPin((IKsPin*)this); + if (FAILED(hr)) + { + // failed to load interface handler plugin + OutputDebugStringW(L"CInputPin::CreatePin failed to initialize InterfaceHandlerPlugin\n"); + InterfaceHandler->Release(); + CoTaskMemFree(MediumList); + CoTaskMemFree(InterfaceList); + return hr; + } + + // store interface handler + m_InterfaceHandler = InterfaceHandler; + + // now create pin + hr = CreatePinHandle(Medium, Interface, pmt); + if (FAILED(hr)) + { + m_InterfaceHandler->Release(); + m_InterfaceHandler = InterfaceHandler; + } + } // free medium / interface / dataformat CoTaskMemFree(MediumList); Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/interface.cpp [iso-8859-1] Mon Mar 15 17:22:41 2010 @@ -247,12 +247,9 @@ //release IMediaSample2 interface MediaSample->Release(); - if (FAILED(hr)) - OutputDebugStringW(L"CKsInterfaceHandler::KsProcessMediaSamples MediaSample::GetProperties failed\n"); } else { - OutputDebugStringW(L"CKsInterfaceHandler::KsProcessMediaSamples MediaSample:: only IMediaSample supported\n"); // get properties hr = SampleList[Index]->GetPointer((BYTE**)&Properties.pbBuffer); assert(hr == NOERROR); @@ -272,7 +269,7 @@ } WCHAR Buffer[100]; - swprintf(Buffer, L"BufferLength %lu Property Buffer %p ExtendedSize %u lActual %u\n", Properties.cbBuffer, Properties.pbBuffer, ExtendedSize, Properties.lActual); + swprintf(Buffer, L"BufferLength %lu Property Buffer %p ExtendedSize %u lActual %u\n", Properties.cbBuffer, Properties.pbBuffer, ExtendedSize, Properties.lActual); OutputDebugStringW(Buffer); CurStreamHeader->Size = sizeof(KSSTREAM_HEADER) + ExtendedSize; Modified: trunk/reactos/dll/directx/ksproxy/ksproxy.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/ksprox…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/ksproxy.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/ksproxy.cpp [iso-8859-1] Mon Mar 15 17:22:41 2010 @@ -13,10 +13,10 @@ 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}}; + + +#ifndef _MSC_VER const GUID CLSID_KsIBasicAudioInterfaceHandler = {0xb9f8ac3e, 0x0f71, 0x11d2, {0xb7, 0x2c, 0x00, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d}}; - - -#ifndef _MSC_VER 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_Proxy = {0x17CCA71B, 0xECD7, 0x11D0, {0xB9, 0x08, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}; Modified: trunk/reactos/dll/directx/ksproxy/output_pin.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/output…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/output_pin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/output_pin.cpp [iso-8859-1] Mon Mar 15 17:22:41 2010 @@ -21,6 +21,7 @@ // public IKsPinPipe, public IKsControl /* + public IAMBufferNegotiation, public IQualityControl, public IKsPinEx, public IKsAggregateControl @@ -142,50 +143,54 @@ if (IsEqualGUID(refiid, IID_IUnknown) || IsEqualGUID(refiid, IID_IPin)) { + OutputDebugStringW(L"COutputPin::QueryInterface IID_IPin\n"); *Output = PVOID(this); reinterpret_cast<IUnknown*>(*Output)->AddRef(); return NOERROR; } else if (IsEqualGUID(refiid, IID_IKsObject)) { + OutputDebugStringW(L"COutputPin::QueryInterface IID_IKsObject\n"); *Output = (IKsObject*)(this); reinterpret_cast<IKsObject*>(*Output)->AddRef(); return NOERROR; } else if (IsEqualGUID(refiid, IID_IKsPropertySet)) { + OutputDebugStringW(L"COutputPin::QueryInterface IID_IKsPropertySet\n"); + DebugBreak(); *Output = (IKsPropertySet*)(this); reinterpret_cast<IKsPropertySet*>(*Output)->AddRef(); return NOERROR; } else if (IsEqualGUID(refiid, IID_IKsControl)) { + OutputDebugStringW(L"COutputPin::QueryInterface IID_IKsControl\n"); *Output = (IKsControl*)(this); reinterpret_cast<IKsControl*>(*Output)->AddRef(); return NOERROR; } +#if 0 else if (IsEqualGUID(refiid, IID_IStreamBuilder)) { *Output = (IStreamBuilder*)(this); reinterpret_cast<IStreamBuilder*>(*Output)->AddRef(); return NOERROR; } +#endif else if (IsEqualGUID(refiid, IID_IKsPinFactory)) { + OutputDebugStringW(L"COutputPin::QueryInterface IID_IKsPinFactory\n"); *Output = (IKsPinFactory*)(this); reinterpret_cast<IKsPinFactory*>(*Output)->AddRef(); return NOERROR; } else if (IsEqualGUID(refiid, IID_ISpecifyPropertyPages)) { + OutputDebugStringW(L"COutputPin::QueryInterface IID_ISpecifyPropertyPages\n"); *Output = (ISpecifyPropertyPages*)(this); reinterpret_cast<ISpecifyPropertyPages*>(*Output)->AddRef(); return NOERROR; - } - else if (IsEqualGUID(refiid, IID_IBaseFilter)) - { - OutputDebugStringW(L"COutputPin::QueryInterface query IID_IBaseFilter\n"); - DebugBreak(); } WCHAR Buffer[MAX_PATH]; @@ -226,6 +231,7 @@ COutputPin::KsPinFactory( ULONG* PinFactory) { + OutputDebugStringW(L"COutputPin::KsPinFactory\n"); *PinFactory = m_PinId; return S_OK; } @@ -241,6 +247,7 @@ IPin *ppinOut, IGraphBuilder *pGraph) { + OutputDebugStringW(L"COutputPin::Render\n"); return S_OK; } @@ -250,6 +257,7 @@ IPin *ppinOut, IGraphBuilder *pGraph) { + OutputDebugStringW(L"COutputPin::Backout\n"); return S_OK; } //------------------------------------------------------------------- @@ -259,6 +267,7 @@ STDMETHODCALLTYPE COutputPin::KsGetObjectHandle() { + OutputDebugStringW(L"COutputPin::KsGetObjectHandle\n"); assert(m_hPin); return m_hPin; } @@ -276,6 +285,7 @@ ULONG* BytesReturned) { assert(m_hPin != 0); + OutputDebugStringW(L"COutputPin::KsProperty\n"); return KsSynchronousDeviceControl(m_hPin, IOCTL_KS_PROPERTY, (PVOID)Property, PropertyLength, (PVOID)PropertyData, DataLength, BytesReturned); } @@ -289,6 +299,7 @@ ULONG* BytesReturned) { assert(m_hPin != 0); + OutputDebugStringW(L"COutputPin::KsMethod\n"); return KsSynchronousDeviceControl(m_hPin, IOCTL_KS_METHOD, (PVOID)Method, MethodLength, (PVOID)MethodData, DataLength, BytesReturned); } @@ -302,6 +313,8 @@ ULONG* BytesReturned) { assert(m_hPin != 0); + + OutputDebugStringW(L"COutputPin::KsEvent\n"); if (EventLength) return KsSynchronousDeviceControl(m_hPin, IOCTL_KS_ENABLE_EVENT, (PVOID)Event, EventLength, (PVOID)EventData, DataLength, BytesReturned); @@ -324,6 +337,8 @@ DWORD cbPropData) { ULONG BytesReturned; + + OutputDebugStringW(L"COutputPin::Set\n"); if (cbInstanceData) { @@ -367,6 +382,8 @@ { ULONG BytesReturned; + OutputDebugStringW(L"COutputPin::Get\n"); + if (cbInstanceData) { PKSPROPERTY Property = (PKSPROPERTY)CoTaskMemAlloc(sizeof(KSPROPERTY) + cbInstanceData); @@ -405,6 +422,8 @@ { KSPROPERTY Property; ULONG BytesReturned; + + OutputDebugStringW(L"COutputPin::QuerySupported\n"); Property.Set = guidPropSet; Property.Id = dwPropID; @@ -470,12 +489,15 @@ STDMETHODCALLTYPE COutputPin::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt) { + OutputDebugStringW(L"COutputPin::ReceiveConnection\n"); return E_UNEXPECTED; } HRESULT STDMETHODCALLTYPE COutputPin::Disconnect( void) { + OutputDebugStringW(L"COutputPin::Disconnect\n"); + if (!m_Pin) { // pin was not connected @@ -495,6 +517,8 @@ STDMETHODCALLTYPE COutputPin::ConnectedTo(IPin **pPin) { + OutputDebugStringW(L"COutputPin::ConnectedTo\n"); + if (!pPin) return E_POINTER; @@ -520,6 +544,8 @@ STDMETHODCALLTYPE COutputPin::QueryPinInfo(PIN_INFO *pInfo) { + OutputDebugStringW(L"COutputPin::QueryPinInfo\n"); + wcscpy(pInfo->achName, m_PinName); pInfo->dir = PINDIR_OUTPUT; pInfo->pFilter = m_ParentFilter; @@ -531,6 +557,8 @@ STDMETHODCALLTYPE COutputPin::QueryDirection(PIN_DIRECTION *pPinDir) { + OutputDebugStringW(L"COutputPin::QueryDirection\n"); + if (pPinDir) { *pPinDir = PINDIR_OUTPUT; @@ -543,6 +571,8 @@ STDMETHODCALLTYPE COutputPin::QueryId(LPWSTR *Id) { + OutputDebugStringW(L"COutputPin::QueryId\n"); + *Id = (LPWSTR)CoTaskMemAlloc((wcslen(m_PinName)+1)*sizeof(WCHAR)); if (!*Id) return E_OUTOFMEMORY; @@ -580,10 +610,10 @@ // query media type count hr = KsGetMediaTypeCount(hFilter, m_PinId, &MediaTypeCount); if (FAILED(hr) || !MediaTypeCount) - { + { OutputDebugStringW(L"COutputPin::EnumMediaTypes failed1\n"); return hr; - } + } // allocate media types MediaTypes = (AM_MEDIA_TYPE*)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE) * MediaTypeCount); @@ -605,7 +635,7 @@ { // failed CoTaskMemFree(MediaTypes); - OutputDebugStringW(L"COutputPin::EnumMediaTypes failed2\n"); + OutputDebugStringW(L"COutputPin::EnumMediaTypes failed\n"); return hr; } } Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/precomp.h [iso-8859-1] Mon Mar 15 17:22:41 2010 @@ -19,6 +19,7 @@ #include <stdio.h> #include <vector> #include <assert.h> +#include <ksmedia.h> //#include <debug.h> Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/proxy.cpp [iso-8859-1] Mon Mar 15 17:22:41 2010 @@ -1509,6 +1509,7 @@ CKsProxy::SetRate( double dRate) { + OutputDebugStringW(L"CKsProxy::SetRate\n"); return E_NOTIMPL; } @@ -1517,6 +1518,7 @@ CKsProxy::GetRate( double *pdRate) { + OutputDebugStringW(L"CKsProxy::GetRate\n"); return E_NOTIMPL; } @@ -1619,6 +1621,7 @@ ULONG* BytesReturned) { assert(m_hDevice != 0); + OutputDebugStringW(L"CKsProxy::KsProperty\n"); return KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_PROPERTY, (PVOID)Property, PropertyLength, (PVOID)PropertyData, DataLength, BytesReturned); } @@ -1632,6 +1635,7 @@ ULONG* BytesReturned) { assert(m_hDevice != 0); + OutputDebugStringW(L"CKsProxy::KsMethod\n"); return KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_METHOD, (PVOID)Method, MethodLength, (PVOID)MethodData, DataLength, BytesReturned); } @@ -1645,7 +1649,7 @@ ULONG* BytesReturned) { assert(m_hDevice != 0); - + OutputDebugStringW(L"CKsProxy::KsEvent\n"); if (EventLength) return KsSynchronousDeviceControl(m_hDevice, IOCTL_KS_ENABLE_EVENT, (PVOID)Event, EventLength, (PVOID)EventData, DataLength, BytesReturned); else @@ -1667,6 +1671,8 @@ DWORD cbPropData) { ULONG BytesReturned; + + OutputDebugStringW(L"CKsProxy::Set\n"); if (cbInstanceData) { @@ -1710,6 +1716,8 @@ { ULONG BytesReturned; + OutputDebugStringW(L"CKsProxy::Get\n"); + if (cbInstanceData) { PKSPROPERTY Property = (PKSPROPERTY)CoTaskMemAlloc(sizeof(KSPROPERTY) + cbInstanceData); @@ -1748,6 +1756,8 @@ { KSPROPERTY Property; ULONG BytesReturned; + + OutputDebugStringW(L"CKsProxy::QuerySupported\n"); Property.Set = guidPropSet; Property.Id = dwPropID; @@ -1930,6 +1940,9 @@ STDMETHODCALLTYPE CKsProxy::DeviceInfo(CLSID *pclsidInterfaceClass, LPWSTR *pwszSymbolicLink) { + + OutputDebugStringW(L"CKsProxy::DeviceInfo\n"); + if (!m_DevicePath) { // object not initialized @@ -1953,6 +1966,8 @@ STDMETHODCALLTYPE CKsProxy::Reassociate(void) { + OutputDebugStringW(L"CKsProxy::Reassociate\n"); + if (!m_DevicePath || m_hDevice) { // file path not available @@ -1974,6 +1989,8 @@ STDMETHODCALLTYPE CKsProxy::Disassociate(void) { + OutputDebugStringW(L"CKsProxy::Disassociate\n"); + if (!m_hDevice) return E_HANDLE; @@ -1990,6 +2007,7 @@ STDMETHODCALLTYPE CKsProxy::KsGetClockHandle() { + OutputDebugStringW(L"CKsProxy::KsGetClockHandle\n"); return m_hClock; } @@ -2002,6 +2020,7 @@ STDMETHODCALLTYPE CKsProxy::KsGetObjectHandle() { + OutputDebugStringW(L"CKsProxy::KsGetObjectHandle\n"); return m_hDevice; } @@ -2012,6 +2031,7 @@ STDMETHODCALLTYPE CKsProxy::InitNew( void) { + OutputDebugStringW(L"CKsProxy::InitNew\n"); return S_OK; } @@ -2384,6 +2404,7 @@ HDEVINFO hList; SP_DEVICE_INTERFACE_DATA DeviceInterfaceData; + OutputDebugStringW(L"CKsProxy::Load\n"); // read device path varName.vt = VT_BSTR; @@ -2396,6 +2417,10 @@ return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError()); } + OutputDebugStringW(L"DevicePath: "); + OutputDebugStringW(varName.bstrVal); + OutputDebugStringW(L"\n"); + // create device list hList = SetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, NULL); if (hList == INVALID_HANDLE_VALUE) @@ -2463,6 +2488,7 @@ STDMETHODCALLTYPE CKsProxy::Save(IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties) { + OutputDebugStringW(L"CKsProxy::Save\n"); return E_NOTIMPL; } @@ -2532,7 +2558,7 @@ PIN_DIRECTION PinDir; // Plug In Distributor: IKsClock - + OutputDebugStringW(L"CKsProxy::SetSyncSource\n"); // FIXME // need locks @@ -2624,6 +2650,8 @@ CKsProxy::GetSyncSource( IReferenceClock **pClock) { + OutputDebugStringW(L"CKsProxy::GetSyncSource\n"); + if (!pClock) return E_POINTER; @@ -2639,6 +2667,7 @@ CKsProxy::EnumPins( IEnumPins **ppEnum) { + OutputDebugStringW(L"CKsProxy::EnumPins\n"); return CEnumPins_fnConstructor(m_Pins, IID_IEnumPins, (void**)ppEnum); } @@ -2648,6 +2677,8 @@ LPCWSTR Id, IPin **ppPin) { ULONG PinId; + + OutputDebugStringW(L"CKsProxy::FindPin\n"); if (!ppPin) return E_POINTER; @@ -2683,6 +2714,8 @@ if (!pInfo) return E_POINTER; + OutputDebugStringW(L"CKsProxy::QueryFilterInfo\n"); + pInfo->achName[0] = L'\0'; pInfo->pGraph = m_pGraph; @@ -2698,6 +2731,8 @@ IFilterGraph *pGraph, LPCWSTR pName) { + OutputDebugStringW(L"CKsProxy::JoinFilterGraph\n"); + if (pGraph) { // joining filter graph @@ -2718,6 +2753,7 @@ CKsProxy::QueryVendorInfo( LPWSTR *pVendorInfo) { + OutputDebugStringW(L"CKsProxy::QueryVendorInfo\n"); return StringFromCLSID(CLSID_Proxy, pVendorInfo); }
14 years, 9 months
1
0
0
0
[cwittich] 46207: [ADVAPI32] sync ParseStringSidToSid with wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Mar 15 16:44:35 2010 New Revision: 46207 URL:
http://svn.reactos.org/svn/reactos?rev=46207&view=rev
Log: [ADVAPI32] sync ParseStringSidToSid with wine 1.1.40 Modified: trunk/reactos/dll/win32/advapi32/sec/sid.c Modified: trunk/reactos/dll/win32/advapi32/sec/sid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/sid…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/sid.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/sid.c [iso-8859-1] Mon Mar 15 16:44:35 2010 @@ -805,6 +805,9 @@ return FALSE; } + while (*StringSid == ' ') + StringSid++; + *cBytes = ComputeStringSidSize(StringSid); if (!pisid) /* Simply compute the size */ {
14 years, 9 months
1
0
0
0
[akhaldi] 46206: [NTDDK] - Introduce pragma once - Group related definitions - Add some missing define types - Add several CONTEXT_*, KERNEL_* and RTL_* definitions - Add INITIAL_MXCSR and INITIAL_FPCSR - Add WELL_KNOWN_SID_TYPE and TABLE_SEARCH_RESULT enumerations - Add several missing Rtl* functions
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Mar 15 15:02:59 2010 New Revision: 46206 URL:
http://svn.reactos.org/svn/reactos?rev=46206&view=rev
Log: [NTDDK] - Introduce pragma once - Group related definitions - Add some missing define types - Add several CONTEXT_*, KERNEL_* and RTL_* definitions - Add INITIAL_MXCSR and INITIAL_FPCSR - Add WELL_KNOWN_SID_TYPE and TABLE_SEARCH_RESULT enumerations - Add several missing Rtl* functions Modified: branches/header-work/include/ddk/ntddk.h Modified: branches/header-work/include/ddk/ntddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddk.h…
============================================================================== --- branches/header-work/include/ddk/ntddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntddk.h [iso-8859-1] Mon Mar 15 15:02:59 2010 @@ -24,7 +24,8 @@ * _X86_ - X86 environment */ -#ifndef _NTDDK_ +#pragma once + #define _NTDDK_ #if !defined(_NTHAL_) && !defined(_NTIFS_) @@ -55,24 +56,35 @@ extern "C" { #endif -struct _LOADER_PARAMETER_BLOCK; -struct _CREATE_DISK; -struct _DRIVE_LAYOUT_INFORMATION_EX; -struct _SET_PARTITION_INFORMATION_EX; - -// -// GUID and UUID -// -#ifndef GUID_DEFINED -#include <guiddef.h> -#endif -typedef GUID UUID; - typedef struct _BUS_HANDLER *PBUS_HANDLER; - -#define EXCEPTION_READ_FAULT 0 -#define EXCEPTION_WRITE_FAULT 1 -#define EXCEPTION_EXECUTE_FAULT 8 +typedef struct _CALLBACK_OBJECT *PCALLBACK_OBJECT; +typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT; +#if defined(_NTHAL_INCLUDED_) +typedef struct _KPROCESS *PEPROCESS; +typedef struct _ETHREAD *PETHREAD; +typedef struct _KAFFINITY_EX *PKAFFINITY_EX; +#elif defined(_NTIFS_INCLUDED_) +typedef struct _KPROCESS *PEPROCESS; +typedef struct _KTHREAD *PETHREAD; +#else +typedef struct _EPROCESS *PEPROCESS; +typedef struct _ETHREAD *PETHREAD; +#endif +typedef struct _IO_TIMER *PIO_TIMER; +typedef struct _KINTERRUPT *PKINTERRUPT; +typedef struct _KTHREAD *PKTHREAD, *PRKTHREAD; +typedef struct _OBJECT_TYPE *POBJECT_TYPE; +typedef struct _PEB *PPEB; +typedef struct _IMAGE_NT_HEADERS *PIMAGE_NT_HEADERS32; +typedef struct _IMAGE_NT_HEADERS64 *PIMAGE_NT_HEADERS64; + +#ifdef _WIN64 +typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS; +#else +typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS; +#endif + +#define PsGetCurrentProcess IoGetCurrentProcess #if (NTDDI_VERSION >= NTDDI_VISTA) extern NTSYSAPI volatile CCHAR KeNumberProcessors; @@ -81,6 +93,423 @@ #else extern PCCHAR KeNumberProcessors; #endif + +/* FIXME +#include <mce.h> +*/ + +#ifdef _X86_ + +#define KERNEL_STACK_SIZE 12288 +#define KERNEL_LARGE_STACK_SIZE 61440 +#define KERNEL_LARGE_STACK_COMMIT 12288 + +#define SIZE_OF_80387_REGISTERS 80 + +#if !defined(RC_INVOKED) + +#define CONTEXT_i386 0x10000 +#define CONTEXT_i486 0x10000 +#define CONTEXT_CONTROL (CONTEXT_i386|0x00000001L) +#define CONTEXT_INTEGER (CONTEXT_i386|0x00000002L) +#define CONTEXT_SEGMENTS (CONTEXT_i386|0x00000004L) +#define CONTEXT_FLOATING_POINT (CONTEXT_i386|0x00000008L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L) +#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L) + +#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS) +#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | \ + CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | \ + CONTEXT_EXTENDED_REGISTERS) + +#define CONTEXT_XSTATE (CONTEXT_i386 | 0x00000040L) + +#endif /* !defined(RC_INVOKED) */ + +typedef struct _FLOATING_SAVE_AREA { + ULONG ControlWord; + ULONG StatusWord; + ULONG TagWord; + ULONG ErrorOffset; + ULONG ErrorSelector; + ULONG DataOffset; + ULONG DataSelector; + UCHAR RegisterArea[SIZE_OF_80387_REGISTERS]; + ULONG Cr0NpxState; +} FLOATING_SAVE_AREA, *PFLOATING_SAVE_AREA; + +#include "pshpack4.h" +typedef struct _CONTEXT { + ULONG ContextFlags; + ULONG Dr0; + ULONG Dr1; + ULONG Dr2; + ULONG Dr3; + ULONG Dr6; + ULONG Dr7; + FLOATING_SAVE_AREA FloatSave; + ULONG SegGs; + ULONG SegFs; + ULONG SegEs; + ULONG SegDs; + ULONG Edi; + ULONG Esi; + ULONG Ebx; + ULONG Edx; + ULONG Ecx; + ULONG Eax; + ULONG Ebp; + ULONG Eip; + ULONG SegCs; + ULONG EFlags; + ULONG Esp; + ULONG SegSs; + UCHAR ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION]; +} CONTEXT, *PCONTEXT; +#include "poppack.h" + +#endif /* _X86_ */ + +#ifdef _AMD64_ + +#define KERNEL_STACK_SIZE 0x6000 +#define KERNEL_LARGE_STACK_SIZE 0x12000 +#define KERNEL_LARGE_STACK_COMMIT KERNEL_STACK_SIZE + +#define KERNEL_MCA_EXCEPTION_STACK_SIZE 0x2000 + +#define EXCEPTION_READ_FAULT 0 +#define EXCEPTION_WRITE_FAULT 1 +#define EXCEPTION_EXECUTE_FAULT 8 + +#if !defined(RC_INVOKED) + +#define CONTEXT_AMD64 0x100000 + +#define CONTEXT_CONTROL (CONTEXT_AMD64 | 0x1L) +#define CONTEXT_INTEGER (CONTEXT_AMD64 | 0x2L) +#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x4L) +#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x8L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x10L) + +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) +#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS) + +#define CONTEXT_XSTATE (CONTEXT_AMD64 | 0x20L) + +#define CONTEXT_EXCEPTION_ACTIVE 0x8000000 +#define CONTEXT_SERVICE_ACTIVE 0x10000000 +#define CONTEXT_EXCEPTION_REQUEST 0x40000000 +#define CONTEXT_EXCEPTION_REPORTING 0x80000000 + +#endif /* !defined(RC_INVOKED) */ + +#define INITIAL_MXCSR 0x1f80 +#define INITIAL_FPCSR 0x027f + +typedef struct DECLSPEC_ALIGN(16) _CONTEXT { + ULONG64 P1Home; + ULONG64 P2Home; + ULONG64 P3Home; + ULONG64 P4Home; + ULONG64 P5Home; + ULONG64 P6Home; + ULONG ContextFlags; + ULONG MxCsr; + USHORT SegCs; + USHORT SegDs; + USHORT SegEs; + USHORT SegFs; + USHORT SegGs; + USHORT SegSs; + ULONG EFlags; + ULONG64 Dr0; + ULONG64 Dr1; + ULONG64 Dr2; + ULONG64 Dr3; + ULONG64 Dr6; + ULONG64 Dr7; + ULONG64 Rax; + ULONG64 Rcx; + ULONG64 Rdx; + ULONG64 Rbx; + ULONG64 Rsp; + ULONG64 Rbp; + ULONG64 Rsi; + ULONG64 Rdi; + ULONG64 R8; + ULONG64 R9; + ULONG64 R10; + ULONG64 R11; + ULONG64 R12; + ULONG64 R13; + ULONG64 R14; + ULONG64 R15; + ULONG64 Rip; + union { + XMM_SAVE_AREA32 FltSave; + struct { + M128A Header[2]; + M128A Legacy[8]; + M128A Xmm0; + M128A Xmm1; + M128A Xmm2; + M128A Xmm3; + M128A Xmm4; + M128A Xmm5; + M128A Xmm6; + M128A Xmm7; + M128A Xmm8; + M128A Xmm9; + M128A Xmm10; + M128A Xmm11; + M128A Xmm12; + M128A Xmm13; + M128A Xmm14; + M128A Xmm15; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + M128A VectorRegister[26]; + ULONG64 VectorControl; + ULONG64 DebugControl; + ULONG64 LastBranchToRip; + ULONG64 LastBranchFromRip; + ULONG64 LastExceptionToRip; + ULONG64 LastExceptionFromRip; +} CONTEXT, *PCONTEXT; + +#endif /* _AMD64_ */ + +typedef enum _WELL_KNOWN_SID_TYPE { + WinNullSid = 0, + WinWorldSid = 1, + WinLocalSid = 2, + WinCreatorOwnerSid = 3, + WinCreatorGroupSid = 4, + WinCreatorOwnerServerSid = 5, + WinCreatorGroupServerSid = 6, + WinNtAuthoritySid = 7, + WinDialupSid = 8, + WinNetworkSid = 9, + WinBatchSid = 10, + WinInteractiveSid = 11, + WinServiceSid = 12, + WinAnonymousSid = 13, + WinProxySid = 14, + WinEnterpriseControllersSid = 15, + WinSelfSid = 16, + WinAuthenticatedUserSid = 17, + WinRestrictedCodeSid = 18, + WinTerminalServerSid = 19, + WinRemoteLogonIdSid = 20, + WinLogonIdsSid = 21, + WinLocalSystemSid = 22, + WinLocalServiceSid = 23, + WinNetworkServiceSid = 24, + WinBuiltinDomainSid = 25, + WinBuiltinAdministratorsSid = 26, + WinBuiltinUsersSid = 27, + WinBuiltinGuestsSid = 28, + WinBuiltinPowerUsersSid = 29, + WinBuiltinAccountOperatorsSid = 30, + WinBuiltinSystemOperatorsSid = 31, + WinBuiltinPrintOperatorsSid = 32, + WinBuiltinBackupOperatorsSid = 33, + WinBuiltinReplicatorSid = 34, + WinBuiltinPreWindows2000CompatibleAccessSid = 35, + WinBuiltinRemoteDesktopUsersSid = 36, + WinBuiltinNetworkConfigurationOperatorsSid = 37, + WinAccountAdministratorSid = 38, + WinAccountGuestSid = 39, + WinAccountKrbtgtSid = 40, + WinAccountDomainAdminsSid = 41, + WinAccountDomainUsersSid = 42, + WinAccountDomainGuestsSid = 43, + WinAccountComputersSid = 44, + WinAccountControllersSid = 45, + WinAccountCertAdminsSid = 46, + WinAccountSchemaAdminsSid = 47, + WinAccountEnterpriseAdminsSid = 48, + WinAccountPolicyAdminsSid = 49, + WinAccountRasAndIasServersSid = 50, + WinNTLMAuthenticationSid = 51, + WinDigestAuthenticationSid = 52, + WinSChannelAuthenticationSid = 53, + WinThisOrganizationSid = 54, + WinOtherOrganizationSid = 55, + WinBuiltinIncomingForestTrustBuildersSid = 56, + WinBuiltinPerfMonitoringUsersSid = 57, + WinBuiltinPerfLoggingUsersSid = 58, + WinBuiltinAuthorizationAccessSid = 59, + WinBuiltinTerminalServerLicenseServersSid = 60, + WinBuiltinDCOMUsersSid = 61, + WinBuiltinIUsersSid = 62, + WinIUserSid = 63, + WinBuiltinCryptoOperatorsSid = 64, + WinUntrustedLabelSid = 65, + WinLowLabelSid = 66, + WinMediumLabelSid = 67, + WinHighLabelSid = 68, + WinSystemLabelSid = 69, + WinWriteRestrictedCodeSid = 70, + WinCreatorOwnerRightsSid = 71, + WinCacheablePrincipalsGroupSid = 72, + WinNonCacheablePrincipalsGroupSid = 73, + WinEnterpriseReadonlyControllersSid = 74, + WinAccountReadonlyControllersSid = 75, + WinBuiltinEventLogReadersGroup = 76, + WinNewEnterpriseReadonlyControllersSid = 77, + WinBuiltinCertSvcDComAccessGroup = 78, + WinMediumPlusLabelSid = 79, + WinLocalLogonSid = 80, + WinConsoleLogonSid = 81, + WinThisOrganizationCertificateSid = 82, +} WELL_KNOWN_SID_TYPE; + +#define SE_UNSOLICITED_INPUT_PRIVILEGE 6 + +#ifndef _RTL_RUN_ONCE_DEF +#define _RTL_RUN_ONCE_DEF + +#define RTL_RUN_ONCE_INIT {0} + +#define RTL_RUN_ONCE_CHECK_ONLY 0x00000001UL +#define RTL_RUN_ONCE_ASYNC 0x00000002UL +#define RTL_RUN_ONCE_INIT_FAILED 0x00000004UL + +#define RTL_RUN_ONCE_CTX_RESERVED_BITS 2 + +typedef union _RTL_RUN_ONCE { + PVOID Ptr; +} RTL_RUN_ONCE, *PRTL_RUN_ONCE; + +typedef ULONG /* LOGICAL */ +(NTAPI *PRTL_RUN_ONCE_INIT_FN) ( + IN OUT PRTL_RUN_ONCE RunOnce, + IN OUT PVOID Parameter OPTIONAL, + IN OUT PVOID *Context OPTIONAL); + +#endif /* _RTL_RUN_ONCE_DEF */ + +typedef enum _TABLE_SEARCH_RESULT { + TableEmptyTree, + TableFoundNode, + TableInsertAsLeft, + TableInsertAsRight +} TABLE_SEARCH_RESULT; + +typedef enum _RTL_GENERIC_COMPARE_RESULTS { + GenericLessThan, + GenericGreaterThan, + GenericEqual +} RTL_GENERIC_COMPARE_RESULTS; + +// Forwarder +struct _RTL_AVL_TABLE; + +typedef RTL_GENERIC_COMPARE_RESULTS +(NTAPI *PRTL_AVL_COMPARE_ROUTINE) ( + IN struct _RTL_AVL_TABLE *Table, + IN PVOID FirstStruct, + IN PVOID SecondStruct); + +typedef PVOID +(NTAPI *PRTL_AVL_ALLOCATE_ROUTINE) ( + IN struct _RTL_AVL_TABLE *Table, + IN CLONG ByteSize); + +typedef VOID +(NTAPI *PRTL_AVL_FREE_ROUTINE) ( + IN struct _RTL_AVL_TABLE *Table, + IN PVOID Buffer); + +typedef NTSTATUS +(NTAPI *PRTL_AVL_MATCH_FUNCTION) ( + IN struct _RTL_AVL_TABLE *Table, + IN PVOID UserData, + IN PVOID MatchData); + +typedef struct _RTL_BALANCED_LINKS { + struct _RTL_BALANCED_LINKS *Parent; + struct _RTL_BALANCED_LINKS *LeftChild; + struct _RTL_BALANCED_LINKS *RightChild; + CHAR Balance; + UCHAR Reserved[3]; +} RTL_BALANCED_LINKS, *PRTL_BALANCED_LINKS; + +typedef struct _RTL_AVL_TABLE { + RTL_BALANCED_LINKS BalancedRoot; + PVOID OrderedPointer; + ULONG WhichOrderedElement; + ULONG NumberGenericTableElements; + ULONG DepthOfTree; + PRTL_BALANCED_LINKS RestartKey; + ULONG DeleteCount; + PRTL_AVL_COMPARE_ROUTINE CompareRoutine; + PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine; + PRTL_AVL_FREE_ROUTINE FreeRoutine; + PVOID TableContext; +} RTL_AVL_TABLE, *PRTL_AVL_TABLE; + +#if (NTDDI_VERSION >= NTDDI_WINXP) +NTSYSAPI +VOID +NTAPI +RtlInitializeGenericTableAvl( + OUT PRTL_AVL_TABLE Table, + IN PRTL_AVL_COMPARE_ROUTINE CompareRoutine, + IN PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine, + IN PRTL_AVL_FREE_ROUTINE FreeRoutine, + IN PVOID TableContext OPTIONAL); +#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ + +#if (NTDDI_VERSION >= NTDDI_WIN6) + +NTSYSAPI +VOID +NTAPI +RtlRunOnceInitialize( + OUT PRTL_RUN_ONCE RunOnce); + +NTSYSAPI +NTSTATUS +NTAPI +RtlRunOnceExecuteOnce( + IN OUT PRTL_RUN_ONCE RunOnce, + IN PRTL_RUN_ONCE_INIT_FN InitFn, + IN OUT PVOID Parameter OPTIONAL, + OUT PVOID *Context OPTIONAL); + +NTSYSAPI +NTSTATUS +NTAPI +RtlRunOnceBeginInitialize( + IN OUT PRTL_RUN_ONCE RunOnce, + IN ULONG Flags, + OUT PVOID *Context OPTIONAL); + +NTSYSAPI +NTSTATUS +NTAPI +RtlRunOnceComplete( + IN OUT PRTL_RUN_ONCE RunOnce, + IN ULONG Flags, + IN PVOID Context OPTIONAL); + +#endif /* (NTDDI_VERSION >= NTDDI_WIN6) */ + +struct _LOADER_PARAMETER_BLOCK; +struct _CREATE_DISK; +struct _DRIVE_LAYOUT_INFORMATION_EX; +struct _SET_PARTITION_INFORMATION_EX; + +// +// GUID and UUID +// +#ifndef GUID_DEFINED +#include <guiddef.h> +#endif +typedef GUID UUID; #define MAX_WOW64_SHARED_ENTRIES 16 @@ -773,8 +1202,6 @@ PVOID64 Buffer; ULONGLONG Alignment; }FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT; - -#define SE_UNSOLICITED_INPUT_PRIVILEGE 6 #if (NTDDI_VERSION >= NTDDI_WIN2K) NTSYSAPI @@ -1206,29 +1633,8 @@ #define KeGetPcr() PCR -#define KERNEL_STACK_SIZE 12288 -#define KERNEL_LARGE_STACK_SIZE 61440 -#define KERNEL_LARGE_STACK_COMMIT 12288 - -#define SIZE_OF_80387_REGISTERS 80 - #define PCR_MINOR_VERSION 1 #define PCR_MAJOR_VERSION 1 - -#if !defined(RC_INVOKED) - -#define CONTEXT_i386 0x10000 -#define CONTEXT_i486 0x10000 -#define CONTEXT_CONTROL (CONTEXT_i386|0x00000001L) -#define CONTEXT_INTEGER (CONTEXT_i386|0x00000002L) -#define CONTEXT_SEGMENTS (CONTEXT_i386|0x00000004L) -#define CONTEXT_FLOATING_POINT (CONTEXT_i386|0x00000008L) -#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L) -#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L) - -#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS) - -#endif /* !defined(RC_INVOKED) */ typedef struct _KPCR { union { @@ -1274,48 +1680,6 @@ return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number)); } -typedef struct _FLOATING_SAVE_AREA { - ULONG ControlWord; - ULONG StatusWord; - ULONG TagWord; - ULONG ErrorOffset; - ULONG ErrorSelector; - ULONG DataOffset; - ULONG DataSelector; - UCHAR RegisterArea[SIZE_OF_80387_REGISTERS]; - ULONG Cr0NpxState; -} FLOATING_SAVE_AREA, *PFLOATING_SAVE_AREA; - -#include "pshpack4.h" -typedef struct _CONTEXT { - ULONG ContextFlags; - ULONG Dr0; - ULONG Dr1; - ULONG Dr2; - ULONG Dr3; - ULONG Dr6; - ULONG Dr7; - FLOATING_SAVE_AREA FloatSave; - ULONG SegGs; - ULONG SegFs; - ULONG SegEs; - ULONG SegDs; - ULONG Edi; - ULONG Esi; - ULONG Ebx; - ULONG Edx; - ULONG Ecx; - ULONG Eax; - ULONG Ebp; - ULONG Eip; - ULONG SegCs; - ULONG EFlags; - ULONG Esp; - ULONG SegSs; - UCHAR ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION]; -} CONTEXT; -#include "poppack.h" - #endif /* _X86_ */ #ifdef _AMD64_ @@ -1349,93 +1713,6 @@ #define MM_LOWEST_USER_ADDRESS (PVOID)0x10000 #define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xFFFF080000000000ULL #define KI_USER_SHARED_DATA 0xFFFFF78000000000ULL - -typedef struct DECLSPEC_ALIGN(16) _CONTEXT { - ULONG64 P1Home; - ULONG64 P2Home; - ULONG64 P3Home; - ULONG64 P4Home; - ULONG64 P5Home; - ULONG64 P6Home; - - /* Control flags */ - ULONG ContextFlags; - ULONG MxCsr; - - /* Segment */ - USHORT SegCs; - USHORT SegDs; - USHORT SegEs; - USHORT SegFs; - USHORT SegGs; - USHORT SegSs; - ULONG EFlags; - - /* Debug */ - ULONG64 Dr0; - ULONG64 Dr1; - ULONG64 Dr2; - ULONG64 Dr3; - ULONG64 Dr6; - ULONG64 Dr7; - - /* Integer */ - ULONG64 Rax; - ULONG64 Rcx; - ULONG64 Rdx; - ULONG64 Rbx; - ULONG64 Rsp; - ULONG64 Rbp; - ULONG64 Rsi; - ULONG64 Rdi; - ULONG64 R8; - ULONG64 R9; - ULONG64 R10; - ULONG64 R11; - ULONG64 R12; - ULONG64 R13; - ULONG64 R14; - ULONG64 R15; - - /* Counter */ - ULONG64 Rip; - - /* Floating point */ - union { - XMM_SAVE_AREA32 FltSave; - struct { - M128A Header[2]; - M128A Legacy[8]; - M128A Xmm0; - M128A Xmm1; - M128A Xmm2; - M128A Xmm3; - M128A Xmm4; - M128A Xmm5; - M128A Xmm6; - M128A Xmm7; - M128A Xmm8; - M128A Xmm9; - M128A Xmm10; - M128A Xmm11; - M128A Xmm12; - M128A Xmm13; - M128A Xmm14; - M128A Xmm15; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - - /* Vector */ - M128A VectorRegister[26]; - ULONG64 VectorControl; - - /* Debug control */ - ULONG64 DebugControl; - ULONG64 LastBranchToRip; - ULONG64 LastBranchFromRip; - ULONG64 LastExceptionToRip; - ULONG64 LastExceptionFromRip; -} CONTEXT; typedef struct _KPCR { @@ -1486,28 +1763,6 @@ { return (ULONG)__readgsword(0x184); } - -#if !defined(RC_INVOKED) - -#define CONTEXT_AMD64 0x100000 - -#define CONTEXT_CONTROL (CONTEXT_AMD64 | 0x1L) -#define CONTEXT_INTEGER (CONTEXT_AMD64 | 0x2L) -#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x4L) -#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x8L) -#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x10L) - -#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) -#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS) - -#define CONTEXT_XSTATE (CONTEXT_AMD64 | 0x20L) - -#define CONTEXT_EXCEPTION_ACTIVE 0x8000000 -#define CONTEXT_SERVICE_ACTIVE 0x10000000 -#define CONTEXT_EXCEPTION_REQUEST 0x40000000 -#define CONTEXT_EXCEPTION_REPORTING 0x80000000 - -#endif /* RC_INVOKED */ #endif /* _AMD64_ */ @@ -2928,6 +3183,3 @@ #ifdef __cplusplus } #endif - - -#endif /* _NTDDK_ */
14 years, 9 months
1
0
0
0
[janderwald] 46205: [KSPROXY] - Implement ISpecifyPropertyPages interface for CInputPin - Implement IKsInterfaceHandler::KsSetPin, IKsInterfaceHandler::KsProcessMediaSamples, IKsInterfaceHandler::KsCompleteIo
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Mar 15 14:11:31 2010 New Revision: 46205 URL:
http://svn.reactos.org/svn/reactos?rev=46205&view=rev
Log: [KSPROXY] - Implement ISpecifyPropertyPages interface for CInputPin - Implement IKsInterfaceHandler::KsSetPin, IKsInterfaceHandler::KsProcessMediaSamples, IKsInterfaceHandler::KsCompleteIo Modified: trunk/reactos/dll/directx/ksproxy/input_pin.cpp trunk/reactos/dll/directx/ksproxy/interface.cpp trunk/reactos/dll/directx/ksproxy/precomp.h Modified: trunk/reactos/dll/directx/ksproxy/input_pin.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ksproxy/input_…
============================================================================== --- trunk/reactos/dll/directx/ksproxy/input_pin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/input_pin.cpp [iso-8859-1] Mon Mar 15 14:11:31 2010 @@ -52,11 +52,11 @@ public IKsControl, public IKsObject, public IKsPinEx, - public IMemInputPin + public IMemInputPin, + public ISpecifyPropertyPages /* public IQualityControl, public IKsPinPipe, - public ISpecifyPropertyPages, public IStreamBuilder, public IKsPinFactory, public IKsAggregateControl @@ -98,6 +98,9 @@ HRESULT STDMETHODCALLTYPE EndFlush(); HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate); + // ISpecifyPropertyPages + HRESULT STDMETHODCALLTYPE GetPages(CAUUID *pPages); + //IKsObject methods HANDLE STDMETHODCALLTYPE KsGetObjectHandle(); @@ -205,7 +208,12 @@ reinterpret_cast<IKsPinEx*>(*Output)->AddRef(); return NOERROR; } - + else if (IsEqualGUID(refiid, IID_ISpecifyPropertyPages)) + { + *Output = (ISpecifyPropertyPages*)(this); + reinterpret_cast<ISpecifyPropertyPages*>(*Output)->AddRef(); + return NOERROR; + } WCHAR Buffer[MAX_PATH]; LPOLESTR lpstr; @@ -215,6 +223,23 @@ CoTaskMemFree(lpstr); return E_NOINTERFACE; +} + +//------------------------------------------------------------------- +// ISpecifyPropertyPages +// + +HRESULT +STDMETHODCALLTYPE +CInputPin::GetPages(CAUUID *pPages) +{ + if (!pPages) + return E_POINTER; + + pPages->cElems = 0; + pPages->pElems = NULL; + + return S_OK; } //------------------------------------------------------------------- Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/interface.cpp [iso-8859-1] Mon Mar 15 14:11:31 2010 @@ -35,13 +35,26 @@ 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){}; + CKsInterfaceHandler() : m_Ref(0), m_Handle(NULL), m_Pin(0){}; virtual ~CKsInterfaceHandler(){}; protected: LONG m_Ref; HANDLE m_Handle; + IKsPinEx * m_Pin; }; + +typedef struct +{ + KSSTREAM_SEGMENT StreamSegment; + IMediaSample * MediaSample[64]; + + ULONG SampleCount; + ULONG ExtendedSize; + PKSSTREAM_HEADER StreamHeader; + OVERLAPPED Overlapped; +}KSSTREAM_SEGMENT_EXT, *PKSSTREAM_SEGMENT_EXT; + HRESULT STDMETHODCALLTYPE @@ -66,22 +79,43 @@ { HRESULT hr; IKsObject * KsObject; - - // check if IKsObject is supported - hr = KsPin->QueryInterface(IID_IKsObject, (void**)&KsObject); - + IKsPinEx * Pin; + + // get IKsPinEx interface + hr = KsPin->QueryInterface(IID_IKsPinEx, (void**)&Pin); 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; + // 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 + hr = E_UNEXPECTED; + Pin->Release(); + } + else + { + if (m_Pin) + { + // release old interface + m_Pin->Release(); + } + m_Pin = Pin; + } + } + else + { + //release IKsPinEx interface + Pin->Release(); } } @@ -96,19 +130,333 @@ IMediaSample** SampleList, PLONG SampleCount, KSIOOPERATION IoOperation, - PKSSTREAM_SEGMENT *StreamSegment) -{ - OutputDebugString("UNIMPLEMENTED\n"); - return E_NOTIMPL; + PKSSTREAM_SEGMENT *OutStreamSegment) +{ + PKSSTREAM_SEGMENT_EXT StreamSegment; + ULONG ExtendedSize, Index, BytesReturned; + HRESULT hr = S_OK; + + OutputDebugString("CKsInterfaceHandler::KsProcessMediaSamples\n"); + + // sanity check + assert(*SampleCount); + + if (*SampleCount == 0 || *SampleCount < 0) + return E_FAIL; + + // zero stream segment + *OutStreamSegment = NULL; + + // allocate stream segment + StreamSegment = (PKSSTREAM_SEGMENT_EXT)CoTaskMemAlloc(sizeof(KSSTREAM_SEGMENT_EXT)); + if (!StreamSegment) + return E_OUTOFMEMORY; + + // zero stream segment + ZeroMemory(StreamSegment, sizeof(KSSTREAM_SEGMENT_EXT)); + + //allocate event + StreamSegment->StreamSegment.CompletionEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + + if (!StreamSegment->StreamSegment.CompletionEvent) + { + // failed to create event + CoTaskMemFree(StreamSegment); + return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError()); + } + + // increase our own reference count + AddRef(); + + // setup stream segment + StreamSegment->StreamSegment.KsDataTypeHandler = KsDataTypeHandler; + StreamSegment->StreamSegment.KsInterfaceHandler = (IKsInterfaceHandler*)this; + StreamSegment->StreamSegment.IoOperation = IoOperation; + StreamSegment->Overlapped.hEvent = StreamSegment->StreamSegment.CompletionEvent; + + + // ge extension size + ExtendedSize = 0; + if (KsDataTypeHandler) + { + // query extension size + KsDataTypeHandler->KsQueryExtendedSize(&ExtendedSize); + + if (ExtendedSize) + { + // increment reference count + KsDataTypeHandler->AddRef(); + } + else + { + // no need for the datatype handler + StreamSegment->StreamSegment.KsDataTypeHandler = NULL; + } + } + + StreamSegment->ExtendedSize = ExtendedSize; + StreamSegment->SampleCount = (ULONG)*SampleCount; + + // calculate stream header size count + ULONG StreamHeaderSize = StreamSegment->SampleCount * (sizeof(KSSTREAM_HEADER) + ExtendedSize); + + // allocate stream header + StreamSegment->StreamHeader = (PKSSTREAM_HEADER)CoTaskMemAlloc(StreamHeaderSize); + if (!StreamSegment->StreamHeader) + { + // not enough memory + CloseHandle(StreamSegment->StreamSegment.CompletionEvent); + + if (StreamSegment->StreamSegment.KsDataTypeHandler) + StreamSegment->StreamSegment.KsDataTypeHandler->Release(); + + // free stream segment + CoTaskMemFree(StreamSegment); + + //release our reference count + Release(); + return E_OUTOFMEMORY; + } + + // zero stream headers + ZeroMemory(StreamSegment->StreamHeader, StreamHeaderSize); + + PKSSTREAM_HEADER CurStreamHeader = StreamSegment->StreamHeader; + + // initialize all stream headers + for(Index = 0; Index < StreamSegment->SampleCount; Index++) + { + if (ExtendedSize) + { + // initialize extended size + hr = KsDataTypeHandler->KsPrepareIoOperation(SampleList[Index], (CurStreamHeader + 1), IoOperation); + // sanity check + assert(hr == NOERROR); + } + + // query for IMediaSample2 interface + IMediaSample2 * MediaSample; + AM_SAMPLE2_PROPERTIES Properties; + + hr = SampleList[Index]->QueryInterface(IID_IMediaSample2, (void**)&MediaSample); + if (SUCCEEDED(hr)) + { + //get properties + + hr = MediaSample->GetProperties(sizeof(AM_SAMPLE2_PROPERTIES), (BYTE*)&Properties); + + //release IMediaSample2 interface + MediaSample->Release(); + if (FAILED(hr)) + OutputDebugStringW(L"CKsInterfaceHandler::KsProcessMediaSamples MediaSample::GetProperties failed\n"); + } + else + { + OutputDebugStringW(L"CKsInterfaceHandler::KsProcessMediaSamples MediaSample:: only IMediaSample supported\n"); + // get properties + hr = SampleList[Index]->GetPointer((BYTE**)&Properties.pbBuffer); + assert(hr == NOERROR); + hr = SampleList[Index]->GetTime(&Properties.tStart, &Properties.tStop); + assert(hr == NOERROR); + + Properties.dwSampleFlags = 0; + + if (SampleList[Index]->IsDiscontinuity() == S_OK) + Properties.dwSampleFlags |= AM_SAMPLE_DATADISCONTINUITY; + + if (SampleList[Index]->IsPreroll() == S_OK) + Properties.dwSampleFlags |= AM_SAMPLE_PREROLL; + + if (SampleList[Index]->IsSyncPoint() == S_OK) + Properties.dwSampleFlags |= AM_SAMPLE_SPLICEPOINT; + } + + WCHAR Buffer[100]; + swprintf(Buffer, L"BufferLength %lu Property Buffer %p ExtendedSize %u lActual %u\n", Properties.cbBuffer, Properties.pbBuffer, ExtendedSize, Properties.lActual); + OutputDebugStringW(Buffer); + + CurStreamHeader->Size = sizeof(KSSTREAM_HEADER) + ExtendedSize; + CurStreamHeader->PresentationTime.Denominator = 1; + CurStreamHeader->PresentationTime.Numerator = 1; + CurStreamHeader->FrameExtent = Properties.cbBuffer; + CurStreamHeader->Data = Properties.pbBuffer; + + if (IoOperation == KsIoOperation_Write) + { + // set flags + CurStreamHeader->OptionsFlags = Properties.dwSampleFlags; + CurStreamHeader->DataUsed = Properties.lActual; + // increment reference count + SampleList[Index]->AddRef(); + } + + // store sample in stream segment + StreamSegment->MediaSample[Index] = SampleList[Index]; + + // move to next header + CurStreamHeader = (PKSSTREAM_HEADER)((ULONG_PTR)CurStreamHeader + CurStreamHeader->Size); + } + + // submit to device + m_Pin->KsIncrementPendingIoCount(); + + if (DeviceIoControl(m_Handle, + IoOperation == KsIoOperation_Write ? IOCTL_KS_WRITE_STREAM : IOCTL_KS_READ_STREAM, + NULL, 0, + StreamSegment->StreamHeader, + StreamHeaderSize, + &BytesReturned, + &StreamSegment->Overlapped)) + { + // signal completion + SetEvent(StreamSegment->StreamSegment.CompletionEvent); + hr = S_OK; + *OutStreamSegment = (PKSSTREAM_SEGMENT)StreamSegment; + } + else + { + if (GetLastError() == ERROR_IO_PENDING) + { + *OutStreamSegment = (PKSSTREAM_SEGMENT)StreamSegment; + hr = S_OK; + } + } + return hr; } HRESULT STDMETHODCALLTYPE CKsInterfaceHandler::KsCompleteIo( - PKSSTREAM_SEGMENT StreamSegment) -{ - OutputDebugString("UNIMPLEMENTED\n"); - return E_NOTIMPL; + PKSSTREAM_SEGMENT InStreamSegment) +{ + PKSSTREAM_SEGMENT_EXT StreamSegment; + PKSSTREAM_HEADER CurStreamHeader; + DWORD dwError = ERROR_SUCCESS, BytesReturned; + BOOL bOverlapped; + ULONG Index; + HRESULT hr; + IMediaSample2 * MediaSample; + AM_SAMPLE2_PROPERTIES Properties; + REFERENCE_TIME Start, Stop; + + OutputDebugStringW(L"CKsInterfaceHandler::KsCompleteIo\n"); + + // get private stream segment + StreamSegment = (PKSSTREAM_SEGMENT_EXT)InStreamSegment; + + // get result + bOverlapped = GetOverlappedResult(m_Handle, &StreamSegment->Overlapped, &BytesReturned, FALSE); + dwError = GetLastError(); + + CurStreamHeader = StreamSegment->StreamHeader; + + //iterate through all stream headers + for(Index = 0; Index < StreamSegment->SampleCount; Index++) + { + if (!bOverlapped) + { + // operation failed + m_Pin->KsNotifyError(StreamSegment->MediaSample[Index], MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, dwError)); + } + + // query IMediaSample2 interface + hr = StreamSegment->MediaSample[Index]->QueryInterface(IID_IMediaSample2, (void**)&MediaSample); + if (SUCCEEDED(hr)) + { + // media sample properties + hr = MediaSample->GetProperties(sizeof(AM_SAMPLE2_PROPERTIES), (BYTE*)&Properties); + if (SUCCEEDED(hr)) + { + //update media sample properties + Properties.dwTypeSpecificFlags = CurStreamHeader->TypeSpecificFlags; + Properties.dwSampleFlags |= (CurStreamHeader->OptionsFlags & KSSTREAM_HEADER_OPTIONSF_TIMEDISCONTINUITY); + + MediaSample->SetProperties(sizeof(AM_SAMPLE2_PROPERTIES), (BYTE*)&Properties); + } + // release IMediaSample2 interface + MediaSample->Release(); + } + + // was an extended header used + if (StreamSegment->ExtendedSize) + { + // unprepare stream header extension + StreamSegment->StreamSegment.KsDataTypeHandler->KsCompleteIoOperation(StreamSegment->MediaSample[Index], (CurStreamHeader + 1), StreamSegment->StreamSegment.IoOperation, bOverlapped == FALSE); + } + + Start = 0; + Stop = 0; + if (bOverlapped && StreamSegment->StreamSegment.IoOperation == KsIoOperation_Read) + { + // update common media sample details + StreamSegment->MediaSample[Index]->SetSyncPoint((CurStreamHeader->OptionsFlags & KSSTREAM_HEADER_OPTIONSF_SPLICEPOINT)); + StreamSegment->MediaSample[Index]->SetPreroll((CurStreamHeader->OptionsFlags & KSSTREAM_HEADER_OPTIONSF_PREROLL)); + StreamSegment->MediaSample[Index]->SetDiscontinuity((CurStreamHeader->OptionsFlags & KSSTREAM_HEADER_OPTIONSF_DATADISCONTINUITY)); + + if (CurStreamHeader->OptionsFlags & KSSTREAM_HEADER_OPTIONSF_TIMEVALID) + { + // use valid timestamp + Start = CurStreamHeader->PresentationTime.Time; + + if (CurStreamHeader->OptionsFlags & KSSTREAM_HEADER_OPTIONSF_DURATIONVALID) + { + Stop = CurStreamHeader->PresentationTime.Time + CurStreamHeader->Duration; + } + } + } + + // now set time + hr = StreamSegment->MediaSample[Index]->SetTime(&Start, &Stop); + if (FAILED(hr)) + { + // use start time + StreamSegment->MediaSample[Index]->SetTime(&Start, &Start); + } + + // set valid data length + StreamSegment->MediaSample[Index]->SetActualDataLength(CurStreamHeader->DataUsed); + + if (StreamSegment->StreamSegment.IoOperation == KsIoOperation_Read) + { + if (bOverlapped) + { + // deliver sample + m_Pin->KsDeliver(StreamSegment->MediaSample[Index], CurStreamHeader->OptionsFlags); + } + } + else if (StreamSegment->StreamSegment.IoOperation == KsIoOperation_Write) + { + // release media sample reference + StreamSegment->MediaSample[Index]->Release(); + } + + CurStreamHeader = (PKSSTREAM_HEADER)((ULONG_PTR)CurStreamHeader + CurStreamHeader->Size); + } + + // delete stream headers + CoTaskMemFree(StreamSegment->StreamHeader); + + if (StreamSegment->StreamSegment.KsDataTypeHandler) + { + // release reference + StreamSegment->StreamSegment.KsDataTypeHandler->Release(); + } + + // decrement pending i/o count + m_Pin->KsDecrementPendingIoCount(); + + //notify of completion + m_Pin->KsMediaSamplesCompleted(InStreamSegment); + + //destroy stream segment + CoTaskMemFree(StreamSegment); + + //release reference to ourselves + Release(); + + // done + // Event handle is closed by caller + return S_OK; } HRESULT Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/dll/directx/ksproxy/precomp.h [iso-8859-1] Mon Mar 15 14:11:31 2010 @@ -165,3 +165,4 @@ LPVOID * ppv); extern const GUID IID_IKsObject; +extern const GUID IID_IKsPinEx;
14 years, 9 months
1
0
0
0
[cwittich] 46203: [FAULTREP] import faultrep.dll from wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Mar 15 12:45:17 2010 New Revision: 46203 URL:
http://svn.reactos.org/svn/reactos?rev=46203&view=rev
Log: [FAULTREP] import faultrep.dll from wine 1.1.40 Added: trunk/reactos/dll/win32/faultrep/ (with props) trunk/reactos/dll/win32/faultrep/faultrep.c (with props) trunk/reactos/dll/win32/faultrep/faultrep.rbuild (with props) trunk/reactos/dll/win32/faultrep/faultrep.spec (with props) Modified: trunk/reactos/baseaddress.rbuild trunk/reactos/boot/bootdata/packages/reactos.dff trunk/reactos/dll/win32/win32.rbuild Modified: trunk/reactos/baseaddress.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/baseaddress.rbuild?rev=462…
============================================================================== --- trunk/reactos/baseaddress.rbuild [iso-8859-1] (original) +++ trunk/reactos/baseaddress.rbuild [iso-8859-1] Mon Mar 15 12:45:17 2010 @@ -3,6 +3,7 @@ <group xmlns:xi="
http://www.w3.org/2001/XInclude
"> <property name="BASEADDRESS_REGTESTS" value="0x07000000" /> <property name="BASEADDRESS_NOTIFYHOOK" value="0x08000000" /> + <property name="BASEADDRESS_FAULTREP" value="0x107A0000" /> <property name="BASEADDRESS_QMGRPRXY" value="0x1f710000" /> <property name="BASEADDRESS_CRYPTDLG" value="0x209c0000" /> <property name="BASEADDRESS_COMCAT" value="0x20a50000" /> Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Mon Mar 15 12:45:17 2010 @@ -286,6 +286,7 @@ dll\win32\devmgr\devmgr.dll 1 dll\win32\dhcpcsvc\dhcpcsvc.dll 1 dll\win32\dnsapi\dnsapi.dll 1 +dll\win32\faultrep\faultrep.dll 1 dll\win32\fmifs\fmifs.dll 1 dll\win32\fusion\fusion.dll 1 dll\win32\gdi32\gdi32.dll 1 Propchange: trunk/reactos/dll/win32/faultrep/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Mon Mar 15 12:45:17 2010 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/reactos/dll/win32/faultrep/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/reactos/dll/win32/faultrep/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/dll/win32/faultrep/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/reactos/dll/win32/faultrep/faultrep.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/faultrep/faultre…
============================================================================== --- trunk/reactos/dll/win32/faultrep/faultrep.c (added) +++ trunk/reactos/dll/win32/faultrep/faultrep.c [iso-8859-1] Mon Mar 15 12:45:17 2010 @@ -1,0 +1,130 @@ +/* Fault report handling + * + * Copyright 2007 Peter Dons Tychsen + * + * 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 <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winreg.h" +#include "wine/debug.h" +#include "wine/unicode.h" + +#include "errorrep.h" + +WINE_DEFAULT_DEBUG_CHANNEL(faultrep); + +static const WCHAR SZ_EXCLUSIONLIST_KEY[] = { + 'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'P','C','H','e','a','l','t','h','\\', + 'E','r','r','o','r','R','e','p','o','r','t','i','n','g','\\', + 'E','x','c','l','u','s','i','o','n','L','i','s','t', 0}; + +/************************************************************************* + * AddERExcludedApplicationW [FAULTREP.@] + * + * Adds an application to a list of applications for which fault reports + * shouldn't be generated + * + * PARAMS + * lpAppFileName [I] The filename of the application executable + * + * RETURNS + * TRUE on success, FALSE of failure + * + * NOTES + * Wine doesn't use this data but stores it in the registry (in the same place + * as Windows would) in case it will be useful in a future version + * + * According to MSDN this function should succeed even if the user has no write + * access to HKLM. This probably means that there is no error checking. + */ +BOOL WINAPI AddERExcludedApplicationW(LPCWSTR lpAppFileName) +{ + WCHAR *bslash; + DWORD value = 1; + HKEY hkey; + + TRACE("(%s)\n", wine_dbgstr_w(lpAppFileName)); + bslash = strrchrW(lpAppFileName, '\\'); + if (bslash != NULL) + lpAppFileName = bslash + 1; + if (*lpAppFileName == '\0') + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (!RegCreateKeyW(HKEY_LOCAL_MACHINE, SZ_EXCLUSIONLIST_KEY, &hkey)) + { + RegSetValueExW(hkey, lpAppFileName, 0, REG_DWORD, (LPBYTE)&value, sizeof(value)); + RegCloseKey(hkey); + } + + return TRUE; +} + +/************************************************************************* + * AddERExcludedApplicationA [FAULTREP.@] + * + * See AddERExcludedApplicationW + */ +BOOL WINAPI AddERExcludedApplicationA(LPCSTR lpAppFileName) +{ + int len = MultiByteToWideChar(CP_ACP, 0, lpAppFileName, -1, NULL, 0); + WCHAR *wstr; + BOOL ret; + + TRACE("(%s)\n", wine_dbgstr_a(lpAppFileName)); + if (len == 0) + return FALSE; + wstr = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len); + MultiByteToWideChar(CP_ACP, 0, lpAppFileName, -1, wstr, len); + ret = AddERExcludedApplicationW(wstr); + HeapFree(GetProcessHeap(), 0, wstr); + return ret; +} + +/************************************************************************* + * ReportFault [FAULTREP.@] + */ +EFaultRepRetVal WINAPI ReportFault(LPEXCEPTION_POINTERS pep, DWORD dwOpt) +{ + FIXME("%p 0x%x stub\n", pep, dwOpt); + return frrvOk; +} + +/*********************************************************************** + * DllMain. + */ +BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) +{ + switch(reason) + { + case DLL_WINE_PREATTACH: + return FALSE; + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(inst); + break; + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} Propchange: trunk/reactos/dll/win32/faultrep/faultrep.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/faultrep/faultrep.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/faultrep/faultre…
============================================================================== --- trunk/reactos/dll/win32/faultrep/faultrep.rbuild (added) +++ trunk/reactos/dll/win32/faultrep/faultrep.rbuild [iso-8859-1] Mon Mar 15 12:45:17 2010 @@ -1,0 +1,9 @@ +<module name="faultrep" type="win32dll" baseaddress="${BASEADDRESS_FAULTREP}" installbase="system32" installname="faultrep.dll"> + <importlibrary definition="faultrep.spec" /> + <include base="fusion">.</include> + <include base="ReactOS">include/reactos/wine</include> + <define name="__WINESRC__" /> + <library>wine</library> + <library>advapi32</library> + <file>faultrep.c</file> +</module> Propchange: trunk/reactos/dll/win32/faultrep/faultrep.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/faultrep/faultrep.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/faultrep/faultre…
============================================================================== --- trunk/reactos/dll/win32/faultrep/faultrep.spec (added) +++ trunk/reactos/dll/win32/faultrep/faultrep.spec [iso-8859-1] Mon Mar 15 12:45:17 2010 @@ -1,0 +1,14 @@ +@ stdcall AddERExcludedApplicationA(str) +@ stdcall AddERExcludedApplicationW(wstr) +@ stub CreateMinidumpA +@ stub CreateMinidumpW +@ stub ReportEREvent +@ stub ReportEREventDW +@ stdcall ReportFault(ptr long) +@ stub ReportFaultDWM +@ stub ReportFaultFromQueue +@ stub ReportFaultToQueue +@ stub ReportHang +@ stub ReportKernelFaultA +@ stub ReportKernelFaultDWW +@ stub ReportKernelFaultW Propchange: trunk/reactos/dll/win32/faultrep/faultrep.spec ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/win32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/win32.rbuild?rev…
============================================================================== --- trunk/reactos/dll/win32/win32.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/win32.rbuild [iso-8859-1] Mon Mar 15 12:45:17 2010 @@ -103,6 +103,9 @@ <directory name="dnsapi"> <xi:include href="dnsapi/dnsapi.rbuild" /> </directory> +<directory name="faultrep"> + <xi:include href="faultrep/faultrep.rbuild" /> +</directory> <directory name="fmifs"> <xi:include href="fmifs/fmifs.rbuild" /> </directory>
14 years, 9 months
1
0
0
0
[cwittich] 46202: [WININET] sync wininet with wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Mar 15 12:35:51 2010 New Revision: 46202 URL:
http://svn.reactos.org/svn/reactos?rev=46202&view=rev
Log: [WININET] sync wininet with wine 1.1.40 Added: trunk/reactos/dll/win32/wininet/wininet_Lt.rc (with props) Modified: trunk/reactos/dll/win32/wininet/cookie.c trunk/reactos/dll/win32/wininet/dialogs.c trunk/reactos/dll/win32/wininet/ftp.c trunk/reactos/dll/win32/wininet/http.c trunk/reactos/dll/win32/wininet/internet.c trunk/reactos/dll/win32/wininet/internet.h trunk/reactos/dll/win32/wininet/netconnection.c trunk/reactos/dll/win32/wininet/resource.h trunk/reactos/dll/win32/wininet/rsrc.rc trunk/reactos/dll/win32/wininet/urlcache.c trunk/reactos/dll/win32/wininet/utility.c trunk/reactos/dll/win32/wininet/wininet.rbuild trunk/reactos/dll/win32/wininet/wininet.spec trunk/reactos/dll/win32/wininet/wininet_Bg.rc trunk/reactos/dll/win32/wininet/wininet_Cs.rc trunk/reactos/dll/win32/wininet/wininet_Da.rc trunk/reactos/dll/win32/wininet/wininet_De.rc trunk/reactos/dll/win32/wininet/wininet_En.rc trunk/reactos/dll/win32/wininet/wininet_Eo.rc trunk/reactos/dll/win32/wininet/wininet_Es.rc trunk/reactos/dll/win32/wininet/wininet_Fi.rc trunk/reactos/dll/win32/wininet/wininet_Fr.rc trunk/reactos/dll/win32/wininet/wininet_Hu.rc trunk/reactos/dll/win32/wininet/wininet_It.rc trunk/reactos/dll/win32/wininet/wininet_Ja.rc trunk/reactos/dll/win32/wininet/wininet_Ko.rc trunk/reactos/dll/win32/wininet/wininet_Nl.rc trunk/reactos/dll/win32/wininet/wininet_No.rc trunk/reactos/dll/win32/wininet/wininet_Pl.rc trunk/reactos/dll/win32/wininet/wininet_Pt.rc trunk/reactos/dll/win32/wininet/wininet_Ro.rc trunk/reactos/dll/win32/wininet/wininet_Ru.rc trunk/reactos/dll/win32/wininet/wininet_Si.rc trunk/reactos/dll/win32/wininet/wininet_Sv.rc trunk/reactos/dll/win32/wininet/wininet_Tr.rc trunk/reactos/dll/win32/wininet/wininet_Uk.rc trunk/reactos/dll/win32/wininet/wininet_Zh.rc [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/wininet/cookie.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/cookie.c…
Modified: trunk/reactos/dll/win32/wininet/dialogs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/dialogs.…
Modified: trunk/reactos/dll/win32/wininet/ftp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/ftp.c?re…
Modified: trunk/reactos/dll/win32/wininet/http.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/http.c?r…
Modified: trunk/reactos/dll/win32/wininet/internet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/internet…
Modified: trunk/reactos/dll/win32/wininet/internet.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/internet…
Modified: trunk/reactos/dll/win32/wininet/netconnection.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/netconne…
Modified: trunk/reactos/dll/win32/wininet/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/resource…
Modified: trunk/reactos/dll/win32/wininet/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/rsrc.rc?…
Modified: trunk/reactos/dll/win32/wininet/urlcache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/urlcache…
Modified: trunk/reactos/dll/win32/wininet/utility.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/utility.…
Modified: trunk/reactos/dll/win32/wininet/wininet.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet.…
Modified: trunk/reactos/dll/win32/wininet/wininet.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet.…
Modified: trunk/reactos/dll/win32/wininet/wininet_Bg.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Cs.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Da.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Eo.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Es.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Fi.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Hu.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_It.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Ja.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Added: trunk/reactos/dll/win32/wininet/wininet_Lt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Nl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Pl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Pt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Ro.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Ru.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Si.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Sv.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Tr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
Modified: trunk/reactos/dll/win32/wininet/wininet_Zh.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
14 years, 9 months
1
0
0
0
[mkupfer] 46201: Slides for presentation at Chemnitz Linux Days on 13th + 14th March 2010 (German only)
by mkupfer@svn.reactos.org
Author: mkupfer Date: Mon Mar 15 01:28:14 2010 New Revision: 46201 URL:
http://svn.reactos.org/svn/reactos?rev=46201&view=rev
Log: Slides for presentation at Chemnitz Linux Days on 13th + 14th March 2010 (German only) Added: trunk/press-media/presentations/CLT-2010/ trunk/press-media/presentations/CLT-2010/CLT2010.odp (with props) Added: trunk/press-media/presentations/CLT-2010/CLT2010.odp URL:
http://svn.reactos.org/svn/reactos/trunk/press-media/presentations/CLT-2010…
============================================================================== Binary file - no diff available. Propchange: trunk/press-media/presentations/CLT-2010/CLT2010.odp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream
14 years, 10 months
1
0
0
0
[hpoussin] 46200: [ntoskrnl] Better fix for correct display of loaded drivers
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun Mar 14 20:21:38 2010 New Revision: 46200 URL:
http://svn.reactos.org/svn/reactos?rev=46200&view=rev
Log: [ntoskrnl] Better fix for correct display of loaded drivers Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Sun Mar 14 20:21:38 2010 @@ -150,6 +150,39 @@ } /* + * RETURNS + * TRUE if String2 contains String1 as a suffix. + */ +BOOLEAN +NTAPI +IopSuffixUnicodeString( + IN PCUNICODE_STRING String1, + IN PCUNICODE_STRING String2) +{ + PWCHAR pc1; + PWCHAR pc2; + ULONG Length; + + if (String2->Length < String1->Length) + return FALSE; + + Length = String1->Length / 2; + pc1 = String1->Buffer; + pc2 = &String2->Buffer[String2->Length / sizeof(WCHAR) - Length]; + + if (pc1 && pc2) + { + while (Length--) + { + if( *pc1++ != *pc2++ ) + return FALSE; + } + return TRUE; + } + return FALSE; +} + +/* * IopDisplayLoadingMessage * * Display 'Loading XXX...' message. @@ -161,19 +194,16 @@ IopDisplayLoadingMessage(PUNICODE_STRING ServiceName) { CHAR TextBuffer[256]; + UNICODE_STRING DotSys = RTL_CONSTANT_STRING(L".SYS"); if (ExpInTextModeSetup) return; RtlUpcaseUnicodeString(ServiceName, ServiceName, FALSE); snprintf(TextBuffer, sizeof(TextBuffer), - "%s%s%s\\%wZ", + "%s%sSystem32\\Drivers\\%wZ%s\n", KeLoaderBlock->ArcBootDeviceName, KeLoaderBlock->NtBootPathName, - "System32\\Drivers", - ServiceName); - if (!strstr(TextBuffer, ".sys")) - strcat(TextBuffer, ".sys\n"); - else - strcat(TextBuffer, "\n"); + ServiceName, + IopSuffixUnicodeString(&DotSys, ServiceName) ? "" : ".SYS"); HalDisplayString(TextBuffer); }
14 years, 10 months
1
0
0
0
[ekohl] 46199: [EVENTLOG] - Set the current service status from the service control handler. - Fix type declarations. - ElfrOpenELA/ElfrRegisterEventSourceA: Do not call the Unicode functions because in this case it is easier to do things yourself. - Implement ElfrGetLogInformation partially. - Bind client to the EventLog Pipe. - Use RtlInitAnsiString and RtlInitUnicodeString instead of building strings manually. - GetEventLogInformation: Check for valid dwInfoLevel.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Mar 14 13:26:49 2010 New Revision: 46199 URL:
http://svn.reactos.org/svn/reactos?rev=46199&view=rev
Log: [EVENTLOG] - Set the current service status from the service control handler. - Fix type declarations. - ElfrOpenELA/ElfrRegisterEventSourceA: Do not call the Unicode functions because in this case it is easier to do things yourself. - Implement ElfrGetLogInformation partially. - Bind client to the EventLog Pipe. - Use RtlInitAnsiString and RtlInitUnicodeString instead of building strings manually. - GetEventLogInformation: Check for valid dwInfoLevel. Modified: trunk/reactos/base/services/eventlog/eventlog.c trunk/reactos/base/services/eventlog/eventlog.h trunk/reactos/base/services/eventlog/rpc.c trunk/reactos/dll/win32/advapi32/service/eventlog.c Modified: trunk/reactos/base/services/eventlog/eventlog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/eve…
============================================================================== --- trunk/reactos/base/services/eventlog/eventlog.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/eventlog.c [iso-8859-1] Sun Mar 14 13:26:49 2010 @@ -21,10 +21,35 @@ { NULL, NULL } }; +SERVICE_STATUS ServiceStatus; +SERVICE_STATUS_HANDLE ServiceStatusHandle; + BOOL onLiveCD = FALSE; // On livecd events will go to debug output only HANDLE MyHeap = NULL; /* FUNCTIONS ****************************************************************/ + +static VOID +UpdateServiceStatus(DWORD dwState) +{ + ServiceStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; + ServiceStatus.dwCurrentState = dwState; + ServiceStatus.dwControlsAccepted = 0; + ServiceStatus.dwWin32ExitCode = 0; + ServiceStatus.dwServiceSpecificExitCode = 0; + ServiceStatus.dwCheckPoint = 0; + + if (dwState == SERVICE_START_PENDING || + dwState == SERVICE_STOP_PENDING || + dwState == SERVICE_PAUSE_PENDING || + dwState == SERVICE_CONTINUE_PENDING) + ServiceStatus.dwWaitHint = 10000; + else + ServiceStatus.dwWaitHint = 0; + + SetServiceStatus(ServiceStatusHandle, + &ServiceStatus); +} static DWORD WINAPI ServiceControlHandler(DWORD dwControl, @@ -32,9 +57,40 @@ LPVOID lpEventData, LPVOID lpContext) { - /* FIXME */ - DPRINT1("ServiceControlHandler() called (control code %lu)\n", dwControl); - return ERROR_SUCCESS; + DPRINT("ServiceControlHandler() called\n"); + + switch (dwControl) + { + case SERVICE_CONTROL_STOP: + DPRINT(" SERVICE_CONTROL_STOP received\n"); + UpdateServiceStatus(SERVICE_STOPPED); + return ERROR_SUCCESS; + + case SERVICE_CONTROL_PAUSE: + DPRINT(" SERVICE_CONTROL_PAUSE received\n"); + UpdateServiceStatus(SERVICE_PAUSED); + return ERROR_SUCCESS; + + case SERVICE_CONTROL_CONTINUE: + DPRINT(" SERVICE_CONTROL_CONTINUE received\n"); + UpdateServiceStatus(SERVICE_RUNNING); + return ERROR_SUCCESS; + + case SERVICE_CONTROL_INTERROGATE: + DPRINT(" SERVICE_CONTROL_INTERROGATE received\n"); + SetServiceStatus(ServiceStatusHandle, + &ServiceStatus); + return ERROR_SUCCESS; + + case SERVICE_CONTROL_SHUTDOWN: + DPRINT(" SERVICE_CONTROL_SHUTDOWN received\n"); + UpdateServiceStatus(SERVICE_STOPPED); + return ERROR_SUCCESS; + + default : + DPRINT1(" Control %lu received\n"); + return ERROR_CALL_NOT_IMPLEMENTED; + } } @@ -83,8 +139,6 @@ ServiceMain(DWORD argc, LPWSTR *argv) { - SERVICE_STATUS ServiceStatus; - SERVICE_STATUS_HANDLE ServiceStatusHandle; DWORD dwError; UNREFERENCED_PARAMETER(argc); @@ -102,30 +156,19 @@ 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); + UpdateServiceStatus(SERVICE_START_PENDING); dwError = ServiceInit(); if (dwError != ERROR_SUCCESS) { - DPRINT1("Service stopped\n"); - ServiceStatus.dwCurrentState = SERVICE_STOPPED; + DPRINT("Service stopped (dwError: %lu\n", dwError); + UpdateServiceStatus(SERVICE_START_PENDING); } else { - ServiceStatus.dwCurrentState = SERVICE_RUNNING; - } - - SetServiceStatus(ServiceStatusHandle, - &ServiceStatus); + DPRINT("Service started\n"); + UpdateServiceStatus(SERVICE_RUNNING); + } DPRINT("ServiceMain() done\n"); } Modified: trunk/reactos/base/services/eventlog/eventlog.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/eve…
============================================================================== --- trunk/reactos/base/services/eventlog/eventlog.h [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/eventlog.h [iso-8859-1] Sun Mar 14 13:26:49 2010 @@ -44,7 +44,8 @@ #define ELF_LOGFILE_ARCHIVE_SET 8 /* FIXME: MSDN reads that the following two structs are in winnt.h. Are they? */ -typedef struct _EVENTLOGHEADER { +typedef struct _EVENTLOGHEADER +{ ULONG HeaderSize; ULONG Signature; ULONG MajorVersion; @@ -59,7 +60,8 @@ ULONG EndHeaderSize; } EVENTLOGHEADER, *PEVENTLOGHEADER; -typedef struct _EVENTLOGEOF { +typedef struct _EVENTLOGEOF +{ ULONG RecordSizeBeginning; ULONG Ones; ULONG Twos; @@ -72,13 +74,13 @@ ULONG RecordSizeEnd; } EVENTLOGEOF, *PEVENTLOGEOF; -typedef struct +typedef struct _EVENT_OFFSET_INFO { ULONG EventNumber; ULONG EventOffset; } EVENT_OFFSET_INFO, *PEVENT_OFFSET_INFO; -typedef struct +typedef struct _LOGFILE { HANDLE hFile; EVENTLOGHEADER Header; Modified: trunk/reactos/base/services/eventlog/rpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/rpc…
============================================================================== --- trunk/reactos/base/services/eventlog/rpc.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/rpc.c [iso-8859-1] Sun Mar 14 13:26:49 2010 @@ -480,45 +480,29 @@ DWORD MinorVersion, IELF_HANDLE *LogHandle) { - UNICODE_STRING UNCServerNameW = { 0, 0, NULL }; - UNICODE_STRING ModuleNameW = { 0, 0, NULL }; - UNICODE_STRING RegModuleNameW = { 0, 0, NULL }; - NTSTATUS Status; - - if (UNCServerName && - !RtlCreateUnicodeStringFromAsciiz(&UNCServerNameW, UNCServerName)) - { - return STATUS_NO_MEMORY; - } - - if (ModuleName && - !RtlAnsiStringToUnicodeString(&ModuleNameW, (PANSI_STRING)ModuleName, TRUE)) - { - RtlFreeUnicodeString(&UNCServerNameW); - return STATUS_NO_MEMORY; - } - - if (RegModuleName && - !RtlAnsiStringToUnicodeString(&RegModuleNameW, (PANSI_STRING)RegModuleName, TRUE)) - { - RtlFreeUnicodeString(&UNCServerNameW); - RtlFreeUnicodeString(&ModuleNameW); - return STATUS_NO_MEMORY; - } - - Status = ElfrOpenELW( - UNCServerName ? UNCServerNameW.Buffer : NULL, - ModuleName ? (PRPC_UNICODE_STRING)&ModuleNameW : NULL, - RegModuleName ? (PRPC_UNICODE_STRING)&RegModuleNameW : NULL, - MajorVersion, - MinorVersion, - LogHandle); - - RtlFreeUnicodeString(&UNCServerNameW); + UNICODE_STRING ModuleNameW; + + if ((MajorVersion != 1) || (MinorVersion != 1)) + return STATUS_INVALID_PARAMETER; + + /* RegModuleName must be an empty string */ + if (RegModuleName->Length > 0) + return STATUS_INVALID_PARAMETER; + + RtlAnsiStringToUnicodeString(&ModuleNameW, (PANSI_STRING)ModuleName, TRUE); + + /* FIXME: Must verify that caller has read access */ + + *LogHandle = ElfCreateEventLogHandle(ModuleNameW.Buffer, FALSE); + RtlFreeUnicodeString(&ModuleNameW); - RtlFreeUnicodeString(&RegModuleNameW); - - return Status; + + if (*LogHandle == NULL) + { + return STATUS_INVALID_PARAMETER; + } + + return STATUS_SUCCESS; } @@ -531,45 +515,32 @@ DWORD MinorVersion, IELF_HANDLE *LogHandle) { - UNICODE_STRING UNCServerNameW = { 0, 0, NULL }; UNICODE_STRING ModuleNameW = { 0, 0, NULL }; - - if (UNCServerName && - !RtlCreateUnicodeStringFromAsciiz(&UNCServerNameW, UNCServerName)) - { - return STATUS_NO_MEMORY; - } if (ModuleName && !RtlAnsiStringToUnicodeString(&ModuleNameW, (PANSI_STRING)ModuleName, TRUE)) { - RtlFreeUnicodeString(&UNCServerNameW); return STATUS_NO_MEMORY; } /* RegModuleName must be an empty string */ if (RegModuleName->Length > 0) { - RtlFreeUnicodeString(&UNCServerNameW); RtlFreeUnicodeString(&ModuleNameW); return STATUS_INVALID_PARAMETER; } if ((MajorVersion != 1) || (MinorVersion != 1)) { - RtlFreeUnicodeString(&UNCServerNameW); RtlFreeUnicodeString(&ModuleNameW); return STATUS_INVALID_PARAMETER; } - /*FIXME: UNCServerName must specify the server or empty for local */ - - /*FIXME: Must verify that caller has write access */ + /* FIXME: Must verify that caller has write access */ *LogHandle = ElfCreateEventLogHandle(ModuleNameW.Buffer, TRUE); - RtlFreeUnicodeString(&UNCServerNameW); RtlFreeUnicodeString(&ModuleNameW); return STATUS_SUCCESS; @@ -661,8 +632,32 @@ DWORD cbBufSize, DWORD *pcbBytesNeeded) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + NTSTATUS Status = STATUS_SUCCESS; + + /* FIXME: check handle first */ + + switch (InfoLevel) + { + case EVENTLOG_FULL_INFO: + { + LPEVENTLOG_FULL_INFORMATION efi = (LPEVENTLOG_FULL_INFORMATION)Buffer; + + *pcbBytesNeeded = sizeof(EVENTLOG_FULL_INFORMATION); + if (cbBufSize < sizeof(EVENTLOG_FULL_INFORMATION)) + { + return STATUS_BUFFER_TOO_SMALL; + } + + efi->dwFull = 0; /* FIXME */ + } + break; + + default: + Status = STATUS_INVALID_LEVEL; + break; + } + + return Status; } Modified: trunk/reactos/dll/win32/advapi32/service/eventlog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
============================================================================== --- trunk/reactos/dll/win32/advapi32/service/eventlog.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/service/eventlog.c [iso-8859-1] Sun Mar 14 13:26:49 2010 @@ -42,7 +42,7 @@ status = RpcStringBindingComposeA(NULL, (UCHAR *)"ncacn_np", (UCHAR *)UNCServerName, - (UCHAR *)"\\pipe\\ntsvcs", + (UCHAR *)"\\pipe\\EventLog", NULL, (UCHAR **)&pszStringBinding); if (status) @@ -147,20 +147,17 @@ BackupEventLogA(IN HANDLE hEventLog, IN LPCSTR lpBackupFileName) { - RPC_STRING BackupFileName; + ANSI_STRING BackupFileName; NTSTATUS Status; TRACE("%p, %s\n", hEventLog, lpBackupFileName); - BackupFileName.Buffer = (LPSTR)lpBackupFileName; - BackupFileName.Length = BackupFileName.MaximumLength = - lpBackupFileName ? strlen(lpBackupFileName) : 0; - BackupFileName.MaximumLength += sizeof(CHAR); + RtlInitAnsiString(&BackupFileName, lpBackupFileName); RpcTryExcept { Status = ElfrBackupELFA(hEventLog, - &BackupFileName); + (PRPC_STRING)&BackupFileName); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) { @@ -188,20 +185,17 @@ BackupEventLogW(IN HANDLE hEventLog, IN LPCWSTR lpBackupFileName) { - RPC_UNICODE_STRING BackupFileName; + UNICODE_STRING BackupFileName; NTSTATUS Status; TRACE("%p, %s\n", hEventLog, debugstr_w(lpBackupFileName)); - BackupFileName.Buffer = (LPWSTR)lpBackupFileName; - BackupFileName.Length = BackupFileName.MaximumLength = - lpBackupFileName ? wcslen(lpBackupFileName) * sizeof(WCHAR) : 0; - BackupFileName.MaximumLength += sizeof(WCHAR); + RtlInitUnicodeString(&BackupFileName, lpBackupFileName); RpcTryExcept { Status = ElfrBackupELFW(hEventLog, - &BackupFileName); + (PRPC_UNICODE_STRING)&BackupFileName); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) { @@ -226,20 +220,17 @@ ClearEventLogA(IN HANDLE hEventLog, IN LPCSTR lpBackupFileName) { - RPC_STRING BackupFileName; + ANSI_STRING BackupFileName; NTSTATUS Status; TRACE("%p, %s\n", hEventLog, lpBackupFileName); - BackupFileName.Buffer = (LPSTR)lpBackupFileName; - BackupFileName.Length = BackupFileName.MaximumLength = - lpBackupFileName ? strlen(lpBackupFileName) : 0; - BackupFileName.MaximumLength += sizeof(CHAR); + RtlInitAnsiString(&BackupFileName, lpBackupFileName); RpcTryExcept { Status = ElfrClearELFA(hEventLog, - &BackupFileName); + (PRPC_STRING)&BackupFileName); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) { @@ -264,20 +255,17 @@ ClearEventLogW(IN HANDLE hEventLog, IN LPCWSTR lpBackupFileName) { - RPC_UNICODE_STRING BackupFileName; + UNICODE_STRING BackupFileName; NTSTATUS Status; TRACE("%p, %s\n", hEventLog, debugstr_w(lpBackupFileName)); - BackupFileName.Buffer = (LPWSTR)lpBackupFileName; - BackupFileName.Length = BackupFileName.MaximumLength = - lpBackupFileName ? wcslen(lpBackupFileName) * sizeof(WCHAR) : 0; - BackupFileName.MaximumLength += sizeof(WCHAR); + RtlInitUnicodeString(&BackupFileName,lpBackupFileName); RpcTryExcept { Status = ElfrClearELFW(hEventLog, - &BackupFileName); + (PRPC_UNICODE_STRING)&BackupFileName); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) { @@ -380,6 +368,12 @@ { NTSTATUS Status; + if (dwInfoLevel != EVENTLOG_FULL_INFO) + { + SetLastError(ERROR_INVALID_LEVEL); + return FALSE; + } + RpcTryExcept { Status = ElfrGetLogInformation(hEventLog, @@ -562,21 +556,18 @@ OpenBackupEventLogW(IN LPCWSTR lpUNCServerName, IN LPCWSTR lpFileName) { - RPC_UNICODE_STRING FileName; + UNICODE_STRING FileName; IELF_HANDLE LogHandle; NTSTATUS Status; TRACE("%s, %s\n", debugstr_w(lpUNCServerName), debugstr_w(lpFileName)); - FileName.Buffer = (LPWSTR)lpFileName; - FileName.Length = FileName.MaximumLength = - lpFileName ? wcslen(lpFileName) * sizeof(WCHAR) : 0; - FileName.MaximumLength += sizeof(WCHAR); + RtlInitUnicodeString(&FileName, lpFileName); RpcTryExcept { Status = ElfrOpenBELW((LPWSTR)lpUNCServerName, - &FileName, + (PRPC_UNICODE_STRING)&FileName, 1, 1, &LogHandle); @@ -903,21 +894,18 @@ RegisterEventSourceW(IN LPCWSTR lpUNCServerName, IN LPCWSTR lpSourceName) { - RPC_UNICODE_STRING SourceName; + UNICODE_STRING SourceName; IELF_HANDLE LogHandle; NTSTATUS Status; TRACE("%s, %s\n", debugstr_w(lpUNCServerName), debugstr_w(lpSourceName)); - SourceName.Buffer = (LPWSTR)lpSourceName; - SourceName.Length = SourceName.MaximumLength = - lpSourceName ? wcslen(lpSourceName) * sizeof(WCHAR) : 0; - SourceName.MaximumLength += sizeof(WCHAR); + RtlInitUnicodeString(&SourceName, lpSourceName); RpcTryExcept { Status = ElfrRegisterEventSourceW((LPWSTR)lpUNCServerName, - &SourceName, + (PRPC_UNICODE_STRING)&SourceName, &EmptyStringU, 1, 1,
14 years, 10 months
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200