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
July
June
May
April
March
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
March 2015
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
775 discussions
Start a n
N
ew thread
Francois Gouget : activeds: Remove an unneeded NONAMELESSUNION directive.
by Alexandre Julliard
09 Mar '15
09 Mar '15
Module: wine Branch: master Commit: 988a6d099f7fc8ea7959358a0ca6bab1ebe514e5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=988a6d099f7fc8ea7959358a0…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Mar 9 09:31:12 2015 +0100 activeds: Remove an unneeded NONAMELESSUNION directive. --- dlls/activeds/activeds_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/activeds/activeds_main.c b/dlls/activeds/activeds_main.c index c249cf1..15a329e 100644 --- a/dlls/activeds/activeds_main.c +++ b/dlls/activeds/activeds_main.c @@ -24,7 +24,6 @@ #include <stdarg.h> #define COBJMACROS -#define NONAMELESSUNION #include "windef.h" #include "winbase.h"
1
0
0
0
Francois Gouget : wrc: Remove an unused lexer definition.
by Alexandre Julliard
09 Mar '15
09 Mar '15
Module: wine Branch: master Commit: 9cb557913077891d569cdbacc31c1b014f407643 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9cb557913077891d569cdbacc…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Mar 9 09:30:18 2015 +0100 wrc: Remove an unused lexer definition. --- tools/wrc/parser.l | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l index 16a487f..80072b2 100644 --- a/tools/wrc/parser.l +++ b/tools/wrc/parser.l @@ -90,7 +90,6 @@ /* Some shortcut definitions */ ws [ \f\t\r] -cident [a-zA-Z_][0-9a-zA-Z_]* %{
1
0
0
0
Nikolay Sivov : vbscript: Use CP_ACP instead of its numeric value.
by Alexandre Julliard
09 Mar '15
09 Mar '15
Module: wine Branch: master Commit: 4b15e6fd094a496e7f4bae549253931562e62e44 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b15e6fd094a496e7f4bae549…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Mar 8 13:51:37 2015 +0300 vbscript: Use CP_ACP instead of its numeric value. --- dlls/vbscript/global.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index 448b886..74acff7 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -1303,7 +1303,7 @@ static HRESULT Global_Chr(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA buf[len++] = c>>8; if(!len || IsDBCSLeadByteEx(cp, buf[0])) buf[len++] = c; - if(!MultiByteToWideChar(0, 0, buf, len, &ch, 1)) { + if(!MultiByteToWideChar(CP_ACP, 0, buf, len, &ch, 1)) { WARN("invalid arg %d, cp %d\n", c, cp); return E_FAIL; }
1
0
0
0
Nikolay Sivov : oleaut32: Use WdtpInterfacePointer_* functions in VARIANT marshalling.
by Alexandre Julliard
09 Mar '15
09 Mar '15
Module: wine Branch: master Commit: 44360823b985918db874bf8b94c09dc2293813fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44360823b985918db874bf8b9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Mar 8 11:04:29 2015 +0300 oleaut32: Use WdtpInterfacePointer_* functions in VARIANT marshalling. --- dlls/ole32/tests/usrmarshal.c | 29 +++++++-- dlls/oleaut32/tests/usrmarshal.c | 20 +++--- dlls/oleaut32/usrmarshal.c | 127 +++++++++------------------------------ 3 files changed, 62 insertions(+), 114 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=44360823b985918db874b…
1
0
0
0
Nikolay Sivov : oleaut32/tests: Hide details about VARIANT wire header in header testing helper.
by Alexandre Julliard
09 Mar '15
09 Mar '15
Module: wine Branch: master Commit: 52d30cc301b1c4a7c40532ef5971abbb65a2eb84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=52d30cc301b1c4a7c40532ef5…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Mar 7 23:40:35 2015 +0300 oleaut32/tests: Hide details about VARIANT wire header in header testing helper. --- dlls/oleaut32/tests/usrmarshal.c | 103 +++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 59 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=52d30cc301b1c4a7c4053…
1
0
0
0
Nikolay Sivov : wshom.ocx: Implement CurrentDirectory() property.
by Alexandre Julliard
09 Mar '15
09 Mar '15
Module: wine Branch: master Commit: b9819b0b8ed6d92421349c9116f07b559ae7bb29 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9819b0b8ed6d92421349c911…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Mar 7 16:40:52 2015 +0300 wshom.ocx: Implement CurrentDirectory() property. --- dlls/wshom.ocx/shell.c | 33 +++++++++++++++++++++++++++++---- dlls/wshom.ocx/tests/wshom.c | 25 +++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 422f89b..c164b70 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -1329,14 +1329,39 @@ static HRESULT WINAPI WshShell3_Exec(IWshShell3 *iface, BSTR command, IWshExec * static HRESULT WINAPI WshShell3_get_CurrentDirectory(IWshShell3 *iface, BSTR *dir) { - FIXME("(%p): stub\n", dir); - return E_NOTIMPL; + DWORD ret; + + TRACE("(%p)\n", dir); + + ret = GetCurrentDirectoryW(0, NULL); + if (!ret) + return HRESULT_FROM_WIN32(GetLastError()); + + *dir = SysAllocStringLen(NULL, ret-1); + if (!*dir) + return E_OUTOFMEMORY; + + ret = GetCurrentDirectoryW(ret, *dir); + if (!ret) { + SysFreeString(*dir); + *dir = NULL; + return HRESULT_FROM_WIN32(GetLastError()); + } + + return S_OK; } static HRESULT WINAPI WshShell3_put_CurrentDirectory(IWshShell3 *iface, BSTR dir) { - FIXME("(%s): stub\n", debugstr_w(dir)); - return E_NOTIMPL; + TRACE("(%s)\n", debugstr_w(dir)); + + if (!dir) + return E_INVALIDARG; + + if (!SetCurrentDirectoryW(dir)) + return HRESULT_FROM_WIN32(GetLastError()); + + return S_OK; } static const IWshShell3Vtbl WshShell3Vtbl = { diff --git a/dlls/wshom.ocx/tests/wshom.c b/dlls/wshom.ocx/tests/wshom.c index 888023f..0a69af3 100644 --- a/dlls/wshom.ocx/tests/wshom.c +++ b/dlls/wshom.ocx/tests/wshom.c @@ -39,6 +39,8 @@ static void test_wshshell(void) static const WCHAR pathW[] = {'%','P','A','T','H','%',0}; static const WCHAR sysW[] = {'S','Y','S','T','E','M',0}; static const WCHAR path2W[] = {'P','A','T','H',0}; + static const WCHAR dummydirW[] = {'d','e','a','d','p','a','r','r','o','t',0}; + static const WCHAR emptyW[] = {'e','m','p','t','y',0}; IWshEnvironment *env; IWshShell3 *sh3; IDispatchEx *dispex; @@ -209,6 +211,29 @@ static void test_wshshell(void) SysFreeString(str); + /* current directory */ +if (0) /* crashes on native */ + hr = IWshShell3_get_CurrentDirectory(sh3, NULL); + + str = NULL; + hr = IWshShell3_get_CurrentDirectory(sh3, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(str && str[0] != 0, "got empty string\n"); + SysFreeString(str); + + hr = IWshShell3_put_CurrentDirectory(sh3, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + str = SysAllocString(emptyW); + hr = IWshShell3_put_CurrentDirectory(sh3, str); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); + SysFreeString(str); + + str = SysAllocString(dummydirW); + hr = IWshShell3_put_CurrentDirectory(sh3, str); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); + SysFreeString(str); + IWshCollection_Release(coll); IDispatch_Release(disp); IWshShell3_Release(sh3);
1
0
0
0
Nikolay Sivov : wshom.ocx: Added missing IWshShell3 methods.
by Alexandre Julliard
09 Mar '15
09 Mar '15
Module: wine Branch: master Commit: 99afcdff2d453a4788d1e897bfc0226cb7fb3d32 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99afcdff2d453a4788d1e897b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Mar 7 15:35:42 2015 +0300 wshom.ocx: Added missing IWshShell3 methods. --- dlls/wshom.ocx/shell.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 198531e..422f89b 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -1321,6 +1321,24 @@ static HRESULT WINAPI WshShell3_SendKeys(IWshShell3 *iface, BSTR Keys, VARIANT * return E_NOTIMPL; } +static HRESULT WINAPI WshShell3_Exec(IWshShell3 *iface, BSTR command, IWshExec **ret) +{ + FIXME("(%s %p): stub\n", debugstr_w(command), ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI WshShell3_get_CurrentDirectory(IWshShell3 *iface, BSTR *dir) +{ + FIXME("(%p): stub\n", dir); + return E_NOTIMPL; +} + +static HRESULT WINAPI WshShell3_put_CurrentDirectory(IWshShell3 *iface, BSTR dir) +{ + FIXME("(%s): stub\n", debugstr_w(dir)); + return E_NOTIMPL; +} + static const IWshShell3Vtbl WshShell3Vtbl = { WshShell3_QueryInterface, WshShell3_AddRef, @@ -1340,7 +1358,10 @@ static const IWshShell3Vtbl WshShell3Vtbl = { WshShell3_RegDelete, WshShell3_LogEvent, WshShell3_AppActivate, - WshShell3_SendKeys + WshShell3_SendKeys, + WshShell3_Exec, + WshShell3_get_CurrentDirectory, + WshShell3_put_CurrentDirectory }; static IWshShell3 WshShell3 = { &WshShell3Vtbl };
1
0
0
0
Nikolay Sivov : rpcrt4: Add all stubs to OLE marshalling stream.
by Alexandre Julliard
09 Mar '15
09 Mar '15
Module: wine Branch: master Commit: 15d7436a0d7f134b48d3b51d4638df50cfa669a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=15d7436a0d7f134b48d3b51d4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Mar 6 21:07:39 2015 +0300 rpcrt4: Add all stubs to OLE marshalling stream. --- dlls/rpcrt4/ndr_ole.c | 67 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 59 insertions(+), 8 deletions(-) diff --git a/dlls/rpcrt4/ndr_ole.c b/dlls/rpcrt4/ndr_ole.c index 81d08b3..143bba7 100644 --- a/dlls/rpcrt4/ndr_ole.c +++ b/dlls/rpcrt4/ndr_ole.c @@ -19,7 +19,6 @@ * * TODO: * - fix the wire-protocol to match MS/RPC - * - finish RpcStream_Vtbl */ #include <stdarg.h> @@ -194,6 +193,58 @@ static HRESULT WINAPI RpcStream_SetSize(LPSTREAM iface, return S_OK; } +static HRESULT WINAPI RpcStream_CopyTo(IStream *iface, IStream *dest, + ULARGE_INTEGER len, ULARGE_INTEGER *read, ULARGE_INTEGER *written) +{ + RpcStreamImpl *This = impl_from_IStream(iface); + FIXME("(%p): stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI RpcStream_Commit(IStream *iface, DWORD flags) +{ + RpcStreamImpl *This = impl_from_IStream(iface); + FIXME("(%p)->(0x%08x): stub\n", This, flags); + return E_NOTIMPL; +} + +static HRESULT WINAPI RpcStream_Revert(IStream *iface) +{ + RpcStreamImpl *This = impl_from_IStream(iface); + FIXME("(%p): stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI RpcStream_LockRegion(IStream *iface, + ULARGE_INTEGER offset, ULARGE_INTEGER len, DWORD locktype) +{ + RpcStreamImpl *This = impl_from_IStream(iface); + FIXME("(%p): stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI RpcStream_UnlockRegion(IStream *iface, + ULARGE_INTEGER offset, ULARGE_INTEGER len, DWORD locktype) +{ + RpcStreamImpl *This = impl_from_IStream(iface); + FIXME("(%p): stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI RpcStream_Stat(IStream *iface, STATSTG *stat, DWORD flag) +{ + RpcStreamImpl *This = impl_from_IStream(iface); + FIXME("(%p): stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI RpcStream_Clone(IStream *iface, IStream **cloned) +{ + RpcStreamImpl *This = impl_from_IStream(iface); + FIXME("(%p): stub\n", This); + return E_NOTIMPL; +} + static const IStreamVtbl RpcStream_Vtbl = { RpcStream_QueryInterface, @@ -203,13 +254,13 @@ static const IStreamVtbl RpcStream_Vtbl = RpcStream_Write, RpcStream_Seek, RpcStream_SetSize, - NULL, /* CopyTo */ - NULL, /* Commit */ - NULL, /* Revert */ - NULL, /* LockRegion */ - NULL, /* UnlockRegion */ - NULL, /* Stat */ - NULL /* Clone */ + RpcStream_CopyTo, + RpcStream_Commit, + RpcStream_Revert, + RpcStream_LockRegion, + RpcStream_UnlockRegion, + RpcStream_Stat, + RpcStream_Clone }; static HRESULT RpcStream_Create(PMIDL_STUB_MESSAGE pStubMsg, BOOL init, ULONG *size, IStream **stream)
1
0
0
0
Nikolay Sivov : rpcrt4: Return buffer size directly to avoid accessing implementation fields.
by Alexandre Julliard
09 Mar '15
09 Mar '15
Module: wine Branch: master Commit: 71d663f1deb66caed55a8c11c537c5e8da646eb2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71d663f1deb66caed55a8c11c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Mar 6 20:28:24 2015 +0300 rpcrt4: Return buffer size directly to avoid accessing implementation fields. --- dlls/rpcrt4/ndr_ole.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/dlls/rpcrt4/ndr_ole.c b/dlls/rpcrt4/ndr_ole.c index 0ad4860..81d08b3 100644 --- a/dlls/rpcrt4/ndr_ole.c +++ b/dlls/rpcrt4/ndr_ole.c @@ -212,21 +212,23 @@ static const IStreamVtbl RpcStream_Vtbl = NULL /* Clone */ }; -static HRESULT RpcStream_Create(PMIDL_STUB_MESSAGE pStubMsg, BOOL init, IStream **stream) +static HRESULT RpcStream_Create(PMIDL_STUB_MESSAGE pStubMsg, BOOL init, ULONG *size, IStream **stream) { RpcStreamImpl *This; *stream = NULL; - This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(RpcStreamImpl)); + This = HeapAlloc(GetProcessHeap(), 0, sizeof(RpcStreamImpl)); if (!This) return E_OUTOFMEMORY; This->IStream_iface.lpVtbl = &RpcStream_Vtbl; This->RefCount = 1; This->pMsg = pStubMsg; This->size = (LPDWORD)pStubMsg->Buffer; - This->data = (unsigned char*)(This->size + 1); + This->data = pStubMsg->Buffer + sizeof(DWORD); This->pos = 0; if (init) *This->size = 0; TRACE("init size=%d\n", *This->size); + + if (size) *size = *This->size; *stream = &This->IStream_iface; return S_OK; } @@ -263,7 +265,7 @@ unsigned char * WINAPI NdrInterfacePointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, pStubMsg->MaxCount = 0; if (!LoadCOM()) return NULL; if (pStubMsg->Buffer + sizeof(DWORD) <= (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) { - hr = RpcStream_Create(pStubMsg, TRUE, &stream); + hr = RpcStream_Create(pStubMsg, TRUE, NULL, &stream); if (hr == S_OK) { if (pMemory) hr = COM_MarshalInterface(stream, riid, (LPUNKNOWN)pMemory, @@ -293,9 +295,11 @@ unsigned char * WINAPI NdrInterfacePointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg if (!LoadCOM()) return NULL; *(LPVOID*)ppMemory = NULL; if (pStubMsg->Buffer + sizeof(DWORD) < (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) { - hr = RpcStream_Create(pStubMsg, FALSE, &stream); + ULONG size; + + hr = RpcStream_Create(pStubMsg, FALSE, &size, &stream); if (hr == S_OK) { - if (*((RpcStreamImpl *)stream)->size != 0) + if (size != 0) hr = COM_UnmarshalInterface(stream, &IID_NULL, (LPVOID*)ppMemory); IStream_Release(stream);
1
0
0
0
Nikolay Sivov : rpcrt4: Handle memory allocation error when creating OLE stream instance.
by Alexandre Julliard
09 Mar '15
09 Mar '15
Module: wine Branch: master Commit: e7a608a4e317f28546c1f2c4d880113fdc33485c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7a608a4e317f28546c1f2c4d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Mar 6 20:16:40 2015 +0300 rpcrt4: Handle memory allocation error when creating OLE stream instance. --- dlls/rpcrt4/ndr_ole.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/dlls/rpcrt4/ndr_ole.c b/dlls/rpcrt4/ndr_ole.c index c3ab529..0ad4860 100644 --- a/dlls/rpcrt4/ndr_ole.c +++ b/dlls/rpcrt4/ndr_ole.c @@ -95,14 +95,15 @@ static HRESULT WINAPI RpcStream_QueryInterface(LPSTREAM iface, REFIID riid, LPVOID *obj) { - RpcStreamImpl *This = impl_from_IStream(iface); if (IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_ISequentialStream, riid) || IsEqualGUID(&IID_IStream, riid)) { - *obj = This; - InterlockedIncrement( &This->RefCount ); + *obj = iface; + IStream_AddRef(iface); return S_OK; } + + *obj = NULL; return E_NOINTERFACE; } @@ -120,7 +121,6 @@ static ULONG WINAPI RpcStream_Release(LPSTREAM iface) TRACE("size=%d\n", *This->size); This->pMsg->Buffer = This->data + *This->size; HeapFree(GetProcessHeap(),0,This); - return 0; } return ref; } @@ -212,11 +212,13 @@ static const IStreamVtbl RpcStream_Vtbl = NULL /* Clone */ }; -static LPSTREAM RpcStream_Create(PMIDL_STUB_MESSAGE pStubMsg, BOOL init) +static HRESULT RpcStream_Create(PMIDL_STUB_MESSAGE pStubMsg, BOOL init, IStream **stream) { RpcStreamImpl *This; + + *stream = NULL; This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(RpcStreamImpl)); - if (!This) return NULL; + if (!This) return E_OUTOFMEMORY; This->IStream_iface.lpVtbl = &RpcStream_Vtbl; This->RefCount = 1; This->pMsg = pStubMsg; @@ -225,7 +227,8 @@ static LPSTREAM RpcStream_Create(PMIDL_STUB_MESSAGE pStubMsg, BOOL init) This->pos = 0; if (init) *This->size = 0; TRACE("init size=%d\n", *This->size); - return (LPSTREAM)This; + *stream = &This->IStream_iface; + return S_OK; } static const IID* get_ip_iid(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat) @@ -260,19 +263,17 @@ unsigned char * WINAPI NdrInterfacePointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, pStubMsg->MaxCount = 0; if (!LoadCOM()) return NULL; if (pStubMsg->Buffer + sizeof(DWORD) <= (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) { - stream = RpcStream_Create(pStubMsg, TRUE); - if (stream) { + hr = RpcStream_Create(pStubMsg, TRUE, &stream); + if (hr == S_OK) { if (pMemory) hr = COM_MarshalInterface(stream, riid, (LPUNKNOWN)pMemory, pStubMsg->dwDestContext, pStubMsg->pvDestContext, MSHLFLAGS_NORMAL); - else - hr = S_OK; - IStream_Release(stream); - if (FAILED(hr)) - RpcRaiseException(hr); } + + if (FAILED(hr)) + RpcRaiseException(hr); } return NULL; } @@ -292,13 +293,14 @@ unsigned char * WINAPI NdrInterfacePointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg if (!LoadCOM()) return NULL; *(LPVOID*)ppMemory = NULL; if (pStubMsg->Buffer + sizeof(DWORD) < (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) { - stream = RpcStream_Create(pStubMsg, FALSE); - if (!stream) RpcRaiseException(E_OUTOFMEMORY); - if (*((RpcStreamImpl *)stream)->size != 0) - hr = COM_UnmarshalInterface(stream, &IID_NULL, (LPVOID*)ppMemory); - else - hr = S_OK; - IStream_Release(stream); + hr = RpcStream_Create(pStubMsg, FALSE, &stream); + if (hr == S_OK) { + if (*((RpcStreamImpl *)stream)->size != 0) + hr = COM_UnmarshalInterface(stream, &IID_NULL, (LPVOID*)ppMemory); + + IStream_Release(stream); + } + if (FAILED(hr)) RpcRaiseException(hr); }
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
78
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
Results per page:
10
25
50
100
200