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
January 2007
----- 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
4 participants
893 discussions
Start a n
N
ew thread
Rob Shearman : ole32: Fix Read/ WriteClassStm to return an error if the passed in stream pointer is NULL.
by Alexandre Julliard
10 Jan '07
10 Jan '07
Module: wine Branch: master Commit: 35548d15c4bca00504915ea657d9db84cd7fb860 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35548d15c4bca00504915ea65…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jan 9 17:17:40 2007 +0000 ole32: Fix Read/WriteClassStm to return an error if the passed in stream pointer is NULL. --- dlls/ole32/storage32.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index ac8264d..450d5cd 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -7901,7 +7901,7 @@ HRESULT WINAPI WriteClassStm(IStream *pS { TRACE("(%p,%p)\n",pStm,rclsid); - if (rclsid==NULL) + if (!pStm || !rclsid) return E_INVALIDARG; return IStream_Write(pStm,rclsid,sizeof(CLSID),NULL); @@ -7927,7 +7927,7 @@ HRESULT WINAPI ReadClassStm(IStream *pSt TRACE("(%p,%p)\n",pStm,pclsid); - if (pclsid==NULL) + if (!pStm || !pclsid) return E_INVALIDARG; res = IStream_Read(pStm,(void*)pclsid,sizeof(CLSID),&nbByte);
1
0
0
0
Rob Shearman : ole32: Return an error in CoMarshalInterface if pStream is NULL.
by Alexandre Julliard
10 Jan '07
10 Jan '07
Module: wine Branch: master Commit: 923bc6bf3d443079ad698cee514c76d4cb435d84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=923bc6bf3d443079ad698cee5…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jan 9 17:16:19 2007 +0000 ole32: Return an error in CoMarshalInterface if pStream is NULL. --- dlls/ole32/marshal.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index 01368cb..4294cb5 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -1550,7 +1550,7 @@ HRESULT WINAPI CoMarshalInterface(IStrea dump_MSHLFLAGS(mshlFlags); TRACE(")\n"); - if (pUnk == NULL) + if (!pUnk || !pStream) return E_INVALIDARG; objref.signature = OBJREF_SIGNATURE;
1
0
0
0
Rob Shearman : ole32: Fix HGLOBALStreamImpl_CopyTo to check the return values of IStream_Read and IStream_Write and to not compare the bytes read to the bytes written .
by Alexandre Julliard
10 Jan '07
10 Jan '07
Module: wine Branch: master Commit: fd07191673dea171af0449654d3106c5d6429025 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd07191673dea171af0449654…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jan 9 17:16:07 2007 +0000 ole32: Fix HGLOBALStreamImpl_CopyTo to check the return values of IStream_Read and IStream_Write and to not compare the bytes read to the bytes written. Add tests for IStream::CopyTo of the HGLOBAL stream implementation. --- dlls/ole32/hglobalstream.c | 20 ++--- dlls/ole32/tests/hglobalstream.c | 179 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+), 11 deletions(-) diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c index 5774c90..40a0dbf 100644 --- a/dlls/ole32/hglobalstream.c +++ b/dlls/ole32/hglobalstream.c @@ -476,21 +476,19 @@ static HRESULT WINAPI HGLOBALStreamImpl_ else copySize = cb.u.LowPart; - IStream_Read(iface, tmpBuffer, copySize, &bytesRead); + hr = IStream_Read(iface, tmpBuffer, copySize, &bytesRead); + if (FAILED(hr)) + break; totalBytesRead.u.LowPart += bytesRead; - IStream_Write(pstm, tmpBuffer, bytesRead, &bytesWritten); - - totalBytesWritten.u.LowPart += bytesWritten; - - /* - * Check that read & write operations were successful - */ - if (bytesRead != bytesWritten) + if (bytesRead) { - hr = STG_E_MEDIUMFULL; - break; + hr = IStream_Write(pstm, tmpBuffer, bytesRead, &bytesWritten); + if (FAILED(hr)) + break; + + totalBytesWritten.u.LowPart += bytesWritten; } if (bytesRead!=copySize) diff --git a/dlls/ole32/tests/hglobalstream.c b/dlls/ole32/tests/hglobalstream.c index c6eaa19..8f14544 100644 --- a/dlls/ole32/tests/hglobalstream.c +++ b/dlls/ole32/tests/hglobalstream.c @@ -30,6 +30,19 @@ #define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) +static char const * const *expected_method_list; + +#define CHECK_EXPECTED_METHOD(method_name) \ +do { \ + ok(*expected_method_list != NULL, "Extra method %s called\n", method_name); \ + if (*expected_method_list) \ + { \ + ok(!strcmp(*expected_method_list, method_name), "Expected %s to be called instead of %s\n", \ + *expected_method_list, method_name); \ + expected_method_list++; \ + } \ +} while(0) + static void test_streamonhglobal(IStream *pStream) { const char data[] = "Test String"; @@ -82,6 +95,170 @@ static void test_streamonhglobal(IStream ok(hr == E_OUTOFMEMORY, "IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr); } +static HRESULT WINAPI TestStream_QueryInterface(IStream *iface, REFIID riid, void **ppv) +{ + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_ISequentialStream) || + IsEqualIID(riid, &IID_IStream)) + { + *ppv = iface; + IUnknown_AddRef(iface); + return S_OK; + } + *ppv = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI TestStream_AddRef(IStream *iface) +{ + return 2; +} + +static ULONG WINAPI TestStream_Release(IStream *iface) +{ + return 1; +} + +static HRESULT WINAPI TestStream_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead) +{ + CHECK_EXPECTED_METHOD("TestStream_Read"); + return E_NOTIMPL; +} + +static HRESULT WINAPI TestStream_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten) +{ + CHECK_EXPECTED_METHOD("TestStream_Write"); + *pcbWritten = 5; + return S_OK; +} + +static HRESULT WINAPI TestStream_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) +{ + CHECK_EXPECTED_METHOD("TestStream_Seek"); + return E_NOTIMPL; +} + +static HRESULT WINAPI TestStream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize) +{ + CHECK_EXPECTED_METHOD("TestStream_SetSize"); + return E_NOTIMPL; +} + +static HRESULT WINAPI TestStream_CopyTo(IStream *iface, IStream *pStream, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten) +{ + CHECK_EXPECTED_METHOD("TestStream_CopyTo"); + return E_NOTIMPL; +} + +static HRESULT WINAPI TestStream_Commit(IStream *iface, DWORD grfCommitFlags) +{ + CHECK_EXPECTED_METHOD("TestStream_Commit"); + return E_NOTIMPL; +} + +static HRESULT WINAPI TestStream_Revert(IStream *iface) +{ + CHECK_EXPECTED_METHOD("TestStream_Revert"); + return E_NOTIMPL; +} + +static HRESULT WINAPI TestStream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) +{ + CHECK_EXPECTED_METHOD("TestStream_LockRegion"); + return E_NOTIMPL; +} + +static HRESULT WINAPI TestStream_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) +{ + CHECK_EXPECTED_METHOD("TestStream_UnlockRegion"); + return E_NOTIMPL; +} + +static HRESULT WINAPI TestStream_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag) +{ + CHECK_EXPECTED_METHOD("TestStream_Stat"); + return E_NOTIMPL; +} + +static HRESULT WINAPI TestStream_Clone(IStream *iface, IStream **pStream) +{ + CHECK_EXPECTED_METHOD("TestStream_Clone"); + return E_NOTIMPL; +} + +static /*const*/ IStreamVtbl StreamVtbl = +{ + TestStream_QueryInterface, + TestStream_AddRef, + TestStream_Release, + TestStream_Read, + TestStream_Write, + TestStream_Seek, + TestStream_SetSize, + TestStream_CopyTo, + TestStream_Commit, + TestStream_Revert, + TestStream_LockRegion, + TestStream_UnlockRegion, + TestStream_Stat, + TestStream_Clone +}; + +static IStream Test_Stream = { &StreamVtbl }; + +static void test_copyto(void) +{ + IStream *pStream, *pStream2; + HRESULT hr = CreateStreamOnHGlobal(NULL, FALSE, &pStream); + static const char szHello[] = "Hello"; + ULARGE_INTEGER cb; + static const char *methods_copyto[] = + { + "TestStream_Write", + NULL + }; + ULONG written; + ULARGE_INTEGER ullRead; + ULARGE_INTEGER ullWritten; + ULARGE_INTEGER libNewPosition; + static const LARGE_INTEGER llZero; + char buffer[15]; + + expected_method_list = methods_copyto; + + hr = IStream_Write(pStream, szHello, sizeof(szHello), &written); + ok_ole_success(hr, "IStream_Write"); + ok(written == sizeof(szHello), "only %d bytes written\n", written); + + hr = IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); + ok_ole_success(hr, "IStream_Seek"); + + cb.QuadPart = sizeof(szHello); + hr = IStream_CopyTo(pStream, &Test_Stream, cb, &ullRead, &ullWritten); + ok(ullWritten.QuadPart == 5, "ullWritten was %d instead\n", (ULONG)ullWritten.QuadPart); + ok(ullRead.QuadPart == sizeof(szHello), "only %d bytes read\n", (ULONG)ullRead.QuadPart); + ok_ole_success(hr, "IStream_CopyTo"); + + ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list); + + hr = IStream_Clone(pStream, &pStream2); + ok_ole_success(hr, "IStream_Clone"); + + hr = IStream_Seek(pStream2, llZero, STREAM_SEEK_CUR, &libNewPosition); + ok_ole_success(hr, "IStream_Seek"); + ok(libNewPosition.QuadPart == sizeof(szHello), "libNewPosition wasn't set correctly for the cloned stream\n"); + + hr = IStream_Seek(pStream2, llZero, STREAM_SEEK_SET, NULL); + ok_ole_success(hr, "IStream_Seek"); + + hr = IStream_Read(pStream2, buffer, sizeof(buffer), NULL); + ok_ole_success(hr, "IStream_Read"); + ok(!strcmp(buffer, szHello), "read data \"%s\" didn't match originally written data\n", buffer); + + IStream_Release(pStream2); + IStream_Release(pStream); +} + START_TEST(hglobalstream) { HRESULT hr; @@ -91,4 +268,6 @@ START_TEST(hglobalstream) ok_ole_success(hr, "CreateStreamOnHGlobal"); test_streamonhglobal(pStream); + IStream_Release(pStream); + test_copyto(); }
1
0
0
0
Rob Shearman : ole32: Remove some unneeded inclusions of headers.
by Alexandre Julliard
10 Jan '07
10 Jan '07
Module: wine Branch: master Commit: ba25254d9f02852bae16a42138ce585cf4bb2348 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba25254d9f02852bae16a4213…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jan 9 17:15:59 2007 +0000 ole32: Remove some unneeded inclusions of headers. Change some incorrect usages of SEEK_SET to the intended STREAM_SEEK_SET instead. --- dlls/ole32/compobj.c | 3 +-- dlls/ole32/git.c | 10 +--------- dlls/ole32/marshal.c | 9 +-------- dlls/ole32/rpc.c | 4 ---- dlls/ole32/stubmanager.c | 3 +-- 5 files changed, 4 insertions(+), 25 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 452ea0d..f1c6ebe 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -41,7 +41,6 @@ #include "config.h" -#include <stdlib.h> #include <stdarg.h> #include <stdio.h> #include <string.h> @@ -1677,7 +1676,7 @@ HRESULT WINAPI CoRevokeClassObject( LARGE_INTEGER zero; memset(&zero, 0, sizeof(zero)); /* FIXME: stop local server thread */ - IStream_Seek(curClass->pMarshaledData, zero, SEEK_SET, NULL); + IStream_Seek(curClass->pMarshaledData, zero, STREAM_SEEK_SET, NULL); CoReleaseMarshalData(curClass->pMarshaledData); } diff --git a/dlls/ole32/git.c b/dlls/ole32/git.c index 4f8d17d..222eb6f 100644 --- a/dlls/ole32/git.c +++ b/dlls/ole32/git.c @@ -24,13 +24,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - -#include <assert.h> -#include <stdlib.h> #include <stdarg.h> -#include <stdio.h> -#include <string.h> #define COBJMACROS #define NONAMELESSUNION @@ -42,8 +36,6 @@ #include "objbase.h" #include "ole2.h" #include "winerror.h" -#include "winreg.h" -#include "winternl.h" #include "compobj_private.h" @@ -208,7 +200,7 @@ StdGlobalInterfaceTable_RegisterInterfac } zero.QuadPart = 0; - IStream_Seek(stream, zero, SEEK_SET, NULL); + IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); entry = HeapAlloc(GetProcessHeap(), 0, sizeof(StdGITEntry)); if (entry == NULL) return E_OUTOFMEMORY; diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index dd50486..01368cb 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -20,11 +20,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - -#include <stdlib.h> #include <stdarg.h> -#include <stdio.h> #include <string.h> #include <assert.h> @@ -35,10 +31,7 @@ #include "winuser.h" #include "objbase.h" #include "ole2.h" -#include "rpc.h" #include "winerror.h" -#include "winreg.h" -#include "wtypes.h" #include "wine/unicode.h" #include "compobj_private.h" @@ -1780,7 +1773,7 @@ HRESULT WINAPI CoMarshalInterThreadInter if (SUCCEEDED(hres)) { memset(&seekto, 0, sizeof(seekto)); - IStream_Seek(*ppStm, seekto, SEEK_SET, &xpos); + IStream_Seek(*ppStm, seekto, STREAM_SEEK_SET, &xpos); } else { diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index f063883..d28241b 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -23,11 +23,8 @@ #include "config.h" #include "wine/port.h" -#include <stdlib.h> #include <stdarg.h> -#include <stdio.h> #include <string.h> -#include <assert.h> #define COBJMACROS #define NONAMELESSUNION @@ -42,7 +39,6 @@ #include "rpc.h" #include "winerror.h" #include "winreg.h" -#include "wtypes.h" #include "wine/unicode.h" #include "compobj_private.h" diff --git a/dlls/ole32/stubmanager.c b/dlls/ole32/stubmanager.c index 264a2e5..3665443 100644 --- a/dlls/ole32/stubmanager.c +++ b/dlls/ole32/stubmanager.c @@ -35,9 +35,8 @@ #include "winbase.h" #include "winuser.h" #include "objbase.h" -#include "ole2.h" -#include "ole2ver.h" #include "rpc.h" + #include "wine/debug.h" #include "compobj_private.h"
1
0
0
0
Rob Shearman : ole32: Move test for CoGetInterfaceAndReleaseStream to compobj.c.
by Alexandre Julliard
10 Jan '07
10 Jan '07
Module: wine Branch: master Commit: d02b27c0e999dcdf12a0772294687ec5db477fc7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d02b27c0e999dcdf12a077229…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jan 9 17:15:02 2007 +0000 ole32: Move test for CoGetInterfaceAndReleaseStream to compobj.c. --- dlls/ole32/tests/compobj.c | 13 +++++++++++++ dlls/ole32/tests/marshal.c | 11 ----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index 81bf831..d68d54a 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -455,6 +455,18 @@ static void test_CoGetPSClsid(void) CoUninitialize(); } +static void test_CoGetInterfaceAndReleaseStream(void) +{ + HRESULT hr; + IUnknown *pUnk; + + pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + hr = CoGetInterfaceAndReleaseStream(NULL, &IID_IUnknown, (void**)&pUnk); + ok(hr == E_INVALIDARG, "hr %08x\n", hr); + + CoUninitialize(); +} START_TEST(compobj) { @@ -474,4 +486,5 @@ START_TEST(compobj) test_CoRegisterMessageFilter(); test_CoRegisterPSClsid(); test_CoGetPSClsid(); + test_CoGetInterfaceAndReleaseStream(); } diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index f1d912e..1742588 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -2150,15 +2150,6 @@ static void test_globalinterfacetable(vo CloseHandle(thread); } -static void test_CoGetInterfaceAndReleaseStream(void) -{ - HRESULT hr; - IUnknown *pUnk; - - hr = CoGetInterfaceAndReleaseStream(NULL, &IID_IUnknown, (void**)&pUnk); - ok(hr == E_INVALIDARG, "hr %08x\n", hr); -} - static const char *debugstr_iid(REFIID riid) { static char name[256]; @@ -2429,8 +2420,6 @@ START_TEST(marshal) test_globalinterfacetable(); - test_CoGetInterfaceAndReleaseStream(); - /* must be last test as channel hooks can't be unregistered */ test_channel_hook();
1
0
0
0
Rob Shearman : ole32: Use the standard list functions for the global interface table implementation .
by Alexandre Julliard
10 Jan '07
10 Jan '07
Module: wine Branch: master Commit: 43d0d85f6713440a4a3370596b7a88772ea57872 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43d0d85f6713440a4a3370596…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jan 9 17:15:06 2007 +0000 ole32: Use the standard list functions for the global interface table implementation. --- dlls/ole32/git.c | 26 +++++++------------------- 1 files changed, 7 insertions(+), 19 deletions(-) diff --git a/dlls/ole32/git.c b/dlls/ole32/git.c index fbfa95f..4f8d17d 100644 --- a/dlls/ole32/git.c +++ b/dlls/ole32/git.c @@ -47,6 +47,7 @@ #include "compobj_private.h" +#include "wine/list.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); @@ -65,8 +66,7 @@ typedef struct StdGITEntry IID iid; /* IID of the interface */ IStream* stream; /* Holds the marshalled interface */ - struct StdGITEntry* next; - struct StdGITEntry* prev; + struct list entry; } StdGITEntry; /* Class data */ @@ -75,8 +75,7 @@ typedef struct StdGlobalInterfaceTableIm const IGlobalInterfaceTableVtbl *lpVtbl; ULONG ref; - struct StdGITEntry* firstEntry; - struct StdGITEntry* lastEntry; + struct list list; ULONG nextCookie; } StdGlobalInterfaceTableImpl; @@ -116,13 +115,11 @@ StdGlobalInterfaceTable_FindEntry(IGloba TRACE("iface=%p, cookie=0x%x\n", iface, (UINT)cookie); EnterCriticalSection(&git_section); - e = self->firstEntry; - while (e != NULL) { + LIST_FOR_EACH_ENTRY(e, &self->list, StdGITEntry, entry) { if (e->cookie == cookie) { LeaveCriticalSection(&git_section); return e; } - e = e->next; } LeaveCriticalSection(&git_section); @@ -224,11 +221,7 @@ StdGlobalInterfaceTable_RegisterInterfac self->nextCookie++; /* inc the cookie count */ /* insert the new entry at the end of the list */ - entry->next = NULL; - entry->prev = self->lastEntry; - if (entry->prev) entry->prev->next = entry; - else self->firstEntry = entry; - self->lastEntry = entry; + list_add_tail(&self->list, &entry->entry); /* and return the cookie */ *pdwCookie = entry->cookie; @@ -243,7 +236,6 @@ static HRESULT WINAPI StdGlobalInterfaceTable_RevokeInterfaceFromGlobal( IGlobalInterfaceTable* iface, DWORD dwCookie) { - StdGlobalInterfaceTableImpl* const self = (StdGlobalInterfaceTableImpl*) iface; StdGITEntry* entry; HRESULT hr; @@ -266,10 +258,7 @@ StdGlobalInterfaceTable_RevokeInterfaceF /* chop entry out of the list, and free the memory */ EnterCriticalSection(&git_section); - if (entry->prev) entry->prev->next = entry->next; - else self->firstEntry = entry->next; - if (entry->next) entry->next->prev = entry->prev; - else self->lastEntry = entry->prev; + list_remove(&entry->entry); LeaveCriticalSection(&git_section); HeapFree(GetProcessHeap(), 0, entry); @@ -400,8 +389,7 @@ void* StdGlobalInterfaceTable_Construct( newGIT->lpVtbl = &StdGlobalInterfaceTableImpl_Vtbl; newGIT->ref = 1; /* Initialise the reference count */ - newGIT->firstEntry = NULL; /* we start with an empty table */ - newGIT->lastEntry = NULL; + list_init(&newGIT->list); newGIT->nextCookie = 0xf100; /* that's where windows starts, so that's where we start */ TRACE("Created the GIT at %p\n", newGIT);
1
0
0
0
Rob Shearman : ole32: Move the Running Object Table test in marshal. c to moniker.c to put it with the other ROT tests.
by Alexandre Julliard
10 Jan '07
10 Jan '07
Module: wine Branch: master Commit: c21f5c7c6ab205f1f1c936ca236f8f29d619178f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c21f5c7c6ab205f1f1c936ca2…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jan 9 17:14:53 2007 +0000 ole32: Move the Running Object Table test in marshal.c to moniker.c to put it with the other ROT tests. --- dlls/ole32/tests/marshal.c | 29 ----------------------------- dlls/ole32/tests/moniker.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index 9a30df4..f1d912e 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -2088,34 +2088,6 @@ static void test_out_of_process_com(void CloseHandle(heventShutdown); } -static void test_ROT(void) -{ - static const WCHAR wszFileName[] = {'B','E','2','0','E','2','F','5','-', - '1','9','0','3','-','4','A','A','E','-','B','1','A','F','-', - '2','0','4','6','E','5','8','6','C','9','2','5',0}; - HRESULT hr; - IMoniker *pMoniker = NULL; - IRunningObjectTable *pROT = NULL; - DWORD dwCookie; - - cLocks = 0; - - hr = CreateFileMoniker(wszFileName, &pMoniker); - ok_ole_success(hr, CreateClassMoniker); - hr = GetRunningObjectTable(0, &pROT); - ok_ole_success(hr, GetRunningObjectTable); - hr = IRunningObjectTable_Register(pROT, 0, (IUnknown*)&Test_ClassFactory, pMoniker, &dwCookie); - ok_ole_success(hr, IRunningObjectTable_Register); - IMoniker_Release(pMoniker); - - ok_more_than_one_lock(); - - hr = IRunningObjectTable_Revoke(pROT, dwCookie); - ok_ole_success(hr, IRunningObjectTable_Revoke); - - ok_no_locks(); -} - struct git_params { DWORD cookie; @@ -2455,7 +2427,6 @@ START_TEST(marshal) /* doesn't pass with Win9x COM DLLs (even though Essential COM says it should) */ if (0) test_out_of_process_com(); - test_ROT(); test_globalinterfacetable(); test_CoGetInterfaceAndReleaseStream(); diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c index 2195750..6203ea6 100644 --- a/dlls/ole32/tests/moniker.c +++ b/dlls/ole32/tests/moniker.c @@ -584,6 +584,20 @@ static void test_ROT(void) hr = CreateFileMoniker(wszFileName, &pMoniker); ok_ole_success(hr, CreateClassMoniker); + /* test flags: 0 */ + hr = IRunningObjectTable_Register(pROT, 0, (IUnknown*)&Test_ClassFactory, + pMoniker, &dwCookie); + ok_ole_success(hr, IRunningObjectTable_Register); + IMoniker_Release(pMoniker); + + ok_more_than_one_lock(); + + hr = IRunningObjectTable_Revoke(pROT, dwCookie); + ok_ole_success(hr, IRunningObjectTable_Revoke); + + ok_no_locks(); + + /* test flags: ROTFLAGS_REGISTRATIONKEEPSALIVE */ hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE, (IUnknown*)&Test_ClassFactory, pMoniker, &dwCookie); ok_ole_success(hr, IRunningObjectTable_Register); @@ -595,6 +609,7 @@ static void test_ROT(void) ok_no_locks(); + /* test flags: ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT */ /* only succeeds when process is started by SCM and has LocalService * or RunAs AppId values */ hr = IRunningObjectTable_Register(pROT,
1
0
0
0
Rob Shearman : ole32: Fix a comment in rpc_sendreceive_thread that wasn' t correct.
by Alexandre Julliard
10 Jan '07
10 Jan '07
Module: wine Branch: master Commit: beaaf0514fa194081005e232f43bf99453abc383 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=beaaf0514fa194081005e232f…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jan 9 17:14:45 2007 +0000 ole32: Fix a comment in rpc_sendreceive_thread that wasn't correct. --- dlls/ole32/rpc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index 4f35ea1..f063883 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -704,7 +704,8 @@ static DWORD WINAPI rpc_sendreceive_thre { struct dispatch_params *data = (struct dispatch_params *) param; - /* FIXME: trap and rethrow RPC exceptions in app thread */ + /* Note: I_RpcSendReceive doesn't raise exceptions like the higher-level + * RPC functions do */ data->status = I_RpcSendReceive((RPC_MESSAGE *)data->msg); TRACE("completed with status 0x%lx\n", data->status);
1
0
0
0
Rob Shearman : ole32: Remove a FIXME comment that no longer applies.
by Alexandre Julliard
10 Jan '07
10 Jan '07
Module: wine Branch: master Commit: 84158d674252ecee8b023baf76a86963f73d6aed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=84158d674252ecee8b023baf7…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jan 9 17:14:39 2007 +0000 ole32: Remove a FIXME comment that no longer applies. --- dlls/ole32/compobj.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index f5e2789..452ea0d 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -3219,7 +3219,6 @@ HRESULT WINAPI CoWaitForMultipleHandles( * COM call */ if (COM_PeekMessage(apt, &msg)) { - /* FIXME: filter the messages here */ TRACE("received message whilst waiting for RPC: 0x%04x\n", msg.message); TranslateMessage(&msg); DispatchMessageW(&msg);
1
0
0
0
James Hawkins : advpack: Fill the output buffer to workaround a bug in IE7s advpack.
by Alexandre Julliard
10 Jan '07
10 Jan '07
Module: wine Branch: master Commit: b3331d1a76a5116b391b0757bfcf6752a307d3d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3331d1a76a5116b391b0757b…
Author: James Hawkins <truiken(a)gmail.com> Date: Tue Jan 9 22:21:17 2007 -0600 advpack: Fill the output buffer to workaround a bug in IE7s advpack. --- dlls/advpack/tests/advpack.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/advpack/tests/advpack.c b/dlls/advpack/tests/advpack.c index c9a2d36..9cf1e8a 100644 --- a/dlls/advpack/tests/advpack.c +++ b/dlls/advpack/tests/advpack.c @@ -329,6 +329,8 @@ static void translateinfstringex_test(vo ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); /* try an empty filename */ + memset(buffer, 'a', 25); + buffer[24] = '\0'; size = MAX_PATH; hr = pTranslateInfStringEx(hinf, "", "Options.NTx86", "InstallDir", buffer, size, &size, NULL); @@ -360,6 +362,8 @@ static void translateinfstringex_test(vo ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr); /* successfully translate the string */ + memset(buffer, 'a', 25); + buffer[24] = '\0'; size = MAX_PATH; hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "Options.NTx86", "InstallDir", buffer, size, &size, NULL); @@ -383,6 +387,8 @@ static void translateinfstringex_test(vo ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); /* translate the string with the install section specified */ + memset(buffer, 'a', PROG_FILES_LEN); + buffer[PROG_FILES_LEN - 1] = '\0'; size = MAX_PATH; hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "Options.NTx86", "InstallDir", buffer, size, &size, NULL);
1
0
0
0
← Newer
1
...
51
52
53
54
55
56
57
...
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