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
October 2009
----- 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
3 participants
1207 discussions
Start a n
N
ew thread
Huw Davies : oledb32: Add a couple of conversions to DBTYPE_FILETIME.
by Alexandre Julliard
27 Oct '09
27 Oct '09
Module: wine Branch: master Commit: 76e009056557db810afaa8af042b7248b879f7a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=76e009056557db810afaa8af0…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Oct 27 12:25:19 2009 +0000 oledb32: Add a couple of conversions to DBTYPE_FILETIME. --- dlls/oledb32/convert.c | 14 ++++++++++++++ dlls/oledb32/tests/convert.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 0 deletions(-) diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index e5443cb..44d86bb 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -128,6 +128,8 @@ static int get_length(DBTYPE type) return 8; case DBTYPE_BSTR: return sizeof(BSTR); + case DBTYPE_FILETIME: + return sizeof(FILETIME); case DBTYPE_WSTR: case DBTYPE_BYREF | DBTYPE_WSTR: return 0; @@ -281,6 +283,18 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, break; } + case DBTYPE_FILETIME: + { + FILETIME *d = dst; + switch(src_type) + { + case DBTYPE_EMPTY: d->dwLowDateTime = d->dwHighDateTime = 0; hr = S_OK; break; + case DBTYPE_FILETIME: *d = *(FILETIME*)src; hr = S_OK; break; + default: FIXME("Unimplemented conversion %04x -> FILETIME\n", src_type); return E_NOTIMPL; + } + break; + } + case DBTYPE_WSTR: { BSTR b; diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c index 6cd44f5..2095b9b 100644 --- a/dlls/oledb32/tests/convert.c +++ b/dlls/oledb32/tests/convert.c @@ -1111,6 +1111,34 @@ static void test_converttobyrefwstr(void) IDataConvert_Release(convert); } +static void test_converttofiletime(void) +{ + IDataConvert *convert; + HRESULT hr; + FILETIME dst; + BYTE src[20]; + DBSTATUS dst_status; + DBLENGTH dst_len; + + hr = CoCreateInstance(&CLSID_OLEDB_CONVERSIONLIBRARY, NULL, CLSCTX_INPROC_SERVER, &IID_IDataConvert, (void**)&convert); + if(FAILED(hr)) + { + win_skip("Unable to load oledb conversion library\n"); + return; + } + + memset(&dst, 0xcc, sizeof(dst)); + ((FILETIME *)src)->dwLowDateTime = 0x12345678; + ((FILETIME *)src)->dwHighDateTime = 0x9abcdef0; + hr = IDataConvert_DataConvert(convert, DBTYPE_FILETIME, DBTYPE_FILETIME, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); + ok(hr == S_OK, "got %08x\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); + ok(dst_len == sizeof(dst), "got %d\n", dst_len); + ok(dst.dwLowDateTime == 0x12345678, "got %08x\n", dst.dwLowDateTime); + ok(dst.dwHighDateTime == 0x9abcdef0, "got %08x\n", dst.dwHighDateTime); + + IDataConvert_Release(convert); +} START_TEST(convert) { @@ -1122,5 +1150,6 @@ START_TEST(convert) test_converttobstr(); test_converttowstr(); test_converttobyrefwstr(); + test_converttofiletime(); OleUninitialize(); }
1
0
0
0
Huw Davies : oledb32: Add CanConvert support for DBTYPE_FILETIME.
by Alexandre Julliard
27 Oct '09
27 Oct '09
Module: wine Branch: master Commit: ed53dafcab9935682d4c8184ce9f4c3dba7a07a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed53dafcab9935682d4c8184c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Oct 27 12:17:27 2009 +0000 oledb32: Add CanConvert support for DBTYPE_FILETIME. --- dlls/oledb32/convert.c | 18 +++++++++++++++--- dlls/oledb32/tests/convert.c | 27 ++++++++++++++------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index ad86398..e5443cb 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -452,6 +452,7 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface, { case DBTYPE_DATE: case DBTYPE_GUID: + case DBTYPE_FILETIME: return S_OK; default: if(dst_base_type == DBTYPE_DBTIMESTAMP) return S_OK; @@ -462,7 +463,8 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface, switch(dst_base_type) { case DBTYPE_NULL: - case DBTYPE_VARIANT: return S_OK; + case DBTYPE_VARIANT: + case DBTYPE_FILETIME: return S_OK; default: return S_FALSE; } @@ -486,8 +488,12 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface, case DBTYPE_I8: if(common_class(dst_class)) return S_OK; - if(dst_base_type == DBTYPE_BYTES) return S_OK; - return S_FALSE; + switch(dst_base_type) + { + case DBTYPE_BYTES: + case DBTYPE_FILETIME: return S_OK; + default: return S_FALSE; + } case DBTYPE_DATE: switch(dst_class) @@ -502,6 +508,7 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface, case DBTYPE_I8: case DBTYPE_DATE: case DBTYPE_DBDATE: + case DBTYPE_FILETIME: return S_OK; default: return S_FALSE; } @@ -524,6 +531,7 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface, case DBTYPE_GUID: case DBTYPE_BYTES: case DBTYPE_DBDATE: + case DBTYPE_FILETIME: return S_OK; default: return S_FALSE; } @@ -567,6 +575,9 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface, default: return S_FALSE; } + case DBTYPE_FILETIME: + if(dst_class == DBTYPE_I8) return S_OK; + /* fall through */ case DBTYPE_DBDATE: switch(dst_class) { @@ -576,6 +587,7 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface, case DBTYPE_BSTR: case DBTYPE_VARIANT: case DBTYPE_DBDATE: + case DBTYPE_FILETIME: return S_OK; default: return S_FALSE; } diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c index a1378cf..6cd44f5 100644 --- a/dlls/oledb32/tests/convert.c +++ b/dlls/oledb32/tests/convert.c @@ -150,22 +150,22 @@ struct can_convert DWORD can_convert_to; } simple_convert[] = { - {DBTYPE_EMPTY, 0x23bfd9ff}, - {DBTYPE_NULL, 0x00001002}, + {DBTYPE_EMPTY, 0x63bfd9ff}, + {DBTYPE_NULL, 0x40001002}, {DBTYPE_I2, 0x3b9fd9ff}, {DBTYPE_I4, 0x3bdfd9ff}, {DBTYPE_R4, 0x3b9fd9ff}, {DBTYPE_R8, 0x3b9fd9ff}, {DBTYPE_CY, 0x039fd97f}, - {DBTYPE_DATE, 0x399f99bf}, + {DBTYPE_DATE, 0x799f99bf}, - {DBTYPE_BSTR, 0x3bffd9ff}, - {DBTYPE_IDISPATCH, 0x3bffffff}, + {DBTYPE_BSTR, 0x7bffd9ff}, + {DBTYPE_IDISPATCH, 0x7bffffff}, {DBTYPE_ERROR, 0x01001500}, {DBTYPE_BOOL, 0x039fd9ff}, - {DBTYPE_VARIANT, 0x3bffffff}, + {DBTYPE_VARIANT, 0x7bffffff}, {DBTYPE_IUNKNOWN, 0x00003203}, {DBTYPE_DECIMAL, 0x3b9fd97f}, {DBTYPE_I1, 0x3b9fd9ff}, @@ -173,20 +173,21 @@ struct can_convert {DBTYPE_UI1, 0x3b9fd9ff}, {DBTYPE_UI2, 0x3b9fd9ff}, {DBTYPE_UI4, 0x3bdfd9ff}, - {DBTYPE_I8, 0x03dfd97f}, + {DBTYPE_I8, 0x43dfd97f}, - {DBTYPE_UI8, 0x03dfd97f}, + {DBTYPE_UI8, 0x43dfd97f}, {DBTYPE_GUID, 0x01e01103}, {DBTYPE_BYTES, 0x01fc110b}, - {DBTYPE_STR, 0x3bffd9ff}, + {DBTYPE_STR, 0x7bffd9ff}, - {DBTYPE_WSTR, 0x3bffd9ff}, + {DBTYPE_WSTR, 0x7bffd9ff}, {DBTYPE_NUMERIC, 0x039fd97f}, {DBTYPE_UDT, 0x00000000}, - {DBTYPE_DBDATE, 0x39801183}, + {DBTYPE_DBDATE, 0x79801183}, - {DBTYPE_DBTIME, 0x39801183}, - {DBTYPE_DBTIMESTAMP, 0x39801183} + {DBTYPE_DBTIME, 0x79801183}, + {DBTYPE_DBTIMESTAMP, 0x79801183}, + {DBTYPE_FILETIME, 0x79981183} };
1
0
0
0
Huw Davies : msdaps: Implement IRowsetInfo_GetProperties proxy and stub.
by Alexandre Julliard
27 Oct '09
27 Oct '09
Module: wine Branch: master Commit: 021eaadea37b8748290dd827f3a8b565f7b62d74 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=021eaadea37b8748290dd827f…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Oct 27 10:19:26 2009 +0000 msdaps: Implement IRowsetInfo_GetProperties proxy and stub. --- dlls/msdaps/usrmarshal.c | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dlls/msdaps/usrmarshal.c b/dlls/msdaps/usrmarshal.c index 6ed855a..5752404 100644 --- a/dlls/msdaps/usrmarshal.c +++ b/dlls/msdaps/usrmarshal.c @@ -604,9 +604,11 @@ HRESULT __RPC_STUB IAccessor_ReleaseAccessor_Stub(IAccessor* This, HACCESSOR hAc HRESULT CALLBACK IRowsetInfo_GetProperties_Proxy(IRowsetInfo* This, const ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertySets, DBPROPSET **prgPropertySets) { + HRESULT hr; + IErrorInfo *error; ULONG i; - FIXME("(%p)->(%d, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets); + TRACE("(%p)->(%d, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets); for(i = 0; i < cPropertyIDSets; i++) { @@ -616,15 +618,29 @@ HRESULT CALLBACK IRowsetInfo_GetProperties_Proxy(IRowsetInfo* This, const ULONG TRACE("\t%d: prop id %d\n", j, rgPropertyIDSets[i].rgPropertyIDs[j]); } - return E_NOTIMPL; + hr = IRowsetInfo_RemoteGetProperties_Proxy(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, &error); + + if(error) + { + SetErrorInfo(0, error); + IErrorInfo_Release(error); + } + return hr; } HRESULT __RPC_STUB IRowsetInfo_GetProperties_Stub(IRowsetInfo* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem) { - FIXME("(%p)->(%d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, ppErrorInfoRem); + HRESULT hr; - return E_NOTIMPL; + TRACE("(%p)->(%d, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, ppErrorInfoRem); + + *ppErrorInfoRem = NULL; + + hr = IRowsetInfo_GetProperties(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets); + if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem); + TRACE("returning %08x\n", hr); + return hr; } HRESULT CALLBACK IRowsetInfo_GetReferencedRowset_Proxy(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset)
1
0
0
0
Huw Davies : include: Add rstinf.idl.
by Alexandre Julliard
27 Oct '09
27 Oct '09
Module: wine Branch: master Commit: 64dc7306d880b85de1dcd5d084547e889c45c728 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=64dc7306d880b85de1dcd5d08…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Oct 27 10:11:36 2009 +0000 include: Add rstinf.idl. --- dlls/msdaps/usrmarshal.c | 51 ++++++++++++++++++++++++++++++++++++++++ include/Makefile.in | 1 + include/oledb.idl | 1 + include/rstinf.idl | 58 ++++++++++++++++++++++++++++++++++++++++++++++ tools/make_makefiles | 1 + 5 files changed, 112 insertions(+), 0 deletions(-) diff --git a/dlls/msdaps/usrmarshal.c b/dlls/msdaps/usrmarshal.c index 885a463..6ed855a 100644 --- a/dlls/msdaps/usrmarshal.c +++ b/dlls/msdaps/usrmarshal.c @@ -601,6 +601,57 @@ HRESULT __RPC_STUB IAccessor_ReleaseAccessor_Stub(IAccessor* This, HACCESSOR hAc return hr; } +HRESULT CALLBACK IRowsetInfo_GetProperties_Proxy(IRowsetInfo* This, const ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[], + ULONG *pcPropertySets, DBPROPSET **prgPropertySets) +{ + ULONG i; + + FIXME("(%p)->(%d, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets); + + for(i = 0; i < cPropertyIDSets; i++) + { + int j; + TRACE("%d: %s %d props\n", i, debugstr_guid(&rgPropertyIDSets[i].guidPropertySet), rgPropertyIDSets[i].cPropertyIDs); + for(j = 0; j < rgPropertyIDSets[i].cPropertyIDs; j++) + TRACE("\t%d: prop id %d\n", j, rgPropertyIDSets[i].rgPropertyIDs[j]); + } + + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IRowsetInfo_GetProperties_Stub(IRowsetInfo* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets, + ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem) +{ + FIXME("(%p)->(%d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, ppErrorInfoRem); + + return E_NOTIMPL; +} + +HRESULT CALLBACK IRowsetInfo_GetReferencedRowset_Proxy(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset) +{ + FIXME("(%p)->(%d, %s, %p): stub\n", This, iOrdinal, debugstr_guid(riid), ppReferencedRowset); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IRowsetInfo_GetReferencedRowset_Stub(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset, + IErrorInfo **ppErrorInfoRem) +{ + FIXME("(%p)->(%d, %s, %p, %p): stub\n", This, iOrdinal, debugstr_guid(riid), ppReferencedRowset, ppErrorInfoRem); + return E_NOTIMPL; +} + +HRESULT CALLBACK IRowsetInfo_GetSpecification_Proxy(IRowsetInfo* This, REFIID riid, IUnknown **ppSpecification) +{ + FIXME("(%p)->(%s, %p): stub\n", This, debugstr_guid(riid), ppSpecification); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IRowsetInfo_GetSpecification_Stub(IRowsetInfo* This, REFIID riid, IUnknown **ppSpecification, IErrorInfo **ppErrorInfoRem) +{ + FIXME("(%p)->(%s, %p, %p): stub\n", This, debugstr_guid(riid), ppSpecification, ppErrorInfoRem); + return E_NOTIMPL; +} + HRESULT CALLBACK ICommand_Cancel_Proxy(ICommand* This) { FIXME("(%p): stub\n", This); diff --git a/include/Makefile.in b/include/Makefile.in index bfcae56..f799f45 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -402,6 +402,7 @@ SRCDIR_INCLUDES = \ rpcndr.h \ rpcnterr.h \ rpcproxy.h \ + rstinf.idl \ rtutils.h \ scarderr.h \ schannel.h \ diff --git a/include/oledb.idl b/include/oledb.idl index 6fee519..3ef9241 100644 --- a/include/oledb.idl +++ b/include/oledb.idl @@ -42,6 +42,7 @@ typedef LONG DB_LPARAMS; #include "dbs.idl" #include "access.idl" +#include "rstinf.idl" #include "cmdbas.idl" #include "cmdtxt.idl" #include "dbccmd.idl" diff --git a/include/rstinf.idl b/include/rstinf.idl new file mode 100644 index 0000000..7c9779b --- /dev/null +++ b/include/rstinf.idl @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2009 Huw Davies + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +[ + object, + uuid(0c733a55-2a1c-11ce-ade5-00aa0044773d), + pointer_default(unique) +] +interface IRowsetInfo : IUnknown +{ + [local] + HRESULT GetProperties([in] const ULONG cPropertyIDSets, + [in, size_is(cPropertyIDSets), annotation("__in_ecount_opt(cPropertyIDSets)")] const DBPROPIDSET rgPropertyIDSets[], + [in, out, annotation("__out")] ULONG *pcPropertySets, + [out, size_is(,*pcPropertySets), annotation("__deref_out_ecount_opt(*pcPropertySets)")] DBPROPSET **prgPropertySets); + + [call_as(GetProperties)] + HRESULT RemoteGetProperties([in] ULONG cPropertyIDSets, + [in, unique, size_is(cPropertyIDSets)] const DBPROPIDSET *rgPropertyIDSets, + [in, out] ULONG *pcPropertySets, + [out, size_is(,*pcPropertySets)] DBPROPSET **prgPropertySets, + [out] IErrorInfo **ppErrorInfoRem); + + [local] + HRESULT GetReferencedRowset([in] DBORDINAL iOrdinal, + [in, annotation("__in")] REFIID riid, + [out, iid_is(riid), annotation("deref_out_opt")] IUnknown **ppReferencedRowset); + + [call_as(GetReferencedRowset)] + HRESULT RemoteGetReferencedRowset([in] DBORDINAL iOrdinal, + [in] REFIID riid, + [out, iid_is(riid)] IUnknown **ppReferencedRowset, + [out] IErrorInfo **ppErrorInfoRem); + [local] + HRESULT GetSpecification([in, annotation("__in")] REFIID riid, + [out, iid_is(riid), annotation("__deref_out_opt")] IUnknown **ppSpecification); + + [call_as(GetSpecification)] + HRESULT RemoteGetSpecification([in] REFIID riid, + [out, iid_is(riid)] IUnknown **ppSpecification, + [out] IErrorInfo **ppErrorInfoRem); + +} diff --git a/tools/make_makefiles b/tools/make_makefiles index 9c6a89e..fbf3150 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -125,6 +125,7 @@ my %private_idl_headers = ( "devenum.idl" => 1, "dyngraph.idl" => 1, "opnrst.idl" => 1, + "rstinf.idl" => 1, "sesprp.idl" => 1, "vmrender.idl" => 1, "wine/wined3d.idl" => 1,
1
0
0
0
Huw Davies : msdaps: Implement SetCommandText proxy and stub.
by Alexandre Julliard
27 Oct '09
27 Oct '09
Module: wine Branch: master Commit: d52a9cdd44221d44fd8c259491cd7669eb880b9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d52a9cdd44221d44fd8c25949…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Oct 26 15:44:50 2009 +0000 msdaps: Implement SetCommandText proxy and stub. --- dlls/msdaps/usrmarshal.c | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/dlls/msdaps/usrmarshal.c b/dlls/msdaps/usrmarshal.c index 5e65998..885a463 100644 --- a/dlls/msdaps/usrmarshal.c +++ b/dlls/msdaps/usrmarshal.c @@ -661,14 +661,31 @@ HRESULT __RPC_STUB ICommandText_GetCommandText_Stub(ICommandText* This, GUID *pg HRESULT CALLBACK ICommandText_SetCommandText_Proxy(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand) { - FIXME("(%p)->(%s, %s): stub\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand)); - return E_NOTIMPL; + HRESULT hr; + IErrorInfo *error; + + TRACE("(%p)->(%s, %s)\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand)); + + hr = ICommandText_RemoteSetCommandText_Proxy(This, rguidDialect, pwszCommand, &error); + if(error) + { + SetErrorInfo(0, error); + IErrorInfo_Release(error); + } + return hr; } HRESULT __RPC_STUB ICommandText_SetCommandText_Stub(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand, IErrorInfo **ppErrorInfoRem) { - FIXME("(%p)->(%s, %s, %p): stub\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand), + HRESULT hr; + + TRACE("(%p)->(%s, %s, %p)\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand), ppErrorInfoRem); - return E_NOTIMPL; + + *ppErrorInfoRem = NULL; + hr = ICommandText_SetCommandText(This, rguidDialect, pwszCommand); + if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem); + + return hr; }
1
0
0
0
Huw Davies : include: Add cmdtxt.idl.
by Alexandre Julliard
27 Oct '09
27 Oct '09
Module: wine Branch: master Commit: 19672d7167585d579590942d011437a0babc94eb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19672d7167585d579590942d0…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Oct 26 15:42:13 2009 +0000 include: Add cmdtxt.idl. --- dlls/msdaps/usrmarshal.c | 27 +++++++++++++++++++++++++++ include/Makefile.in | 1 + include/cmdtxt.idl | 44 ++++++++++++++++++++++++++++++++++++++++++++ include/oledb.idl | 1 + tools/make_makefiles | 1 + 5 files changed, 74 insertions(+), 0 deletions(-) diff --git a/dlls/msdaps/usrmarshal.c b/dlls/msdaps/usrmarshal.c index ee5ce58..5e65998 100644 --- a/dlls/msdaps/usrmarshal.c +++ b/dlls/msdaps/usrmarshal.c @@ -645,3 +645,30 @@ HRESULT __RPC_STUB ICommand_GetDBSession_Stub(ICommand* This, REFIID riid, IUnkn FIXME("(%p)->(%s, %p, %p): stub\n", This, debugstr_guid(riid), ppSession, ppErrorInfoRem); return E_NOTIMPL; } + +HRESULT CALLBACK ICommandText_GetCommandText_Proxy(ICommandText* This, GUID *pguidDialect, LPOLESTR *ppwszCommand) +{ + FIXME("(%p)->(%p, %p): stub\n", This, pguidDialect, ppwszCommand); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB ICommandText_GetCommandText_Stub(ICommandText* This, GUID *pguidDialect, + LPOLESTR *ppwszCommand, IErrorInfo **ppErrorInfoRem) +{ + FIXME("(%p)->(%p, %p, %p): stub\n", This, pguidDialect, ppwszCommand, ppErrorInfoRem); + return E_NOTIMPL; +} + +HRESULT CALLBACK ICommandText_SetCommandText_Proxy(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand) +{ + FIXME("(%p)->(%s, %s): stub\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand)); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB ICommandText_SetCommandText_Stub(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand, + IErrorInfo **ppErrorInfoRem) +{ + FIXME("(%p)->(%s, %s, %p): stub\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand), + ppErrorInfoRem); + return E_NOTIMPL; +} diff --git a/include/Makefile.in b/include/Makefile.in index 8048c01..bfcae56 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -118,6 +118,7 @@ SRCDIR_INCLUDES = \ cierror.h \ clusapi.h \ cmdbas.idl \ + cmdtxt.idl \ commctrl.h \ commctrl.rh \ commdlg.h \ diff --git a/include/cmdtxt.idl b/include/cmdtxt.idl new file mode 100644 index 0000000..467a67c --- /dev/null +++ b/include/cmdtxt.idl @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2009 Huw Davies + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +[ + object, + uuid(0c733a27-2a1c-11ce-ade5-00aa0044773d), + pointer_default(unique) +] +interface ICommandText : ICommand +{ + [local] + HRESULT GetCommandText([in, out /*, annotation("__inout_opt")*/] GUID *pguidDialect, + [out /*, annotation("__deref_out")*/] LPOLESTR *ppwszCommand); + + [call_as(GetCommandText)] + HRESULT RemoteGetCommandText([in, out, unique] GUID *pguidDialect, + [out] LPOLESTR *ppwszCommand, + [out] IErrorInfo **ppErrorInfoRem); + + [local] + HRESULT SetCommandText([in] REFGUID rguidDialect, + [in, unique /*, annotation("__in_z_opt")*/] LPCOLESTR pwszCommand); + + [call_as(SetCommandText)] + HRESULT RemoteSetCommandText([in] REFGUID rguidDialect, + [in, unique] LPCOLESTR pwszCommand, + [out] IErrorInfo **ppErrorInfoRem); + +}; diff --git a/include/oledb.idl b/include/oledb.idl index e293a78..6fee519 100644 --- a/include/oledb.idl +++ b/include/oledb.idl @@ -43,6 +43,7 @@ typedef LONG DB_LPARAMS; #include "access.idl" #include "cmdbas.idl" +#include "cmdtxt.idl" #include "dbccmd.idl" #include "dbcses.idl" #include "dbprop.idl" diff --git a/tools/make_makefiles b/tools/make_makefiles index d29a6c9..9c6a89e 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -114,6 +114,7 @@ my %private_idl_headers = ( "axextend.idl" => 1, "binres.idl" => 1, "cmdbas.idl" => 1, + "cmdtxt.idl" => 1, "crtrow.idl" => 1, "dbccmd.idl" => 1, "dbcses.idl" => 1,
1
0
0
0
Huw Davies : include: Add cmdbas.idl.
by Alexandre Julliard
27 Oct '09
27 Oct '09
Module: wine Branch: master Commit: 8b5431ad3af2bae231db2a17e84dd0d33a9d0a6a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b5431ad3af2bae231db2a17e…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Oct 26 14:21:18 2009 +0000 include: Add cmdbas.idl. --- dlls/msdaps/usrmarshal.c | 45 +++++++++++++++++++++++++++++++++ include/Makefile.in | 1 + include/cmdbas.idl | 62 ++++++++++++++++++++++++++++++++++++++++++++++ include/oledb.idl | 3 ++ tools/make_makefiles | 1 + 5 files changed, 112 insertions(+), 0 deletions(-) diff --git a/dlls/msdaps/usrmarshal.c b/dlls/msdaps/usrmarshal.c index ae812ad..ee5ce58 100644 --- a/dlls/msdaps/usrmarshal.c +++ b/dlls/msdaps/usrmarshal.c @@ -600,3 +600,48 @@ HRESULT __RPC_STUB IAccessor_ReleaseAccessor_Stub(IAccessor* This, HACCESSOR hAc if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem); return hr; } + +HRESULT CALLBACK ICommand_Cancel_Proxy(ICommand* This) +{ + FIXME("(%p): stub\n", This); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB ICommand_Cancel_Stub(ICommand* This, IErrorInfo **ppErrorInfoRem) +{ + FIXME("(%p)->(%p): stub\n", This, ppErrorInfoRem); + return E_NOTIMPL; +} + +HRESULT CALLBACK ICommand_Execute_Proxy(ICommand* This, IUnknown *pUnkOuter, REFIID riid, + DBPARAMS *pParams, DBROWCOUNT *pcRowsAffected, IUnknown **ppRowset) +{ + FIXME("(%p)->(%p, %s, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_guid(riid), pParams, + pcRowsAffected, ppRowset); + if(pParams) TRACE("params {%p, %d, %08lx}\n", pParams->pData, pParams->cParamSets, pParams->hAccessor); + + return E_NOTIMPL; +} + +HRESULT __RPC_STUB ICommand_Execute_Stub(ICommand* This, IUnknown *pUnkOuter, REFIID riid, HACCESSOR hAccessor, + DB_UPARAMS cParamSets, GUID *pGuid, ULONG ulGuidOffset, RMTPACK *pInputParams, + RMTPACK *pOutputParams, DBCOUNTITEM cBindings, DBBINDING *rgBindings, + DBSTATUS *rgStatus, DBROWCOUNT *pcRowsAffected, IUnknown **ppRowset) +{ + FIXME("(%p)->(%p, %s, %08lx, %d, %p, %d, %p, %p, %d, %p, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_guid(riid), + hAccessor, cParamSets, pGuid, ulGuidOffset, pInputParams, pOutputParams, cBindings, rgBindings, rgStatus, + pcRowsAffected, ppRowset); + return E_NOTIMPL; +} + +HRESULT CALLBACK ICommand_GetDBSession_Proxy(ICommand* This, REFIID riid, IUnknown **ppSession) +{ + FIXME("(%p)->(%s, %p): stub\n", This, debugstr_guid(riid), ppSession); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB ICommand_GetDBSession_Stub(ICommand* This, REFIID riid, IUnknown **ppSession, IErrorInfo **ppErrorInfoRem) +{ + FIXME("(%p)->(%s, %p, %p): stub\n", This, debugstr_guid(riid), ppSession, ppErrorInfoRem); + return E_NOTIMPL; +} diff --git a/include/Makefile.in b/include/Makefile.in index f5b2dfd..8048c01 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -117,6 +117,7 @@ SRCDIR_INCLUDES = \ cguid.h \ cierror.h \ clusapi.h \ + cmdbas.idl \ commctrl.h \ commctrl.rh \ commdlg.h \ diff --git a/include/cmdbas.idl b/include/cmdbas.idl new file mode 100644 index 0000000..f55db22 --- /dev/null +++ b/include/cmdbas.idl @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2009 Huw Davies + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +[ + object, + uuid(0c733a63-2a1c-11ce-ade5-00aa0044773d), + pointer_default(unique) +] +interface ICommand : IUnknown +{ + [local] + HRESULT Cancel(); + + [call_as(Cancel)] + HRESULT RemoteCancel([out] IErrorInfo **ppErrorInfoRem); + + [local] + HRESULT Execute([in, annotation("__in_opt")] IUnknown *pUnkOuter, + [in] REFIID riid, + [in, out, annotation("__inout_opt")] DBPARAMS *pParams, + [out, annotation("__out_opt")] DBROWCOUNT *pcRowsAffected, + [out, iid_is(riid), annotation("__deref_opt_out")] IUnknown **ppRowset); + + [call_as(Execute)] + HRESULT RemoteExecute([in] IUnknown *pUnkOuter, + [in] REFIID riid, + [in] HACCESSOR hAccessor, + [in] DB_UPARAMS cParamSets, + [in, unique] GUID *pGuid, + [in] ULONG ulGuidOffset, + [in, unique] RMTPACK *pInputParams, + [in, out, unique] RMTPACK *pOutputParams, + [in] DBCOUNTITEM cBindings, + [in, unique, size_is(cBindings)] DBBINDING *rgBindings, + [in, out, unique, size_is(cBindings)] DBSTATUS *rgStatus, + [in, out, unique] DBROWCOUNT *pcRowsAffected, + [in, out, unique, iid_is(riid)] IUnknown **ppRowset); + + [local] + HRESULT GetDBSession([in] REFIID riid, + [out, iid_is(riid), annotation("__deref_out_opt")] IUnknown **ppSession); + + [call_as(GetDBSession)] + HRESULT RemoteGetDBSession([in] REFIID riid, + [out, iid_is(riid)] IUnknown **ppSession, + [out] IErrorInfo **ppErrorInfoRem); +}; diff --git a/include/oledb.idl b/include/oledb.idl index a488c47..e293a78 100644 --- a/include/oledb.idl +++ b/include/oledb.idl @@ -29,6 +29,8 @@ import "propidl.idl"; import "urlmon.idl"; typedef ULONG DBBYTEOFFSET; +typedef LONG DBROWOFFSET; +typedef LONG DBROWCOUNT; typedef ULONG DBCOUNTITEM; typedef ULONG DBLENGTH; typedef ULONG DBORDINAL; @@ -40,6 +42,7 @@ typedef LONG DB_LPARAMS; #include "dbs.idl" #include "access.idl" +#include "cmdbas.idl" #include "dbccmd.idl" #include "dbcses.idl" #include "dbprop.idl" diff --git a/tools/make_makefiles b/tools/make_makefiles index 5e724ff..d29a6c9 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -113,6 +113,7 @@ my %private_idl_headers = ( "axcore.idl" => 1, "axextend.idl" => 1, "binres.idl" => 1, + "cmdbas.idl" => 1, "crtrow.idl" => 1, "dbccmd.idl" => 1, "dbcses.idl" => 1,
1
0
0
0
Paul Vriens : advapi32/tests: Add a input parameter check (CloseEventLog).
by Alexandre Julliard
27 Oct '09
27 Oct '09
Module: wine Branch: master Commit: 4af8e5f24d8e4cc214b5f68dc770c6e3fc444b9b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4af8e5f24d8e4cc214b5f68dc…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Oct 27 10:37:07 2009 +0100 advapi32/tests: Add a input parameter check (CloseEventLog). --- dlls/advapi32/eventlog.c | 11 +++++++++-- dlls/advapi32/tests/eventlog.c | 3 --- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c index 495623c..1074ccc 100644 --- a/dlls/advapi32/eventlog.c +++ b/dlls/advapi32/eventlog.c @@ -125,8 +125,15 @@ BOOL WINAPI ClearEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName ) */ BOOL WINAPI CloseEventLog( HANDLE hEventLog ) { - FIXME("(%p) stub\n", hEventLog); - return TRUE; + FIXME("(%p) stub\n", hEventLog); + + if (!hEventLog) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + return TRUE; } /****************************************************************************** diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 9fdf745..2823f17 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -34,13 +34,10 @@ static void test_open_close(void) SetLastError(0xdeadbeef); ret = CloseEventLog(NULL); - todo_wine - { ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_NOACCESS, /* W2K */ "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - } SetLastError(0xdeadbeef); handle = OpenEventLogA(NULL, NULL);
1
0
0
0
Paul Vriens : advapi32/tests: Cope with empty servername.
by Alexandre Julliard
27 Oct '09
27 Oct '09
Module: wine Branch: master Commit: 6bdbf6ee4cdd0292aefed9e874e0ce45a16b365a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6bdbf6ee4cdd0292aefed9e87…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Oct 27 10:27:28 2009 +0100 advapi32/tests: Cope with empty servername. --- dlls/advapi32/eventlog.c | 2 +- dlls/advapi32/tests/eventlog.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c index 82bff01..495623c 100644 --- a/dlls/advapi32/eventlog.c +++ b/dlls/advapi32/eventlog.c @@ -324,7 +324,7 @@ HANDLE WINAPI OpenEventLogW( LPCWSTR uncname, LPCWSTR source ) return NULL; } - if (uncname) + if (uncname && uncname[0]) { FIXME("Remote server not supported\n"); SetLastError(RPC_S_SERVER_UNAVAILABLE); diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 3567a8c..9fdf745 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -73,6 +73,11 @@ static void test_open_close(void) ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); } + /* Empty servername should be read as local server */ + handle = OpenEventLogA("", "Application"); + ok(handle != NULL, "Expected a handle\n"); + CloseEventLog(handle); + handle = OpenEventLogA(NULL, "Application"); ok(handle != NULL, "Expected a handle\n"); CloseEventLog(handle);
1
0
0
0
Paul Vriens : advapi32/tests: Add some input parameter checks.
by Alexandre Julliard
27 Oct '09
27 Oct '09
Module: wine Branch: master Commit: 84d689bd5838f786c35549f6af67b4bdde28aa42 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=84d689bd5838f786c35549f6a…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Oct 27 09:33:55 2009 +0100 advapi32/tests: Add some input parameter checks. --- dlls/advapi32/eventlog.c | 44 ++++++++++++++++++++++++++++++++++++--- dlls/advapi32/tests/eventlog.c | 9 -------- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c index 118bd11..82bff01 100644 --- a/dlls/advapi32/eventlog.c +++ b/dlls/advapi32/eventlog.c @@ -29,11 +29,25 @@ #include "wmistr.h" #include "evntrace.h" +#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(advapi); WINE_DECLARE_DEBUG_CHANNEL(eventlog); +static inline LPWSTR SERV_dup( LPCSTR str ) +{ + UINT len; + LPWSTR wstr; + + if( !str ) + return NULL; + len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); + wstr = HeapAlloc( GetProcessHeap(), 0, len*sizeof (WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, str, -1, wstr, len ); + return wstr; +} + /****************************************************************************** * BackupEventLogA [ADVAPI32.@] * @@ -283,8 +297,16 @@ HANDLE WINAPI OpenBackupEventLogW( LPCWSTR lpUNCServerName, LPCWSTR lpFileName ) */ HANDLE WINAPI OpenEventLogA( LPCSTR uncname, LPCSTR source ) { - FIXME("(%s,%s) stub\n", debugstr_a(uncname), debugstr_a(source)); - return (HANDLE)0xcafe4242; + LPWSTR uncnameW, sourceW; + HANDLE handle; + + uncnameW = SERV_dup(uncname); + sourceW = SERV_dup(source); + handle = OpenEventLogW(uncnameW, sourceW); + HeapFree(GetProcessHeap(), 0, uncnameW); + HeapFree(GetProcessHeap(), 0, sourceW); + + return handle; } /****************************************************************************** @@ -294,8 +316,22 @@ HANDLE WINAPI OpenEventLogA( LPCSTR uncname, LPCSTR source ) */ HANDLE WINAPI OpenEventLogW( LPCWSTR uncname, LPCWSTR source ) { - FIXME("(%s,%s) stub\n", debugstr_w(uncname), debugstr_w(source)); - return (HANDLE)0xcafe4242; + FIXME("(%s,%s) stub\n", debugstr_w(uncname), debugstr_w(source)); + + if (!source) + { + SetLastError(ERROR_INVALID_PARAMETER); + return NULL; + } + + if (uncname) + { + FIXME("Remote server not supported\n"); + SetLastError(RPC_S_SERVER_UNAVAILABLE); + return NULL; + } + + return (HANDLE)0xcafe4242; } /****************************************************************************** diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 244a805..3567a8c 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -44,29 +44,20 @@ static void test_open_close(void) SetLastError(0xdeadbeef); handle = OpenEventLogA(NULL, NULL); - todo_wine - { ok(handle == NULL, "Didn't expect a handle\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - } SetLastError(0xdeadbeef); handle = OpenEventLogA("IDontExist", NULL); - todo_wine - { ok(handle == NULL, "Didn't expect a handle\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - } SetLastError(0xdeadbeef); handle = OpenEventLogA("IDontExist", "deadbeef"); - todo_wine - { ok(handle == NULL, "Didn't expect a handle\n"); ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */ "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError()); - } /* This one opens the Application log */ handle = OpenEventLogA(NULL, "deadbeef");
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
121
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Results per page:
10
25
50
100
200