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
November 2020
----- 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
1 participants
851 discussions
Start a n
N
ew thread
Zebediah Figura : setupapi: Store the original INF file path in a .pnf file.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 2a9d8699a74fc27ed213f838cde9052269ad41ba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2a9d8699a74fc27ed213f838…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Jun 11 11:16:31 2020 -0500 setupapi: Store the original INF file path in a .pnf file. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 547d62da228a3846cf058bcc71fc8974356a96b8) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/setupapi/Makefile.in | 2 +- dlls/setupapi/misc.c | 17 ++++++++++++++++- dlls/setupapi/setupapi_private.h | 2 ++ dlls/setupapi/tests/misc.c | 4 ++-- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/dlls/setupapi/Makefile.in b/dlls/setupapi/Makefile.in index 6c31365546f..539bfed0caa 100644 --- a/dlls/setupapi/Makefile.in +++ b/dlls/setupapi/Makefile.in @@ -1,7 +1,7 @@ EXTRADEFS = -D_SETUPAPI_ MODULE = setupapi.dll IMPORTLIB = setupapi -IMPORTS = uuid version advapi32 rpcrt4 +IMPORTS = uuid version advapi32 rpcrt4 kernelbase DELAYIMPORTS = shell32 wintrust ole32 winspool.drv comdlg32 user32 EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index 3b0c9477747..26e5359804c 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -31,6 +31,7 @@ #include "softpub.h" #include "mscat.h" #include "shlobj.h" +#include "shlwapi.h" #include "wine/debug.h" @@ -962,10 +963,11 @@ BOOL WINAPI SetupCopyOEMInfW( PCWSTR source, PCWSTR location, DWORD buffer_size, DWORD *required_size, WCHAR **filepart ) { BOOL ret = FALSE; - WCHAR target[MAX_PATH], catalog_file[MAX_PATH], *p; + WCHAR target[MAX_PATH], catalog_file[MAX_PATH], pnf_path[MAX_PATH], *p; static const WCHAR inf[] = { '\\','i','n','f','\\',0 }; static const WCHAR wszVersion[] = { 'V','e','r','s','i','o','n',0 }; static const WCHAR wszCatalogFile[] = { 'C','a','t','a','l','o','g','F','i','l','e',0 }; + FILE *pnf_file; unsigned int i; DWORD size; HINF hinf; @@ -1069,6 +1071,19 @@ done: if (style & SP_COPY_DELETESOURCE) DeleteFileW( source ); + if (ret) + { + wcscpy(pnf_path, target); + PathRemoveExtensionW(pnf_path); + PathAddExtensionW(pnf_path, L".pnf"); + if ((pnf_file = _wfopen(pnf_path, L"w"))) + { + fputws(PNF_HEADER, pnf_file); + fputws(source, pnf_file); + fclose(pnf_file); + } + } + size = lstrlenW( target ) + 1; if (dest) { diff --git a/dlls/setupapi/setupapi_private.h b/dlls/setupapi/setupapi_private.h index f4685ab2b4c..21ac50e0f3c 100644 --- a/dlls/setupapi/setupapi_private.h +++ b/dlls/setupapi/setupapi_private.h @@ -43,6 +43,8 @@ #define REGPART_RENAME "\\Rename" #define REG_VERSIONCONFLICT "Software\\Microsoft\\VersionConflictManager" +#define PNF_HEADER L"Wine PNF header\n" + extern HINSTANCE SETUPAPI_hInstance DECLSPEC_HIDDEN; static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t len) diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c index 3bb308ef4a7..f16f310b3f7 100644 --- a/dlls/setupapi/tests/misc.c +++ b/dlls/setupapi/tests/misc.c @@ -320,7 +320,7 @@ static void test_SetupCopyOEMInf(void) DeleteFileA(dest); strcpy(pnf, dest); *(strrchr(pnf, '.') + 1) = 'p'; - ok(!file_exists(pnf), "Expected pnf '%s' to not exist\n", pnf); + todo_wine ok(!file_exists(pnf), "Expected pnf '%s' to not exist\n", pnf); res = SetupUninstallOEMInfA(strrchr(orig_dest, '\\') + 1, 0, NULL); ok(res, "Failed to uninstall '%s', error %u.\n", orig_dest, GetLastError()); @@ -328,7 +328,7 @@ static void test_SetupCopyOEMInf(void) DeleteFileA(orig_dest); strcpy(pnf, dest); *(strrchr(pnf, '.') + 1) = 'p'; - ok(!file_exists(pnf), "Expected pnf '%s' to not exist\n", pnf); + todo_wine ok(!file_exists(pnf), "Expected pnf '%s' to not exist\n", pnf); GetWindowsDirectoryA(orig_dest, sizeof(orig_dest)); strcat(orig_dest, "\\inf\\");
1
0
0
0
Zebediah Figura : setupapi: Reset the source file pointer when comparing files.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 7678c5878aa92a91422ace79f57ca7c3032af834 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7678c5878aa92a91422ace79…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Jun 11 11:16:30 2020 -0500 setupapi: Reset the source file pointer when comparing files. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 007a9c9726e455fc99d7362e3bafaa89bec11ab4) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/setupapi/misc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index 3b5d62b682c..3b0c9477747 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -933,6 +933,8 @@ static BOOL find_existing_inf(const WCHAR *source, WCHAR *target) if (dest_file == INVALID_HANDLE_VALUE) continue; + SetFilePointer( source_file, 0, NULL, FILE_BEGIN ); + if (GetFileSizeEx( dest_file, &dest_file_size ) && dest_file_size.QuadPart == source_file_size.QuadPart && !compare_files( source_file, dest_file ))
1
0
0
0
Alexandre Julliard : setupapi: Support a WineSourceDirs section to copy files from the Wine build or data dir.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: c6af3a9002c6a7a8c2c6f96730415e5877640e2d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c6af3a9002c6a7a8c2c6f967…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 11 09:00:43 2020 +0100 setupapi: Support a WineSourceDirs section to copy files from the Wine build or data dir. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit aa76bec2417551952eec9cd8f5d8302dcb72f5bd) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/setupapi/install.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c index e1667541680..0859739be5d 100644 --- a/dlls/setupapi/install.c +++ b/dlls/setupapi/install.c @@ -153,13 +153,31 @@ static WCHAR *dup_section_line_field( HINF hinf, const WCHAR *section, const WCH */ static BOOL copy_files_callback( HINF hinf, PCWSTR field, void *arg ) { + INFCONTEXT context; struct files_callback_info *info = arg; WCHAR src_root[MAX_PATH], *p; if (!info->src_root) { - lstrcpyW( src_root, PARSER_get_inf_filename( hinf ) ); - if ((p = wcsrchr( src_root, '\\' ))) *p = 0; + const WCHAR *build_dir = _wgetenv( L"WINEBUILDDIR" ); + const WCHAR *data_dir = _wgetenv( L"WINEDATADIR" ); + + if ((build_dir || data_dir) && SetupFindFirstLineW( hinf, L"WineSourceDirs", field, &context )) + { + lstrcpyW( src_root, build_dir ? build_dir : data_dir ); + src_root[1] = '\\'; /* change \??\ to \\?\ */ + p = src_root + lstrlenW(src_root); + *p++ = '\\'; + if (!build_dir || !SetupGetStringFieldW( &context, 2, p, MAX_PATH - (p - src_root), NULL )) + { + if (!SetupGetStringFieldW( &context, 1, p, MAX_PATH - (p - src_root), NULL )) p[-1] = 0; + } + } + else + { + lstrcpyW( src_root, PARSER_get_inf_filename( hinf ) ); + if ((p = wcsrchr( src_root, '\\' ))) *p = 0; + } } if (field[0] == '@') /* special case: copy single file */
1
0
0
0
Aaro Altonen : msado15: Implement IConnectionPointContainer_FindConnectionPoint.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: c5cb0eea37d3dd28183060fdad1fef71d8cbc15c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c5cb0eea37d3dd28183060fd…
Author: Aaro Altonen <a.altonen(a)hotmail.com> Date: Mon Jun 1 14:42:18 2020 +0300 msado15: Implement IConnectionPointContainer_FindConnectionPoint. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49303
Signed-off-by: Aaro Altonen <a.altonen(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit a1222a3595c8eafaef7df95b3804fa2205ac3c84) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msado15/connection.c | 17 +++++++++++++++-- dlls/msado15/tests/msado15.c | 27 +++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c index be201cb90b3..9e8c05522ef 100644 --- a/dlls/msado15/connection.c +++ b/dlls/msado15/connection.c @@ -23,6 +23,7 @@ #include "initguid.h" #include "ocidl.h" #include "objbase.h" +#include "olectl.h" #include "msado15_backcompat.h" #include "wine/debug.h" @@ -455,8 +456,20 @@ static HRESULT WINAPI connpointcontainer_FindConnectionPoint( IConnectionPointCo REFIID riid, IConnectionPoint **point ) { struct connection *connection = impl_from_IConnectionPointContainer( iface ); - FIXME( "%p, %s, %p\n", connection, debugstr_guid( riid ), point ); - return E_NOTIMPL; + + TRACE( "%p, %s %p\n", connection, debugstr_guid( riid ), point ); + + if (!point) return E_POINTER; + + if (IsEqualIID( riid, connection->cp_connev.riid )) + { + *point = &connection->cp_connev.IConnectionPoint_iface; + IConnectionPoint_AddRef( *point ); + return S_OK; + } + + FIXME( "unsupported connection point %s\n", debugstr_guid( riid ) ); + return CONNECT_E_NOCONNECTION; } static const struct IConnectionPointContainerVtbl connpointcontainer_vtbl = diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index cd6516d45d6..9cde03dd07a 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -20,6 +20,7 @@ #define COBJMACROS #include <initguid.h> #include <oledb.h> +#include <olectl.h> #include <msado15_backcompat.h> #include "wine/test.h" @@ -799,10 +800,36 @@ static void test_Command(void) _Command_Release( command ); } +static void test_ConnectionPoint(void) +{ + HRESULT hr; + ULONG refs; + IConnectionPoint *point; + IConnectionPointContainer *pointcontainer; + + hr = CoCreateInstance( &CLSID_Connection, NULL, CLSCTX_INPROC_SERVER, + &IID_IConnectionPointContainer, (void**)&pointcontainer ); + + hr = IConnectionPointContainer_FindConnectionPoint( pointcontainer, &DIID_ConnectionEvents, NULL ); + ok( hr == E_POINTER, "got %08x\n", hr ); + + hr = IConnectionPointContainer_FindConnectionPoint( pointcontainer, &DIID_RecordsetEvents, &point ); + ok( hr == CONNECT_E_NOCONNECTION, "got %08x\n", hr ); + + hr = IConnectionPointContainer_FindConnectionPoint( pointcontainer, &DIID_ConnectionEvents, &point ); + ok( hr == S_OK, "got %08x\n", hr ); + + refs = IConnectionPoint_Release( point ); + ok( refs == 1, "got %u", refs ); + + IConnectionPointContainer_Release( pointcontainer ); +} + START_TEST(msado15) { CoInitialize( NULL ); test_Connection(); + test_ConnectionPoint(); test_Fields(); test_Recordset(); test_Stream();
1
0
0
0
Aaro Altonen : msado15: Add IConnectionPoint stub to _Connection.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 27d497896a7e68b6327c2fa69e3b98b5f73f84fb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27d497896a7e68b6327c2fa6…
Author: Aaro Altonen <a.altonen(a)hotmail.com> Date: Mon Jun 1 14:42:17 2020 +0300 msado15: Add IConnectionPoint stub to _Connection. Signed-off-by: Aaro Altonen <a.altonen(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit a8b647d8f89e6927bc1591d505eb63eb5ebfe860) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msado15/connection.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c index 8ed39a3a518..be201cb90b3 100644 --- a/dlls/msado15/connection.c +++ b/dlls/msado15/connection.c @@ -32,6 +32,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(msado15); +struct connection; + +struct connection_point +{ + IConnectionPoint IConnectionPoint_iface; + struct connection *conn; + const IID *riid; +}; + struct connection { _Connection Connection_iface; @@ -41,6 +50,7 @@ struct connection ObjectStateEnum state; LONG timeout; WCHAR *datasource; + struct connection_point cp_connev; }; static inline struct connection *impl_from_Connection( _Connection *iface ) @@ -58,6 +68,11 @@ static inline struct connection *impl_from_IConnectionPointContainer( IConnectio return CONTAINING_RECORD( iface, struct connection, IConnectionPointContainer_iface ); } +static inline struct connection_point *impl_from_IConnectionPoint( IConnectionPoint *iface ) +{ + return CONTAINING_RECORD( iface, struct connection_point, IConnectionPoint_iface ); +} + static ULONG WINAPI connection_AddRef( _Connection *iface ) { struct connection *connection = impl_from_Connection( iface ); @@ -453,6 +468,86 @@ static const struct IConnectionPointContainerVtbl connpointcontainer_vtbl = connpointcontainer_FindConnectionPoint }; +static HRESULT WINAPI connpoint_QueryInterface( IConnectionPoint *iface, REFIID riid, void **obj ) +{ + struct connection_point *connpoint = impl_from_IConnectionPoint( iface ); + + if (IsEqualGUID( &IID_IUnknown, riid ) || IsEqualGUID( &IID_IConnectionPoint, riid )) + { + *obj = &connpoint->IConnectionPoint_iface; + } + else + { + FIXME( "interface %s not implemented\n", debugstr_guid( riid ) ); + return E_NOINTERFACE; + } + + connection_AddRef( &connpoint->conn->Connection_iface ); + return S_OK; +} + +static ULONG WINAPI connpoint_AddRef( IConnectionPoint *iface ) +{ + struct connection_point *connpoint = impl_from_IConnectionPoint( iface ); + return IConnectionPointContainer_AddRef( &connpoint->conn->IConnectionPointContainer_iface ); +} + +static ULONG WINAPI connpoint_Release( IConnectionPoint *iface ) +{ + struct connection_point *connpoint = impl_from_IConnectionPoint( iface ); + return IConnectionPointContainer_Release( &connpoint->conn->IConnectionPointContainer_iface ); +} + +static HRESULT WINAPI connpoint_GetConnectionInterface( IConnectionPoint *iface, IID *iid ) +{ + struct connection_point *connpoint = impl_from_IConnectionPoint( iface ); + FIXME( "%p, %p\n", connpoint, iid ); + return E_NOTIMPL; +} + +static HRESULT WINAPI connpoint_GetConnectionPointContainer( IConnectionPoint *iface, + IConnectionPointContainer **container ) +{ + struct connection_point *connpoint = impl_from_IConnectionPoint( iface ); + FIXME( "%p, %p\n", connpoint, container ); + return E_NOTIMPL; +} + +static HRESULT WINAPI connpoint_Advise( IConnectionPoint *iface, IUnknown *unk_sink, + DWORD *cookie ) +{ + struct connection_point *connpoint = impl_from_IConnectionPoint( iface ); + FIXME( "%p, %p, %p\n", connpoint, unk_sink, cookie ); + return E_NOTIMPL; +} + +static HRESULT WINAPI connpoint_Unadvise( IConnectionPoint *iface, DWORD cookie ) +{ + struct connection_point *connpoint = impl_from_IConnectionPoint( iface ); + FIXME( "%p, %d\n", connpoint, cookie ); + return E_NOTIMPL; +} + +static HRESULT WINAPI connpoint_EnumConnections( IConnectionPoint *iface, + IEnumConnections **points ) +{ + struct connection_point *connpoint = impl_from_IConnectionPoint( iface ); + FIXME( "%p, %p\n", connpoint, points ); + return E_NOTIMPL; +} + +static const IConnectionPointVtbl connpoint_vtbl = +{ + connpoint_QueryInterface, + connpoint_AddRef, + connpoint_Release, + connpoint_GetConnectionInterface, + connpoint_GetConnectionPointContainer, + connpoint_Advise, + connpoint_Unadvise, + connpoint_EnumConnections +}; + HRESULT Connection_create( void **obj ) { struct connection *connection; @@ -466,6 +561,10 @@ HRESULT Connection_create( void **obj ) connection->timeout = 30; connection->datasource = NULL; + connection->cp_connev.conn = connection; + connection->cp_connev.riid = &DIID_ConnectionEvents; + connection->cp_connev.IConnectionPoint_iface.lpVtbl = &connpoint_vtbl; + *obj = &connection->Connection_iface; TRACE( "returning iface %p\n", *obj ); return S_OK;
1
0
0
0
Paul Gofman : ntoskrnl.exe: Add stub for ExUnregisterCallback() function.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: efdbac559d8371998879c33090cd9f862d18f4f1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=efdbac559d8371998879c330…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri May 29 10:53:07 2020 +0300 ntoskrnl.exe: Add stub for ExUnregisterCallback() function. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 9effc3f96333d809ffba43b975fa062cbf8912d7) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 5 +++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- include/ddk/wdm.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 5b99d4d17ec..705e6051d58 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2066,6 +2066,11 @@ void * WINAPI ExRegisterCallback(PCALLBACK_OBJECT callback_object, return (void *)0xdeadbeef; } +void WINAPI ExUnregisterCallback(void *callback_registration) +{ + FIXME("callback_registration %p stub.\n", callback_registration); +} + /*********************************************************************** * ExFreePool (NTOSKRNL.EXE.@) */ diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index b65857b82b8..3f6bd777a5e 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -188,7 +188,7 @@ @ stdcall ExSetTimerResolution(long long) @ stub ExSystemExceptionFilter @ stdcall ExSystemTimeToLocalTime(ptr ptr) RtlSystemTimeToLocalTime -@ stub ExUnregisterCallback +@ stdcall ExUnregisterCallback(ptr) @ stdcall ExUuidCreate(ptr) @ stub ExVerifySuite @ stub ExWindowStationObjectType diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index fbb9242cd5b..b69edfbe1b1 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1572,6 +1572,7 @@ void * WINAPI ExRegisterCallback(PCALLBACK_OBJECT,PCALLBACK_FUNCTION,void*); void FASTCALL ExReleaseFastMutexUnsafe(PFAST_MUTEX); void WINAPI ExReleaseResourceForThreadLite(ERESOURCE*,ERESOURCE_THREAD); ULONG WINAPI ExSetTimerResolution(ULONG,BOOLEAN); +void WINAPI ExUnregisterCallback(void*); void WINAPI IoAcquireCancelSpinLock(KIRQL*); NTSTATUS WINAPI IoAcquireRemoveLockEx(IO_REMOVE_LOCK*,void*,const char*,ULONG, ULONG);
1
0
0
0
Paul Gofman : ntoskrnl.exe: Add stub for ExRegisterCallback() function.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: cdd4c607a654550462b0275d233638846edd78ea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cdd4c607a654550462b0275d…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri May 29 10:53:06 2020 +0300 ntoskrnl.exe: Add stub for ExRegisterCallback() function. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 7bc99ae1254f467a23b46756dce40a15494f0758) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 9 +++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- include/ddk/wdm.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index ec0f376d6cd..5b99d4d17ec 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2057,6 +2057,14 @@ NTSTATUS WINAPI ExCreateCallback(PCALLBACK_OBJECT *obj, POBJECT_ATTRIBUTES attr, return STATUS_SUCCESS; } +void * WINAPI ExRegisterCallback(PCALLBACK_OBJECT callback_object, + PCALLBACK_FUNCTION callback_function, void *callback_context) +{ + FIXME("callback_object %p, callback_function %p, callback_context %p stub.\n", + callback_object, callback_function, callback_context); + + return (void *)0xdeadbeef; +} /*********************************************************************** * ExFreePool (NTOSKRNL.EXE.@) @@ -2993,6 +3001,7 @@ PVOID WINAPI MmGetSystemRoutineAddress(PUNICODE_STRING SystemRoutineName) if (!pFunc) { hMod = GetModuleHandleW( halW ); + if (hMod) pFunc = GetProcAddress( hMod, routineNameA.Buffer ); } RtlFreeAnsiString( &routineNameA ); diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index a39247811e5..b65857b82b8 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -180,7 +180,7 @@ @ stub ExRaiseException @ stub ExRaiseHardError @ stub ExRaiseStatus -@ stub ExRegisterCallback +@ stdcall ExRegisterCallback(ptr ptr ptr) @ stub ExReinitializeResourceLite @ stdcall ExReleaseResourceForThreadLite(ptr long) @ extern ExSemaphoreObjectType diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 5152a89842b..fbb9242cd5b 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1296,6 +1296,7 @@ typedef void * (NTAPI *PALLOCATE_FUNCTION)(POOL_TYPE, SIZE_T, ULONG); typedef void * (NTAPI *PALLOCATE_FUNCTION_EX)(POOL_TYPE, SIZE_T, ULONG, PLOOKASIDE_LIST_EX); typedef void (NTAPI *PFREE_FUNCTION)(void *); typedef void (NTAPI *PFREE_FUNCTION_EX)(void *, PLOOKASIDE_LIST_EX); +typedef void (NTAPI *PCALLBACK_FUNCTION)(void *, void *, void *); #ifdef _WIN64 #define LOOKASIDE_ALIGN DECLSPEC_CACHEALIGN @@ -1567,6 +1568,7 @@ PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPI LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList(LIST_ENTRY*,KSPIN_LOCK*); BOOLEAN WINAPI ExIsResourceAcquiredExclusiveLite(ERESOURCE*); ULONG WINAPI ExIsResourceAcquiredSharedLite(ERESOURCE*); +void * WINAPI ExRegisterCallback(PCALLBACK_OBJECT,PCALLBACK_FUNCTION,void*); void FASTCALL ExReleaseFastMutexUnsafe(PFAST_MUTEX); void WINAPI ExReleaseResourceForThreadLite(ERESOURCE*,ERESOURCE_THREAD); ULONG WINAPI ExSetTimerResolution(ULONG,BOOLEAN);
1
0
0
0
Hans Leidekker : msado15: Fix NULL pointer dereference in close_recordset.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 5e05fce75d840ae1207358ba36d232c3ffcec566 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5e05fce75d840ae1207358ba…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri May 29 11:30:02 2020 +0200 msado15: Fix NULL pointer dereference in close_recordset. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49281
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit fb1d46fc0a50f0b74c0f7476d224b56a239003fa) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msado15/recordset.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index 1d28d6b957d..52a37cf2187 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -747,7 +747,10 @@ static ULONG WINAPI recordset_AddRef( _Recordset *iface ) static void close_recordset( struct recordset *recordset ) { - ULONG row, col, col_count = get_column_count( recordset ); + ULONG row, col, col_count; + + if (!recordset->fields) return; + col_count = get_column_count( recordset ); recordset->fields->recordset = NULL; Fields_Release( &recordset->fields->Fields_iface );
1
0
0
0
Aaro Altonen : msado15: Add IConnectionPointContainer stub to _Connection.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 808ba17ce7b118b1dbfc6969e34f59f470920e4f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=808ba17ce7b118b1dbfc6969…
Author: Aaro Altonen <a.altonen(a)hotmail.com> Date: Thu May 28 16:13:40 2020 +0300 msado15: Add IConnectionPointContainer stub to _Connection. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49272
Signed-off-by: Aaro Altonen <a.altonen(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 93dfc9b60e849a6512d2899f2300d86f4f4140c8) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msado15/connection.c | 69 ++++++++++++++++++++++++++++++++++++++++---- dlls/msado15/main.c | 1 - dlls/msado15/tests/msado15.c | 5 ++++ 3 files changed, 68 insertions(+), 7 deletions(-) diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c index 2f0aa0c8dfc..8ed39a3a518 100644 --- a/dlls/msado15/connection.c +++ b/dlls/msado15/connection.c @@ -20,6 +20,8 @@ #include "windef.h" #include "winbase.h" #define COBJMACROS +#include "initguid.h" +#include "ocidl.h" #include "objbase.h" #include "msado15_backcompat.h" @@ -32,12 +34,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msado15); struct connection { - _Connection Connection_iface; - ISupportErrorInfo ISupportErrorInfo_iface; - LONG refs; - ObjectStateEnum state; - LONG timeout; - WCHAR *datasource; + _Connection Connection_iface; + ISupportErrorInfo ISupportErrorInfo_iface; + IConnectionPointContainer IConnectionPointContainer_iface; + LONG refs; + ObjectStateEnum state; + LONG timeout; + WCHAR *datasource; }; static inline struct connection *impl_from_Connection( _Connection *iface ) @@ -50,6 +53,11 @@ static inline struct connection *impl_from_ISupportErrorInfo( ISupportErrorInfo return CONTAINING_RECORD( iface, struct connection, ISupportErrorInfo_iface ); } +static inline struct connection *impl_from_IConnectionPointContainer( IConnectionPointContainer *iface ) +{ + return CONTAINING_RECORD( iface, struct connection, IConnectionPointContainer_iface ); +} + static ULONG WINAPI connection_AddRef( _Connection *iface ) { struct connection *connection = impl_from_Connection( iface ); @@ -83,6 +91,10 @@ static HRESULT WINAPI connection_QueryInterface( _Connection *iface, REFIID riid { *obj = &connection->ISupportErrorInfo_iface; } + else if (IsEqualGUID( riid, &IID_IConnectionPointContainer )) + { + *obj = &connection->IConnectionPointContainer_iface; + } else { FIXME( "interface %s not implemented\n", debugstr_guid(riid) ); @@ -397,6 +409,50 @@ static const struct ISupportErrorInfoVtbl support_error_vtbl = supporterror_InterfaceSupportsErrorInfo }; +static HRESULT WINAPI connpointcontainer_QueryInterface( IConnectionPointContainer *iface, + REFIID riid, void **obj ) +{ + struct connection *connection = impl_from_IConnectionPointContainer( iface ); + return connection_QueryInterface( &connection->Connection_iface, riid, obj ); +} + +static ULONG WINAPI connpointcontainer_AddRef( IConnectionPointContainer *iface ) +{ + struct connection *connection = impl_from_IConnectionPointContainer( iface ); + return connection_AddRef( &connection->Connection_iface ); +} + +static ULONG WINAPI connpointcontainer_Release( IConnectionPointContainer *iface ) +{ + struct connection *connection = impl_from_IConnectionPointContainer( iface ); + return connection_Release( &connection->Connection_iface ); +} + +static HRESULT WINAPI connpointcontainer_EnumConnectionPoints( IConnectionPointContainer *iface, + IEnumConnectionPoints **points ) +{ + struct connection *connection = impl_from_IConnectionPointContainer( iface ); + FIXME( "%p, %p\n", connection, points ); + return E_NOTIMPL; +} + +static HRESULT WINAPI connpointcontainer_FindConnectionPoint( IConnectionPointContainer *iface, + REFIID riid, IConnectionPoint **point ) +{ + struct connection *connection = impl_from_IConnectionPointContainer( iface ); + FIXME( "%p, %s, %p\n", connection, debugstr_guid( riid ), point ); + return E_NOTIMPL; +} + +static const struct IConnectionPointContainerVtbl connpointcontainer_vtbl = +{ + connpointcontainer_QueryInterface, + connpointcontainer_AddRef, + connpointcontainer_Release, + connpointcontainer_EnumConnectionPoints, + connpointcontainer_FindConnectionPoint +}; + HRESULT Connection_create( void **obj ) { struct connection *connection; @@ -404,6 +460,7 @@ HRESULT Connection_create( void **obj ) if (!(connection = heap_alloc( sizeof(*connection) ))) return E_OUTOFMEMORY; connection->Connection_iface.lpVtbl = &connection_vtbl; connection->ISupportErrorInfo_iface.lpVtbl = &support_error_vtbl; + connection->IConnectionPointContainer_iface.lpVtbl = &connpointcontainer_vtbl; connection->refs = 1; connection->state = adStateClosed; connection->timeout = 30; diff --git a/dlls/msado15/main.c b/dlls/msado15/main.c index 3115474b843..770a02fc59d 100644 --- a/dlls/msado15/main.c +++ b/dlls/msado15/main.c @@ -19,7 +19,6 @@ #include <stdarg.h> #include "windef.h" #include "winbase.h" -#include "initguid.h" #define COBJMACROS #include "objbase.h" #include "rpcproxy.h" diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index ca07b4c2ae0..cd6516d45d6 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -660,6 +660,7 @@ static void test_Connection(void) _Connection *connection; IRunnableObject *runtime; ISupportErrorInfo *errorinfo; + IConnectionPointContainer *pointcontainer; LONG state, timeout; BSTR str, str2; @@ -673,6 +674,10 @@ static void test_Connection(void) ok(hr == S_OK, "Failed to get ISupportErrorInfo interface\n"); ISupportErrorInfo_Release(errorinfo); + hr = _Connection_QueryInterface(connection, &IID_IConnectionPointContainer, (void**)&pointcontainer); + ok(hr == S_OK, "Failed to get IConnectionPointContainer interface %08x\n", hr); + IConnectionPointContainer_Release(pointcontainer); + if (0) /* Crashes on windows */ { hr = _Connection_get_State(connection, NULL);
1
0
0
0
Alistair Leslie-Hughes : msado15: Implement _Connection get/put ConnectionString.
by Alexandre Julliard
10 Nov '20
10 Nov '20
Module: wine Branch: stable Commit: 8b6ec48f33e649cc5eb023963cc81f1a60b7dc60 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8b6ec48f33e649cc5eb02396…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue Jan 28 11:36:03 2020 +0100 msado15: Implement _Connection get/put ConnectionString. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 765fc5cb319b199d1bd9fe145111ea5951c86696) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msado15/connection.c | 24 ++++++++++++++++++++---- dlls/msado15/tests/msado15.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c index 73b225628c2..2f0aa0c8dfc 100644 --- a/dlls/msado15/connection.c +++ b/dlls/msado15/connection.c @@ -37,6 +37,7 @@ struct connection LONG refs; ObjectStateEnum state; LONG timeout; + WCHAR *datasource; }; static inline struct connection *impl_from_Connection( _Connection *iface ) @@ -62,6 +63,7 @@ static ULONG WINAPI connection_Release( _Connection *iface ) if (!refs) { TRACE( "destroying %p\n", connection ); + heap_free( connection->datasource ); heap_free( connection ); } return refs; @@ -125,14 +127,27 @@ static HRESULT WINAPI connection_get_Properties( _Connection *iface, Properties static HRESULT WINAPI connection_get_ConnectionString( _Connection *iface, BSTR *str ) { - FIXME( "%p, %p\n", iface, str ); - return E_NOTIMPL; + struct connection *connection = impl_from_Connection( iface ); + BSTR source = NULL; + + TRACE( "%p, %p\n", connection, str ); + + if (connection->datasource && !(source = SysAllocString( connection->datasource ))) return E_OUTOFMEMORY; + *str = source; + return S_OK; } static HRESULT WINAPI connection_put_ConnectionString( _Connection *iface, BSTR str ) { - FIXME( "%p, %s\n", iface, debugstr_w(str) ); - return E_NOTIMPL; + struct connection *connection = impl_from_Connection( iface ); + WCHAR *source = NULL; + + TRACE( "%p, %s\n", connection, debugstr_w( !wcsstr( str, L"Password" ) ? L"<hidden>" : str ) ); + + if (str && !(source = strdupW( str ))) return E_OUTOFMEMORY; + heap_free( connection->datasource ); + connection->datasource = source; + return S_OK; } static HRESULT WINAPI connection_get_CommandTimeout( _Connection *iface, LONG *timeout ) @@ -392,6 +407,7 @@ HRESULT Connection_create( void **obj ) connection->refs = 1; connection->state = adStateClosed; connection->timeout = 30; + connection->datasource = NULL; *obj = &connection->Connection_iface; TRACE( "returning iface %p\n", *obj ); diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index dd37dbf5a69..ca07b4c2ae0 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -661,6 +661,7 @@ static void test_Connection(void) IRunnableObject *runtime; ISupportErrorInfo *errorinfo; LONG state, timeout; + BSTR str, str2; hr = CoCreateInstance(&CLSID_Connection, NULL, CLSCTX_INPROC_SERVER, &IID__Connection, (void**)&connection); ok( hr == S_OK, "got %08x\n", hr ); @@ -696,6 +697,35 @@ if (0) /* Crashes on windows */ ok(hr == S_OK, "Failed to get state, hr 0x%08x\n", hr); ok(timeout == 300, "Unexpected timeout value %d\n", timeout); + str = (BSTR)0xdeadbeef; + hr = _Connection_get_ConnectionString(connection, &str); + ok(hr == S_OK, "Failed, hr 0x%08x\n", hr); + ok(str == NULL, "got %p\n", str); + + str = SysAllocString(L"Provider=MSDASQL.1;Persist Security Info=False;Data Source=wine_test"); + hr = _Connection_put_ConnectionString(connection, str); + ok(hr == S_OK, "Failed, hr 0x%08x\n", hr); + +if (0) /* Crashes on windows */ +{ + hr = _Connection_get_ConnectionString(connection, NULL); + ok(hr == E_POINTER, "Failed, hr 0x%08x\n", hr); +} + + str2 = NULL; + hr = _Connection_get_ConnectionString(connection, &str2); + ok(hr == S_OK, "Failed, hr 0x%08x\n", hr); + ok(!wcscmp(str, str2), "wrong string %s\n", wine_dbgstr_w(str2)); + SysFreeString(str); + SysFreeString(str2); + + hr = _Connection_put_ConnectionString(connection, NULL); + ok(hr == S_OK, "Failed, hr 0x%08x\n", hr); + + str = (BSTR)0xdeadbeef; + hr = _Connection_get_ConnectionString(connection, &str); + ok(hr == S_OK, "Failed, hr 0x%08x\n", hr); + ok(str == NULL, "got %p\n", str); _Connection_Release(connection); }
1
0
0
0
← Newer
1
...
63
64
65
66
67
68
69
...
86
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
Results per page:
10
25
50
100
200