winehq.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
February
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2010
----- 2025 -----
February 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
783 discussions
Start a n
N
ew thread
Dan Kegel : ntdll: Fix leak in test_symlinks.
by Alexandre Julliard
15 Feb '10
15 Feb '10
Module: wine Branch: master Commit: 1aa3308fa5516b584c641f58ea2562ce23cd649b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1aa3308fa5516b584c641f58e…
Author: Dan Kegel <dank(a)kegel.com> Date: Sat Feb 13 08:30:29 2010 -0800 ntdll: Fix leak in test_symlinks. --- dlls/ntdll/tests/reg.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index a4802c8..48de5a5 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -748,6 +748,8 @@ static void test_symlinks(void) status = pNtDeleteKey( root ); ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status ); pNtClose( root ); + + pRtlFreeHeap(GetProcessHeap(), 0, target); } START_TEST(reg)
1
0
0
0
Kusanagi Kouichi : user32: Consolidate empty string.
by Alexandre Julliard
15 Feb '10
15 Feb '10
Module: wine Branch: master Commit: ccab177159ad37dd569785baa6c8ddb852729bd0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ccab177159ad37dd569785baa…
Author: Kusanagi Kouichi <slash(a)ac.auone-net.jp> Date: Sat Feb 13 11:38:21 2010 +0900 user32: Consolidate empty string. --- dlls/user32/edit.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 5bdef8a..0c9287c 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -169,6 +169,7 @@ typedef struct (LPARAM)(es->hwndSelf)); \ } while(0) +static const WCHAR empty_stringW[] = {0}; /********************************************************************* * @@ -2878,8 +2879,7 @@ static void EDIT_WM_Paste(EDITSTATE *es) } else if (es->style & ES_PASSWORD) { /* clear selected text in password edit box even with empty clipboard */ - const WCHAR empty_strW[] = { 0 }; - EDIT_EM_ReplaceSel(es, TRUE, empty_strW, TRUE, TRUE); + EDIT_EM_ReplaceSel(es, TRUE, empty_stringW, TRUE, TRUE); } CloseClipboard(); } @@ -2921,8 +2921,6 @@ static void EDIT_WM_Copy(EDITSTATE *es) */ static inline void EDIT_WM_Clear(EDITSTATE *es) { - static const WCHAR empty_stringW[] = {0}; - /* Protect read-only edit control from modification */ if(es->style & ES_READONLY) return; @@ -3674,7 +3672,6 @@ static void EDIT_WM_SetText(EDITSTATE *es, LPCWSTR text, BOOL unicode) } else { - static const WCHAR empty_stringW[] = {0}; TRACE("<NULL>\n"); EDIT_EM_ReplaceSel(es, FALSE, empty_stringW, FALSE, FALSE); } @@ -4189,7 +4186,6 @@ static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es) if (es->composition_len == 0 && es->selection_start != es->selection_end) { - static const WCHAR empty_stringW[] = {0}; EDIT_EM_ReplaceSel(es, TRUE, empty_stringW, TRUE, TRUE); es->composition_start = es->selection_end; } @@ -4929,7 +4925,6 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B case WM_IME_ENDCOMPOSITION: if (es->composition_len > 0) { - static const WCHAR empty_stringW[] = {0}; EDIT_EM_ReplaceSel(es, TRUE, empty_stringW, TRUE, TRUE); es->selection_end = es->selection_start; es->composition_len= 0;
1
0
0
0
Jeremy White : wineps.drv: Prevent psdrv tracing from crashing on Solaris.
by Alexandre Julliard
15 Feb '10
15 Feb '10
Module: wine Branch: master Commit: b8fbf9a1c2cbecce4032fdc9320c96da3b1263d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b8fbf9a1c2cbecce4032fdc93…
Author: Jeremy White <jwhite(a)winehq.org> Date: Fri Feb 12 13:50:50 2010 -0600 wineps.drv: Prevent psdrv tracing from crashing on Solaris. --- dlls/wineps.drv/driver.c | 2 +- dlls/wineps.drv/ppd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wineps.drv/driver.c b/dlls/wineps.drv/driver.c index fa07775..25cf0eb 100644 --- a/dlls/wineps.drv/driver.c +++ b/dlls/wineps.drv/driver.c @@ -327,7 +327,7 @@ INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput if(!pi) return -1; TRACE("(Driver=%s, hwnd=%p, devOut=%p, Device='%s', Port='%s', devIn=%p, Profile='%s', Mode=%04x)\n", - lpszDriver, hwnd, lpdmOutput, lpszDevice, lpszPort, lpdmInput, lpszProfile, dwMode); + lpszDriver, hwnd, lpdmOutput, lpszDevice, lpszPort, lpdmInput, debugstr_a(lpszProfile), dwMode); /* If dwMode == 0, return size of DEVMODE structure */ if(!dwMode) diff --git a/dlls/wineps.drv/ppd.c b/dlls/wineps.drv/ppd.c index e29bbc9..c2c422d 100644 --- a/dlls/wineps.drv/ppd.c +++ b/dlls/wineps.drv/ppd.c @@ -1015,8 +1015,8 @@ PPD *PSDRV_ParsePPD(char *fname) for(slot = ppd->InputSlots; slot; slot = slot->next) TRACE("INPUTSLOTS '%s' Name '%s' (%d) Invocation '%s'\n", - slot->Name, slot->FullName, slot->WinBin, - slot->InvocationString); + debugstr_a(slot->Name), slot->FullName, slot->WinBin, + debugstr_a(slot->InvocationString)); } fclose(fp);
1
0
0
0
Paul Chitescu : qedit: Add media type enumerator to SampleGrabber.
by Alexandre Julliard
15 Feb '10
15 Feb '10
Module: wine Branch: master Commit: 2d5ea4b5d5f7e74aa13a8a8dffb943e977d033f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d5ea4b5d5f7e74aa13a8a8df…
Author: Paul Chitescu <paulc(a)voip.null.ro> Date: Fri Feb 12 21:16:14 2010 +0200 qedit: Add media type enumerator to SampleGrabber. --- dlls/qedit/samplegrabber.c | 160 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 158 insertions(+), 2 deletions(-) diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index 6b46a27..b6082f1 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -37,6 +37,7 @@ static WCHAR const pin_in_name[] = { 'I', 'n', 0 }; static WCHAR const pin_out_name[] = { 'O', 'u', 't', 0 }; IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount); +IEnumMediaTypes *mediaenum_create(AM_MEDIA_TYPE *mtype); /* Fixed pins enumerator, holds filter referenced */ typedef struct _PE_Impl { @@ -190,6 +191,160 @@ IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount) } +/* Single media type enumerator */ +typedef struct _ME_Impl { + IEnumMediaTypes me; + LONG refCount; + BOOL past; + AM_MEDIA_TYPE mtype; +} ME_Impl; + + +/* IEnumMediaTypes interface implementation */ + +/* IUnknown */ +static ULONG WINAPI +Single_IEnumMediaTypes_AddRef(IEnumMediaTypes *iface) +{ + ME_Impl *This = (ME_Impl *)iface; + ULONG refCount = InterlockedIncrement(&This->refCount); + TRACE("(%p) new ref = %u\n", This, refCount); + return refCount; +} + +/* IUnknown */ +static ULONG WINAPI +Single_IEnumMediaTypes_Release(IEnumMediaTypes *iface) +{ + ME_Impl *This = (ME_Impl *)iface; + ULONG refCount = InterlockedDecrement(&This->refCount); + TRACE("(%p) new ref = %u\n", This, refCount); + if (refCount == 0) + { + if (This->mtype.pbFormat) + CoTaskMemFree(This->mtype.pbFormat); + CoTaskMemFree(This); + return 0; + } + return refCount; +} + +/* IUnknown */ +static HRESULT WINAPI +Single_IEnumMediaTypes_QueryInterface(IEnumMediaTypes *iface, REFIID riid, void **ppvObject) +{ + ME_Impl *This = (ME_Impl *)iface; + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IEnumMediaTypes)) { + Single_IEnumMediaTypes_AddRef(iface); + *ppvObject = &(This->me); + return S_OK; + } + *ppvObject = NULL; + WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppvObject); + return E_NOINTERFACE; +} + +/* IEnumMediaTypes */ +static HRESULT WINAPI +Single_IEnumMediaTypes_Next(IEnumMediaTypes *iface, ULONG nTypes, AM_MEDIA_TYPE **types, ULONG *fetched) +{ + ME_Impl *This = (ME_Impl *)iface; + ULONG count = 0; + TRACE("(%p)->(%u, %p, %p)\n", This, nTypes, types, fetched); + if (!nTypes) + return E_INVALIDARG; + if (!types || ((nTypes != 1) && !fetched)) + return E_POINTER; + if (!This->past) { + AM_MEDIA_TYPE *mtype = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); + *mtype = This->mtype; + if (mtype->cbFormat) { + mtype->pbFormat = CoTaskMemAlloc(mtype->cbFormat); + CopyMemory(mtype->pbFormat, This->mtype.pbFormat, mtype->cbFormat); + } + *types = mtype; + This->past = TRUE; + count = 1; + } + if (fetched) + *fetched = count; + return (count == nTypes) ? S_OK : S_FALSE; +} + +/* IEnumMediaTypes */ +static HRESULT WINAPI +Single_IEnumMediaTypes_Skip(IEnumMediaTypes *iface, ULONG nTypes) +{ + ME_Impl *This = (ME_Impl *)iface; + TRACE("(%p)->(%u)\n", This, nTypes); + if (nTypes) + This->past = TRUE; + return This->past ? S_FALSE : S_OK; +} + +/* IEnumMediaTypes */ +static HRESULT WINAPI +Single_IEnumMediaTypes_Reset(IEnumMediaTypes *iface) +{ + ME_Impl *This = (ME_Impl *)iface; + TRACE("(%p)->()\n", This); + This->past = FALSE; + return S_OK; +} + +/* IEnumMediaTypes */ +static HRESULT WINAPI +Single_IEnumMediaTypes_Clone(IEnumMediaTypes *iface, IEnumMediaTypes **me) +{ + ME_Impl *This = (ME_Impl *)iface; + TRACE("(%p)->(%p)\n", This, me); + if (!me) + return E_POINTER; + *me = mediaenum_create(&This->mtype); + if (!*me) + return E_OUTOFMEMORY; + ((ME_Impl *)*me)->past = This->past; + return S_OK; +} + + +/* Virtual tables and constructor */ + +static const IEnumMediaTypesVtbl IEnumMediaTypes_VTable = +{ + Single_IEnumMediaTypes_QueryInterface, + Single_IEnumMediaTypes_AddRef, + Single_IEnumMediaTypes_Release, + Single_IEnumMediaTypes_Next, + Single_IEnumMediaTypes_Skip, + Single_IEnumMediaTypes_Reset, + Single_IEnumMediaTypes_Clone, +}; + +IEnumMediaTypes *mediaenum_create(AM_MEDIA_TYPE *mtype) +{ + ME_Impl *obj = CoTaskMemAlloc(sizeof(ME_Impl)); + if (obj) { + ZeroMemory(obj, sizeof(ME_Impl)); + obj->me.lpVtbl = &IEnumMediaTypes_VTable; + obj->refCount = 1; + obj->past = FALSE; + obj->mtype = *mtype; + obj->mtype.pUnk = NULL; + if (mtype->cbFormat) { + obj->mtype.pbFormat = CoTaskMemAlloc(mtype->cbFormat); + CopyMemory(obj->mtype.pbFormat, mtype->pbFormat, mtype->cbFormat); + } + else + obj->mtype.pbFormat = NULL; + } + return &obj->me; +} + + /* Sample Grabber pin implementation */ typedef struct _SG_Pin { const IPinVtbl* lpVtbl; @@ -1039,10 +1194,11 @@ static HRESULT WINAPI SampleGrabber_IPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **mtypes) { SG_Pin *This = (SG_Pin *)iface; - FIXME("(%p)->(%p): stub\n", This, mtypes); + TRACE("(%p)->(%p)\n", This, mtypes); if (!mtypes) return E_POINTER; - return E_OUTOFMEMORY; + *mtypes = mediaenum_create(&This->sg->mtype); + return *mtypes ? S_OK : E_OUTOFMEMORY; } /* IPin - input pin */
1
0
0
0
Paul Chitescu : qedit: Add pins enumerator implementation to SampleGrabber.
by Alexandre Julliard
15 Feb '10
15 Feb '10
Module: wine Branch: master Commit: 43fe5e35b861da79b973da41db479bf2140bad73 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43fe5e35b861da79b973da41d…
Author: Paul Chitescu <paulc(a)voip.null.ro> Date: Fri Feb 12 21:11:40 2010 +0200 qedit: Add pins enumerator implementation to SampleGrabber. --- dlls/qedit/samplegrabber.c | 162 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 160 insertions(+), 2 deletions(-) diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index eca259e..6b46a27 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -36,6 +36,160 @@ static WCHAR const vendor_name[] = { 'W', 'i', 'n', 'e', 0 }; static WCHAR const pin_in_name[] = { 'I', 'n', 0 }; static WCHAR const pin_out_name[] = { 'O', 'u', 't', 0 }; +IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount); + +/* Fixed pins enumerator, holds filter referenced */ +typedef struct _PE_Impl { + IEnumPins pe; + IBaseFilter *filter; + LONG refCount; + ULONG numPins; + ULONG index; + IPin *pins[0]; +} PE_Impl; + + +/* IEnumPins interface implementation */ + +/* IUnknown */ +static ULONG WINAPI +Fixed_IEnumPins_AddRef(IEnumPins *iface) +{ + PE_Impl *This = (PE_Impl *)iface; + ULONG refCount = InterlockedIncrement(&This->refCount); + TRACE("(%p) new ref = %u\n", This, refCount); + return refCount; +} + +/* IUnknown */ +static ULONG WINAPI +Fixed_IEnumPins_Release(IEnumPins *iface) +{ + PE_Impl *This = (PE_Impl *)iface; + ULONG refCount = InterlockedDecrement(&This->refCount); + TRACE("(%p) new ref = %u\n", This, refCount); + if (refCount == 0) + { + IBaseFilter_Release(This->filter); + CoTaskMemFree(This); + return 0; + } + return refCount; +} + +/* IUnknown */ +static HRESULT WINAPI +Fixed_IEnumPins_QueryInterface(IEnumPins *iface, REFIID riid, void **ppvObject) +{ + PE_Impl *This = (PE_Impl *)iface; + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IEnumPins)) { + Fixed_IEnumPins_AddRef(iface); + *ppvObject = &(This->pins); + return S_OK; + } + *ppvObject = NULL; + WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppvObject); + return E_NOINTERFACE; +} + +/* IEnumPins */ +static HRESULT WINAPI +Fixed_IEnumPins_Next(IEnumPins *iface, ULONG nPins, IPin **pins, ULONG *fetched) +{ + PE_Impl *This = (PE_Impl *)iface; + ULONG count = 0; + TRACE("(%p)->(%u, %p, %p) index = %u\n", This, nPins, pins, fetched, This->index); + if (!nPins) + return E_INVALIDARG; + if (!pins || ((nPins != 1) && !fetched)) + return E_POINTER; + while ((count < nPins) && (This->index < This->numPins)) { + IPin *pin = This->pins[This->index++]; + IPin_AddRef(pin); + pins[count++] = pin; + } + if (fetched) + *fetched = count; + return (count == nPins) ? S_OK : S_FALSE; +} + +/* IEnumPins */ +static HRESULT WINAPI +Fixed_IEnumPins_Skip(IEnumPins *iface, ULONG nPins) +{ + PE_Impl *This = (PE_Impl *)iface; + TRACE("(%p)->(%u) index = %u\n", This, nPins, This->index); + nPins += This->index; + if (nPins >= This->numPins) { + This->index = This->numPins; + return S_FALSE; + } + This->index = nPins; + return S_OK; +} + +/* IEnumPins */ +static HRESULT WINAPI +Fixed_IEnumPins_Reset(IEnumPins *iface) +{ + PE_Impl *This = (PE_Impl *)iface; + TRACE("(%p)->() index = %u\n", This, This->index); + This->index = 0; + return S_OK; +} + +/* IEnumPins */ +static HRESULT WINAPI +Fixed_IEnumPins_Clone(IEnumPins *iface, IEnumPins **pins) +{ + PE_Impl *This = (PE_Impl *)iface; + TRACE("(%p)->(%p) index = %u\n", This, pins, This->index); + if (!pins) + return E_POINTER; + *pins = pinsenum_create(This->filter, This->pins, This->numPins); + if (!*pins) + return E_OUTOFMEMORY; + ((PE_Impl *)*pins)->index = This->index; + return S_OK; +} + + +/* Virtual tables and constructor */ + +static const IEnumPinsVtbl IEnumPins_VTable = +{ + Fixed_IEnumPins_QueryInterface, + Fixed_IEnumPins_AddRef, + Fixed_IEnumPins_Release, + Fixed_IEnumPins_Next, + Fixed_IEnumPins_Skip, + Fixed_IEnumPins_Reset, + Fixed_IEnumPins_Clone, +}; + +IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount) +{ + ULONG len = sizeof(PE_Impl) + (pinCount * sizeof(IPin *)); + PE_Impl *obj = CoTaskMemAlloc(len); + if (obj) { + ULONG i; + ZeroMemory(obj, len); + obj->pe.lpVtbl = &IEnumPins_VTable; + obj->refCount = 1; + obj->filter = filter; + obj->numPins = pinCount; + obj->index = 0; + for (i=0; i<pinCount; i++) + obj->pins[i] = pins[i]; + IBaseFilter_AddRef(filter); + } + return &obj->pe; +} + + /* Sample Grabber pin implementation */ typedef struct _SG_Pin { const IPinVtbl* lpVtbl; @@ -314,10 +468,14 @@ static HRESULT WINAPI SampleGrabber_IBaseFilter_EnumPins(IBaseFilter *iface, IEnumPins **pins) { SG_Impl *This = impl_from_IBaseFilter(iface); - FIXME("(%p)->(%p): stub\n", This, pins); + IPin *pin[2]; + TRACE("(%p)->(%p)\n", This, pins); if (!pins) return E_POINTER; - return E_OUTOFMEMORY; + pin[0] = (IPin*)&This->pin_in.lpVtbl; + pin[1] = (IPin*)&This->pin_out.lpVtbl; + *pins = pinsenum_create(iface, pin, 2); + return *pins ? S_OK : E_OUTOFMEMORY; } /* IBaseFilter */
1
0
0
0
Paul Chitescu : qedit: Add current media type and media matching to SampleGrabber.
by Alexandre Julliard
15 Feb '10
15 Feb '10
Module: wine Branch: master Commit: 076fdb35bac005a50f93babbff10355bf70e39bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=076fdb35bac005a50f93babbf…
Author: Paul Chitescu <paulc(a)voip.null.ro> Date: Fri Feb 12 21:10:34 2010 +0200 qedit: Add current media type and media matching to SampleGrabber. --- dlls/qedit/samplegrabber.c | 98 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 91 insertions(+), 7 deletions(-) diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index f30543c..eca259e 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -54,6 +54,7 @@ typedef struct _SG_Impl { LONG refCount; FILTER_INFO info; FILTER_STATE state; + AM_MEDIA_TYPE mtype; SG_Pin pin_in; SG_Pin pin_out; IMemAllocator *allocator; @@ -101,6 +102,8 @@ static void SampleGrabber_cleanup(SG_Impl *This) IMemInputPin_Release(This->memOutput); if (This->grabberIface) ISampleGrabberCB_Release(This->grabberIface); + if (This->mtype.pbFormat) + CoTaskMemFree(This->mtype.pbFormat); } /* Common helper AddRef called from all interfaces */ @@ -419,10 +422,24 @@ static HRESULT WINAPI SampleGrabber_ISampleGrabber_SetMediaType(ISampleGrabber *iface, const AM_MEDIA_TYPE *type) { SG_Impl *This = impl_from_ISampleGrabber(iface); - FIXME("(%p)->(%p): stub\n", This, type); + TRACE("(%p)->(%p)\n", This, type); if (!type) return E_POINTER; - return E_NOTIMPL; + TRACE("Media type: %s/%s ssize: %u format: %s (%u bytes)\n", + debugstr_guid(&type->majortype), debugstr_guid(&type->subtype), + type->lSampleSize, + debugstr_guid(&type->formattype), type->cbFormat); + if (This->mtype.pbFormat) + CoTaskMemFree(This->mtype.pbFormat); + This->mtype = *type; + This->mtype.pUnk = NULL; + if (type->cbFormat) { + This->mtype.pbFormat = CoTaskMemAlloc(type->cbFormat); + CopyMemory(This->mtype.pbFormat, type->pbFormat, type->cbFormat); + } + else + This->mtype.pbFormat = NULL; + return S_OK; } /* ISampleGrabber */ @@ -430,10 +447,17 @@ static HRESULT WINAPI SampleGrabber_ISampleGrabber_GetConnectedMediaType(ISampleGrabber *iface, AM_MEDIA_TYPE *type) { SG_Impl *This = impl_from_ISampleGrabber(iface); - FIXME("(%p)->(%p): stub\n", This, type); + TRACE("(%p)->(%p)\n", This, type); if (!type) return E_POINTER; - return E_NOTIMPL; + if (!This->pin_in.pair) + return VFW_E_NOT_CONNECTED; + *type = This->mtype; + if (type->cbFormat) { + type->pbFormat = CoTaskMemAlloc(type->cbFormat); + CopyMemory(type->pbFormat, This->mtype.pbFormat, type->cbFormat); + } + return S_OK; } /* ISampleGrabber */ @@ -658,7 +682,30 @@ SampleGrabber_Out_IPin_Connect(IPin *iface, IPin *receiver, const AM_MEDIA_TYPE return VFW_E_ALREADY_CONNECTED; if (This->sg->state != State_Stopped) return VFW_E_NOT_STOPPED; - return VFW_E_TYPE_NOT_ACCEPTED; + if (type) { + TRACE("Media type: %s/%s ssize: %u format: %s (%u bytes)\n", + debugstr_guid(&type->majortype), debugstr_guid(&type->subtype), + type->lSampleSize, + debugstr_guid(&type->formattype), type->cbFormat); + if (!IsEqualGUID(&This->sg->mtype.majortype,&GUID_NULL) && + !IsEqualGUID(&This->sg->mtype.majortype,&type->majortype)) + return VFW_E_TYPE_NOT_ACCEPTED; + if (!IsEqualGUID(&This->sg->mtype.subtype,&MEDIASUBTYPE_None) && + !IsEqualGUID(&This->sg->mtype.subtype,&type->subtype)) + return VFW_E_TYPE_NOT_ACCEPTED; + if (!IsEqualGUID(&This->sg->mtype.formattype,&GUID_NULL) && + !IsEqualGUID(&This->sg->mtype.formattype,&FORMAT_None) && + !IsEqualGUID(&This->sg->mtype.formattype,&type->formattype)) + return VFW_E_TYPE_NOT_ACCEPTED; + } + This->pair = receiver; + if (This->sg->memOutput) { + IMemInputPin_Release(This->sg->memOutput); + This->sg->memOutput = NULL; + } + if (SUCCEEDED(IPin_QueryInterface(receiver,&IID_IMemInputPin,(void **)&(This->sg->memOutput)))) + TRACE("pair IMemInputPin %p\n", This->sg->memOutput); + return S_OK; } /* IPin - input pin */ @@ -673,7 +720,34 @@ SampleGrabber_In_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_M return VFW_E_ALREADY_CONNECTED; if (This->sg->state != State_Stopped) return VFW_E_NOT_STOPPED; - return VFW_E_TYPE_NOT_ACCEPTED; + if (type) { + TRACE("Media type: %s/%s ssize: %u format: %s (%u bytes)\n", + debugstr_guid(&type->majortype), debugstr_guid(&type->subtype), + type->lSampleSize, + debugstr_guid(&type->formattype), type->cbFormat); + if (!IsEqualGUID(&This->sg->mtype.majortype,&GUID_NULL) && + !IsEqualGUID(&This->sg->mtype.majortype,&type->majortype)) + return VFW_E_TYPE_NOT_ACCEPTED; + if (!IsEqualGUID(&This->sg->mtype.subtype,&MEDIASUBTYPE_None) && + !IsEqualGUID(&This->sg->mtype.subtype,&type->subtype)) + return VFW_E_TYPE_NOT_ACCEPTED; + if (!IsEqualGUID(&This->sg->mtype.formattype,&GUID_NULL) && + !IsEqualGUID(&This->sg->mtype.formattype,&FORMAT_None) && + !IsEqualGUID(&This->sg->mtype.formattype,&type->formattype)) + return VFW_E_TYPE_NOT_ACCEPTED; + if (This->sg->mtype.pbFormat) + CoTaskMemFree(This->sg->mtype.pbFormat); + This->sg->mtype = *type; + This->sg->mtype.pUnk = NULL; + if (type->cbFormat) { + This->sg->mtype.pbFormat = CoTaskMemAlloc(type->cbFormat); + CopyMemory(This->sg->mtype.pbFormat, type->pbFormat, type->cbFormat); + } + else + This->sg->mtype.pbFormat = NULL; + } + This->pair = connector; + return S_OK; } /* IPin - output pin */ @@ -742,7 +816,14 @@ SampleGrabber_IPin_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *mtype) TRACE("(%p)->(%p)\n", This, mtype); if (!mtype) return E_POINTER; - return VFW_E_NOT_CONNECTED; + if (!This->pair) + return VFW_E_NOT_CONNECTED; + *mtype = This->sg->mtype; + if (mtype->cbFormat) { + mtype->pbFormat = CoTaskMemAlloc(mtype->cbFormat); + CopyMemory(mtype->pbFormat, This->sg->mtype.pbFormat, mtype->cbFormat); + } + return S_OK; } /* IPin */ @@ -994,6 +1075,9 @@ HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppv) obj->info.achName[0] = 0; obj->info.pGraph = NULL; obj->state = State_Stopped; + obj->mtype.majortype = GUID_NULL; + obj->mtype.subtype = MEDIASUBTYPE_None; + obj->mtype.formattype = FORMAT_None; obj->allocator = NULL; obj->refClock = NULL; obj->memOutput = NULL;
1
0
0
0
Paul Chitescu : qedit: Add pins, IMemInputPin implementation and grabbing to SampleGrabber.
by Alexandre Julliard
15 Feb '10
15 Feb '10
Module: wine Branch: master Commit: 4457717d797cc3354b82c572219a458419e847c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4457717d797cc3354b82c5722…
Author: Paul Chitescu <paulc(a)voip.null.ro> Date: Fri Feb 12 21:09:02 2010 +0200 qedit: Add pins, IMemInputPin implementation and grabbing to SampleGrabber. --- dlls/qedit/samplegrabber.c | 565 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 559 insertions(+), 6 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4457717d797cc3354b82c…
1
0
0
0
Paul Vriens : msi/tests: Fix a test failure on Win9x/WinMe.
by Alexandre Julliard
12 Feb '10
12 Feb '10
Module: wine Branch: master Commit: 983cff23faf44f6e6f32a42e49e451e54773b75f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=983cff23faf44f6e6f32a42e4…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Fri Feb 12 15:20:10 2010 +0100 msi/tests: Fix a test failure on Win9x/WinMe. --- dlls/msi/tests/install.c | 18 ++++-------------- 1 files changed, 4 insertions(+), 14 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index de826c3..c58e0af 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -7970,18 +7970,8 @@ static void test_self_registration(void) static void test_register_font(void) { - static const WCHAR regfont1[] = - {'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s',' ','N','T','\\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', - 'F','o','n','t','s',0}; - static const WCHAR regfont2[] = - {'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s','\\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', - 'F','o','n','t','s',0}; + static const char regfont1[] = "Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"; + static const char regfont2[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Fonts"; LONG ret; HKEY key; UINT r; @@ -7995,9 +7985,9 @@ static void test_register_font(void) r = MsiInstallProductA(msifile, NULL); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ret = RegCreateKeyW(HKEY_LOCAL_MACHINE, regfont1, &key); + ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, regfont1, &key); if (ret) - ret = RegCreateKeyW(HKEY_LOCAL_MACHINE, regfont2, &key); + RegOpenKeyA(HKEY_LOCAL_MACHINE, regfont2, &key); ret = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL); ok(ret != ERROR_FILE_NOT_FOUND, "unexpected result %d\n", ret);
1
0
0
0
Paul Vriens : rcprt4/tests: Don't crash on NT4 or lower.
by Alexandre Julliard
12 Feb '10
12 Feb '10
Module: wine Branch: master Commit: 693dd47689f6211254ac07a05875b00f71cc564d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=693dd47689f6211254ac07a05…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Fri Feb 12 13:24:25 2010 +0100 rcprt4/tests: Don't crash on NT4 or lower. --- dlls/rpcrt4/tests/ndr_marshall.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index be8e638..841af17 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -1969,6 +1969,11 @@ static void test_conf_complex_array(void) &fmtstr_complex_array[32] ); expected_length = (4 + memsrc.dim1 * (2 + memsrc.dim2)) * 4; + if (StubMsg.BufferLength == 96) + { + win_skip("Tests crash on Win9x, WinMe and NT4\n"); + goto cleanup; + } todo_wine ok(StubMsg.BufferLength >= expected_length, "length %d\n", StubMsg.BufferLength); @@ -2032,6 +2037,7 @@ todo_wine HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); +cleanup: for(i = 0; i < memsrc.dim1; i++) HeapFree(GetProcessHeap(), 0, memsrc.array[i]); HeapFree(GetProcessHeap(), 0, memsrc.array);
1
0
0
0
Alexandre Julliard : ntdll/tests: Add tests for registry symlinks.
by Alexandre Julliard
12 Feb '10
12 Feb '10
Module: wine Branch: master Commit: ed0f34c6e33145d650355b3695c092434951d07b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed0f34c6e33145d650355b369…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Feb 12 16:03:27 2010 +0100 ntdll/tests: Add tests for registry symlinks. --- dlls/ntdll/tests/reg.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 158 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index bb541bb..a4802c8 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -116,6 +116,7 @@ typedef enum _KEY_VALUE_INFORMATION_CLASS { #endif static NTSTATUS (WINAPI * pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR); +static void (WINAPI * pRtlInitUnicodeString)(PUNICODE_STRING,PCWSTR); static NTSTATUS (WINAPI * pRtlFreeUnicodeString)(PUNICODE_STRING); static NTSTATUS (WINAPI * pNtDeleteValueKey)(IN HANDLE, IN PUNICODE_STRING); static NTSTATUS (WINAPI * pRtlQueryRegistryValues)(IN ULONG, IN PCWSTR,IN PRTL_QUERY_REGISTRY_TABLE, IN PVOID,IN PVOID); @@ -161,6 +162,7 @@ static BOOL InitFunctionPtrs(void) trace("Could not load ntdll.dll\n"); return FALSE; } + NTDLL_GET_PROC(RtlInitUnicodeString) NTDLL_GET_PROC(RtlCreateUnicodeStringFromAsciiz) NTDLL_GET_PROC(RtlCreateUnicodeString) NTDLL_GET_PROC(RtlFreeUnicodeString) @@ -593,6 +595,161 @@ static void test_RtlpNtQueryValueKey(void) ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status); } +static void test_symlinks(void) +{ + static const WCHAR linkW[] = {'l','i','n','k',0}; + static const WCHAR valueW[] = {'v','a','l','u','e',0}; + static const WCHAR symlinkW[] = {'S','y','m','b','o','l','i','c','L','i','n','k','V','a','l','u','e',0}; + static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0}; + char buffer[1024]; + KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer; + WCHAR *target; + UNICODE_STRING symlink_str, link_str, target_str, value_str; + HANDLE root, key, link; + OBJECT_ATTRIBUTES attr; + NTSTATUS status; + DWORD target_len, len, dw; + + pRtlInitUnicodeString( &link_str, linkW ); + pRtlInitUnicodeString( &symlink_str, symlinkW ); + pRtlInitUnicodeString( &target_str, targetW + 1 ); + pRtlInitUnicodeString( &value_str, valueW ); + + target_len = winetestpath.Length + sizeof(targetW); + target = pRtlAllocateHeap( GetProcessHeap(), 0, target_len ); + memcpy( target, winetestpath.Buffer, winetestpath.Length ); + memcpy( target + winetestpath.Length/sizeof(WCHAR), targetW, sizeof(targetW) ); + + attr.Length = sizeof(attr); + attr.RootDirectory = 0; + attr.Attributes = 0; + attr.ObjectName = &winetestpath; + attr.SecurityDescriptor = NULL; + attr.SecurityQualityOfService = NULL; + + status = pNtCreateKey( &root, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); + ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); + + attr.RootDirectory = root; + attr.ObjectName = &link_str; + status = pNtCreateKey( &link, KEY_ALL_ACCESS, &attr, 0, 0, REG_OPTION_CREATE_LINK, 0 ); + ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); + + /* REG_SZ is not allowed */ + status = pNtSetValueKey( link, &symlink_str, 0, REG_SZ, target, target_len ); + todo_wine + ok( status == STATUS_ACCESS_DENIED, "NtSetValueKey wrong status 0x%08x\n", status ); + status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK, target, target_len - sizeof(WCHAR) ); + ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); + /* other values are not allowed */ + status = pNtSetValueKey( link, &link_str, 0, REG_LINK, target, target_len - sizeof(WCHAR) ); + todo_wine + ok( status == STATUS_ACCESS_DENIED, "NtSetValueKey wrong status 0x%08x\n", status ); + + /* try opening the target through the link */ + + attr.ObjectName = &link_str; + status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); + todo_wine + ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey wrong status 0x%08x\n", status ); + if (!status) pNtClose( key ); + + attr.ObjectName = &target_str; + status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); + ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); + + dw = 0xbeef; + status = pNtSetValueKey( key, &value_str, 0, REG_DWORD, &dw, sizeof(dw) ); + ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); + pNtClose( key ); + + attr.ObjectName = &link_str; + status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); + ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status ); + + len = sizeof(buffer); + status = pNtQueryValueKey( key, &value_str, KeyValuePartialInformation, info, len, &len ); + todo_wine + { + ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); + ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + sizeof(DWORD), "wrong len %u\n", len ); + } + + status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); + todo_wine + ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08x\n", status ); + + /* REG_LINK can be created in non-link keys */ + status = pNtSetValueKey( key, &symlink_str, 0, REG_LINK, target, target_len - sizeof(WCHAR) ); + ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); + len = sizeof(buffer); + status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); + ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); + ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR), + "wrong len %u\n", len ); + status = pNtDeleteValueKey( key, &symlink_str ); + ok( status == STATUS_SUCCESS, "NtDeleteValueKey failed: 0x%08x\n", status ); + + pNtClose( key ); + + /* now open the symlink itself */ + + attr.RootDirectory = root; + attr.Attributes = OBJ_OPENLINK; + attr.ObjectName = &link_str; + status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); + ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status ); + + len = sizeof(buffer); + status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); + todo_wine + { + ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); + ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR), + "wrong len %u\n", len ); + } + pNtClose( key ); + + /* target with terminating null doesn't work */ + status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK, target, target_len ); + ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); + attr.Attributes = 0; + attr.ObjectName = &link_str; + status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); + todo_wine + ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey wrong status 0x%08x\n", status ); + if (!status) pNtClose( key ); + + /* relative symlink, works only on win2k */ + status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK, targetW+1, sizeof(targetW)-2*sizeof(WCHAR) ); + ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); + attr.ObjectName = &link_str; + status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); + ok( status == STATUS_SUCCESS || status == STATUS_OBJECT_NAME_NOT_FOUND, + "NtOpenKey wrong status 0x%08x\n", status ); + if (!status) pNtClose( key ); + + status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, REG_OPTION_CREATE_LINK, 0 ); + todo_wine + ok( status == STATUS_OBJECT_NAME_COLLISION, "NtCreateKey failed: 0x%08x\n", status ); + if (!status) pNtClose( key ); + + status = pNtDeleteKey( link ); + ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status ); + pNtClose( link ); + + attr.ObjectName = &target_str; + status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); + ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status ); + status = pNtDeleteKey( key ); + ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status ); + pNtClose( key ); + + status = pNtDeleteKey( root ); + ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status ); + pNtClose( root ); +} + START_TEST(reg) { static const WCHAR winetest[] = {'\\','W','i','n','e','T','e','s','t',0}; @@ -615,6 +772,7 @@ START_TEST(reg) test_NtFlushKey(); test_NtQueryValueKey(); test_NtDeleteKey(); + test_symlinks(); pRtlFreeUnicodeString(&winetestpath);
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
79
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
Results per page:
10
25
50
100
200