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
May 2018
----- 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
716 discussions
Start a n
N
ew thread
Hans Leidekker : server: Store the token owner separately.
by Alexandre Julliard
02 May '18
02 May '18
Module: wine Branch: master Commit: fc3057c4f3c3dd85902140b9ed479128e7d9297e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fc3057c4f3c3dd85902140b9…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed May 2 10:45:42 2018 +0200 server: Store the token owner separately. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/token.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/server/token.c b/server/token.c index cde9c5a..0810a61 100644 --- a/server/token.c +++ b/server/token.c @@ -104,7 +104,8 @@ struct token struct list privileges; /* privileges available to the token */ struct list groups; /* groups that the user of this token belongs to (sid_and_attributes) */ SID *user; /* SID of user this token represents */ - SID *primary_group; /* SID of user's primary group */ + SID *owner; /* SID of owner (points to user or one of groups) */ + SID *primary_group; /* SID of user's primary group (points to one of groups) */ unsigned primary; /* is this a primary or impersonation token? */ ACL *default_dacl; /* the default DACL to assign to objects created by this user */ TOKEN_SOURCE source; /* source of the token */ @@ -582,9 +583,12 @@ static struct token *create_token( unsigned primary, const SID *user, group->resource = FALSE; group->deny_only = FALSE; list_add_tail( &token->groups, &group->entry ); - /* Use first owner capable group as an owner */ + /* Use first owner capable group as owner and primary group */ if (!token->primary_group && group->owner) + { + token->owner = &group->sid; token->primary_group = &group->sid; + } } /* copy privileges */ @@ -654,7 +658,10 @@ struct token *token_duplicate( struct token *src_token, unsigned primary, memcpy( newgroup, group, size ); list_add_tail( &token->groups, &newgroup->entry ); if (src_token->primary_group == &group->sid) + { + token->owner = &newgroup->sid; token->primary_group = &newgroup->sid; + } } assert( token->primary_group ); @@ -1393,16 +1400,14 @@ DECL_HANDLER(access_check) } } -/* retrieves the SID of the user that the token represents */ +/* retrieves an SID from the token */ DECL_HANDLER(get_token_sid) { struct token *token; reply->sid_len = 0; - if ((token = (struct token *)get_handle_obj( current->process, req->handle, - TOKEN_QUERY, - &token_ops ))) + if ((token = (struct token *)get_handle_obj( current->process, req->handle, TOKEN_QUERY, &token_ops ))) { const SID *sid = NULL; @@ -1416,18 +1421,8 @@ DECL_HANDLER(get_token_sid) sid = token->primary_group; break; case TokenOwner: - { - struct group *group; - LIST_FOR_EACH_ENTRY( group, &token->groups, struct group, entry ) - { - if (group->owner) - { - sid = &group->sid; - break; - } - } + sid = token->owner; break; - } case TokenLogonSid: sid = (const SID *)&builtin_logon_sid; break;
1
0
0
0
Hans Leidekker : server: Dump token details.
by Alexandre Julliard
02 May '18
02 May '18
Module: wine Branch: master Commit: 14191f2dd0b6daab7fc6d2d429a34759248b1902 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=14191f2dd0b6daab7fc6d2d4…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed May 2 10:45:41 2018 +0200 server: Dump token details. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/token.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/token.c b/server/token.c index 7deddc4..cde9c5a 100644 --- a/server/token.c +++ b/server/token.c @@ -158,11 +158,12 @@ static const struct object_ops token_ops = token_destroy /* destroy */ }; - static void token_dump( struct object *obj, int verbose ) { - fprintf( stderr, "Security token\n" ); - /* FIXME: dump token members */ + struct token *token = (struct token *)obj; + assert( obj->ops == &token_ops ); + fprintf( stderr, "Token id=%d.%u primary=%u impersonation level=%d\n", token->token_id.high_part, + token->token_id.low_part, token->primary, token->impersonation_level ); } static unsigned int token_map_access( struct object *obj, unsigned int access )
1
0
0
0
Zebediah Figura : msi: Set the correct values for ProgramFiles64Folder and CommonFiles64Folder.
by Alexandre Julliard
02 May '18
02 May '18
Module: wine Branch: master Commit: a6e9622439c4fd22578e737e60ca2af44a32f8b1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a6e9622439c4fd22578e737e…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 2 00:09:24 2018 -0500 msi: Set the correct values for ProgramFiles64Folder and CommonFiles64Folder. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/package.c | 37 ++++-- dlls/msi/tests/package.c | 292 ++++++++++++----------------------------------- 2 files changed, 101 insertions(+), 228 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a6e9622439c4fd22578e…
1
0
0
0
Zebediah Figura : ntoskrnl.exe/tests: Add a simple test for MmMapLockedPagesSpecifyCache().
by Alexandre Julliard
02 May '18
02 May '18
Module: wine Branch: master Commit: fb365b10e6434df1d270e0ee30e779aa3bc41ea0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fb365b10e6434df1d270e0ee…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue May 1 18:38:04 2018 -0500 ntoskrnl.exe/tests: Add a simple test for MmMapLockedPagesSpecifyCache(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver.c | 21 +++++++++++++++++++++ include/ddk/wdm.h | 1 + 2 files changed, 22 insertions(+) diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 1328045..84cfff7 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -152,6 +152,26 @@ todo_wine ok(current != NULL, "Expected current process to be non-NULL\n"); } +static void test_mdl_map(void) +{ + char buffer[20] = "test buffer"; + void *addr; + MDL *mdl; + + mdl = IoAllocateMdl(buffer, sizeof(buffer), FALSE, FALSE, NULL); + ok(mdl != NULL, "IoAllocateMdl failed\n"); + + MmProbeAndLockPages(mdl, KernelMode, IoReadAccess); + + addr = MmMapLockedPagesSpecifyCache(mdl, KernelMode, MmCached, NULL, FALSE, NormalPagePriority); +todo_wine + ok(addr != NULL, "MmMapLockedPagesSpecifyCache failed\n"); + + /* MmUnmapLockedPages(addr, mdl); */ + + IoFreeMdl(mdl); +} + static NTSTATUS main_test(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) { ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength; @@ -176,6 +196,7 @@ static NTSTATUS main_test(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) ZwOpenFile(&okfile, FILE_APPEND_DATA, &attr, &io, 0, 0); test_currentprocess(); + test_mdl_map(); /* print process report */ if (test_input->winetest_debug) diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 8634f36..cab9828 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1423,6 +1423,7 @@ PMDL WINAPI MmAllocatePagesForMdl(PHYSICAL_ADDRESS,PHYSICAL_ADDRESS,PHYSICA void WINAPI MmFreeNonCachedMemory(PVOID,SIZE_T); PVOID WINAPI MmMapLockedPagesSpecifyCache(PMDL,KPROCESSOR_MODE,MEMORY_CACHING_TYPE,PVOID,ULONG,ULONG); MM_SYSTEMSIZE WINAPI MmQuerySystemSize(void); +void WINAPI MmProbeAndLockPages(PMDLX, KPROCESSOR_MODE, LOCK_OPERATION); static inline void *MmGetSystemAddressForMdlSafe(MDL *mdl, ULONG priority) {
1
0
0
0
Zebediah Figura : ntoskrnl.exe/tests: Add a test for IoGetCurrentProcess() .
by Alexandre Julliard
02 May '18
02 May '18
Module: wine Branch: master Commit: 80f82ee9d735808aa56a419beadec52b8831aecb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=80f82ee9d735808aa56a419b…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue May 1 18:38:03 2018 -0500 ntoskrnl.exe/tests: Add a test for IoGetCurrentProcess(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 8 +- dlls/ntoskrnl.exe/tests/driver.c | 157 ++++++++++++++++++++++++++++++++++++ dlls/ntoskrnl.exe/tests/driver.h | 9 +++ dlls/ntoskrnl.exe/tests/ntoskrnl.c | 50 ++++++++++++ include/wine/test.h | 9 ++- 5 files changed, 226 insertions(+), 7 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=80f82ee9d735808aa56a…
1
0
0
0
Zebediah Figura : ntoskrnl.exe/tests: Also handle ERROR_INVALID_IMAGE_HASH.
by Alexandre Julliard
02 May '18
02 May '18
Module: wine Branch: master Commit: 0dc84eada28fde65f07ceb7372694de138153c6d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0dc84eada28fde65f07ceb73…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue May 1 18:38:02 2018 -0500 ntoskrnl.exe/tests: Also handle ERROR_INVALID_IMAGE_HASH. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 623e10d..bd0498a 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -104,7 +104,7 @@ static SC_HANDLE load_driver(char *filename) SetLastError(0xdeadbeef); ret = StartServiceA(service, 0, NULL); - if (!ret && GetLastError() == ERROR_DRIVER_BLOCKED) + if (!ret && (GetLastError() == ERROR_DRIVER_BLOCKED || GetLastError() == ERROR_INVALID_IMAGE_HASH)) { /* If Secure Boot is enabled or the machine is 64-bit, it will reject an unsigned driver. */ skip("Failed to start service; probably your machine doesn't accept unsigned drivers.\n");
1
0
0
0
Alistair Leslie-Hughes : combase/tests: Add RoGetActivationFactory tests.
by Alexandre Julliard
02 May '18
02 May '18
Module: wine Branch: master Commit: c5c37cf6b32fa57bb2427db4aa6f7896fe1951fc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c5c37cf6b32fa57bb2427db4…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed May 2 03:42:50 2018 +0000 combase/tests: Add RoGetActivationFactory tests. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/combase/tests/Makefile.in | 1 + dlls/combase/tests/roapi.c | 112 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/dlls/combase/tests/Makefile.in b/dlls/combase/tests/Makefile.in index 3e7ecab..ca6c48f 100644 --- a/dlls/combase/tests/Makefile.in +++ b/dlls/combase/tests/Makefile.in @@ -1,4 +1,5 @@ TESTDLL = combase.dll C_SRCS = \ + roapi.c \ string.c diff --git a/dlls/combase/tests/roapi.c b/dlls/combase/tests/roapi.c new file mode 100644 index 0000000..3d46772 --- /dev/null +++ b/dlls/combase/tests/roapi.c @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2018 Alistair Leslie-Hughes + * + * 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 + */ +#define COBJMACROS +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winstring.h" + +#include "initguid.h" +#include "roapi.h" + + +#include "wine/test.h" + +static HRESULT (WINAPI *pRoActivateInstance)(HSTRING, IInspectable **); +static HRESULT (WINAPI *pRoInitialize)(RO_INIT_TYPE); +static void (WINAPI *pRoUninitialize)(void); +static HRESULT (WINAPI *pRoGetActivationFactory)(HSTRING, REFIID, void **); + +static HRESULT (WINAPI *pWindowsCreateString)(LPCWSTR, UINT32, HSTRING *); +static HRESULT (WINAPI *pWindowsDeleteString)(HSTRING); + +#define SET(x) p##x = (void*)GetProcAddress(hmod, #x) + +static BOOL init_functions(void) +{ + HMODULE hmod = LoadLibraryA("combase.dll"); + if (!hmod) + { + win_skip("Failed to load combase.dll, skipping tests\n"); + return FALSE; + } + SET(RoActivateInstance); + SET(RoInitialize); + SET(RoUninitialize); + SET(RoGetActivationFactory); + + SET(WindowsCreateString); + SET(WindowsDeleteString); + + return TRUE; +} + +static void test_ActivationFactories(void) +{ + static const WCHAR xmldocumentW[] = { 'W','i','n','d','o','w','s','.','D','a','t','a','.','X','m','l','.', + 'D','o','m','.','X','m','l','D','o','c','u','m','e','n','t',0 }; + static const WCHAR nonexistW[] = { 'D','o','e','s','.','N','o','t','.','E','x','i','s','t',0 }; + HRESULT hr; + HSTRING str, str2; + IActivationFactory *factory = NULL; + IInspectable *inspect = NULL; + + if(!pRoGetActivationFactory || !pRoActivateInstance) + { + win_skip("RoGetActivationFactory not available\n"); + return; + } + + hr = pWindowsCreateString(xmldocumentW, sizeof(xmldocumentW)/sizeof(WCHAR) - 1, &str); + ok(hr == S_OK, "got %08x\n", hr); + + hr = pWindowsCreateString(nonexistW, sizeof(nonexistW)/sizeof(WCHAR) - 1, &str2); + ok(hr == S_OK, "got %08x\n", hr); + + hr = pRoInitialize(RO_INIT_MULTITHREADED); + ok(hr == S_OK, "got %08x\n", hr); + + hr = pRoGetActivationFactory(str2, &IID_IActivationFactory, (void **)&factory); + todo_wine ok(hr == REGDB_E_CLASSNOTREG, "got %08x\n", hr); + + hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); + todo_wine ok(hr == S_OK, "got %08x\n", hr); + if(factory) + IActivationFactory_Release(factory); + + hr = pRoActivateInstance(str2, &inspect); + todo_wine ok(hr == REGDB_E_CLASSNOTREG, "got %08x\n", hr); + + hr = pRoActivateInstance(str, &inspect); + todo_wine ok(hr == S_OK, "got %08x\n", hr); + if(inspect) + IInspectable_Release(inspect); + + pWindowsDeleteString(str); + pRoUninitialize(); +} + +START_TEST(roapi) +{ + if (!init_functions()) + return; + + test_ActivationFactories(); +}
1
0
0
0
Michael Müller : combase: Implement RoActivateInstance.
by Alexandre Julliard
02 May '18
02 May '18
Module: wine Branch: master Commit: e5275c2f86bd6a1dea88ece3e636783c19c430ec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e5275c2f86bd6a1dea88ece3…
Author: Michael Müller <michael(a)fds-team.de> Date: Wed May 2 03:42:49 2018 +0000 combase: Implement RoActivateInstance. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-core-winrt-l1-1-0.spec | 2 +- dlls/combase/combase.spec | 2 +- dlls/combase/roapi.c | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec b/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec index 74c9d27..978c3dc 100644 --- a/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec +++ b/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec @@ -1,4 +1,4 @@ -@ stub RoActivateInstance +@ stdcall RoActivateInstance(ptr ptr) combase.RoActivateInstance @ stdcall RoGetActivationFactory(ptr ptr ptr) combase.RoGetActivationFactory @ stub RoGetApartmentIdentifier @ stdcall RoInitialize(long) combase.RoInitialize diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index c238eb8..f42bdae 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -242,7 +242,7 @@ @ stdcall PropVariantClear(ptr) ole32.PropVariantClear @ stdcall PropVariantCopy(ptr ptr) ole32.PropVariantCopy @ stub ReleaseFuncDescs -@ stub RoActivateInstance +@ stdcall RoActivateInstance(ptr ptr) @ stub RoCaptureErrorContext @ stub RoClearError @ stub RoFailFastWithErrorContext diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c index f7862fb..bfd07fb 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c @@ -198,3 +198,23 @@ HRESULT WINAPI RoGetParameterizedTypeInstanceIID(UINT32 name_element_count, cons if (hiid) *hiid = INVALID_HANDLE_VALUE; return E_NOTIMPL; } + +/*********************************************************************** + * RoActivateInstance (combase.@) + */ +HRESULT WINAPI RoActivateInstance(HSTRING classid, IInspectable **instance) +{ + IActivationFactory *factory; + HRESULT hr; + + FIXME("(%p, %p): semi-stub\n", classid, instance); + + hr = RoGetActivationFactory(classid, &IID_IActivationFactory, (void **)&factory); + if (SUCCEEDED(hr)) + { + hr = IActivationFactory_ActivateInstance(factory, instance); + IActivationFactory_Release(factory); + } + + return hr; +}
1
0
0
0
Michael Müller : combase: Implement RoGetActivationFactory.
by Alexandre Julliard
02 May '18
02 May '18
Module: wine Branch: master Commit: e6c0dd3bed8dd716bb39a81c46f4d505bf783493 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e6c0dd3bed8dd716bb39a81c…
Author: Michael Müller <michael(a)fds-team.de> Date: Wed May 2 03:42:47 2018 +0000 combase: Implement RoGetActivationFactory. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/combase/Makefile.in | 2 +- dlls/combase/roapi.c | 139 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 135 insertions(+), 6 deletions(-) diff --git a/dlls/combase/Makefile.in b/dlls/combase/Makefile.in index b1d759e..df051ad 100644 --- a/dlls/combase/Makefile.in +++ b/dlls/combase/Makefile.in @@ -1,5 +1,5 @@ MODULE = combase.dll -IMPORTS = ole32 uuid +IMPORTS = advapi32 ole32 uuid C_SRCS = \ roapi.c \ diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c index a2d62520..f7862fb 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c @@ -1,5 +1,6 @@ /* * Copyright 2014 Martin Storsjo + * Copyright 2016 Michael Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -15,16 +16,96 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ - +#define COBJMACROS #include "objbase.h" +#include "initguid.h" #include "roapi.h" #include "roparameterizediid.h" -#include "hstring.h" +#include "winstring.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(combase); +static const char *debugstr_hstring(HSTRING hstr) +{ + const WCHAR *str; + UINT32 len; + if (hstr && !((ULONG_PTR)hstr >> 16)) return "(invalid)"; + str = WindowsGetStringRawBuffer(hstr, &len); + return wine_dbgstr_wn(str, len); +} + +static HRESULT get_library_for_classid(const WCHAR *classid, WCHAR **out) +{ + static const WCHAR classkeyW[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','R','u','n','t','i','m','e','\\', + 'A','c','t','i','v','a','t','a','b','l','e','C','l','a','s','s','I','d',0}; + static const WCHAR dllpathW[] = {'D','l','l','P','a','t','h',0}; + HKEY hkey_root, hkey_class; + DWORD type, size; + HRESULT hr; + WCHAR *buf = NULL; + + *out = NULL; + + /* load class registry key */ + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, classkeyW, 0, KEY_READ, &hkey_root)) + return REGDB_E_READREGDB; + if (RegOpenKeyExW(hkey_root, classid, 0, KEY_READ, &hkey_class)) + { + WARN("Class %s not found in registry\n", debugstr_w(classid)); + RegCloseKey(hkey_root); + return REGDB_E_CLASSNOTREG; + } + RegCloseKey(hkey_root); + + /* load (and expand) DllPath registry value */ + if (RegQueryValueExW(hkey_class, dllpathW, NULL, &type, NULL, &size)) + { + hr = REGDB_E_READREGDB; + goto done; + } + if (type != REG_SZ && type != REG_EXPAND_SZ) + { + hr = REGDB_E_READREGDB; + goto done; + } + if (!(buf = HeapAlloc(GetProcessHeap(), 0, size))) + { + hr = E_OUTOFMEMORY; + goto done; + } + if (RegQueryValueExW(hkey_class, dllpathW, NULL, NULL, (BYTE *)buf, &size)) + { + hr = REGDB_E_READREGDB; + goto done; + } + if (type == REG_EXPAND_SZ) + { + WCHAR *expanded; + DWORD len = ExpandEnvironmentStringsW(buf, NULL, 0); + if (!(expanded = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + { + hr = E_OUTOFMEMORY; + goto done; + } + ExpandEnvironmentStringsW(buf, expanded, len); + HeapFree(GetProcessHeap(), 0, buf); + buf = expanded; + } + + *out = buf; + return S_OK; + +done: + HeapFree(GetProcessHeap(), 0, buf); + RegCloseKey(hkey_class); + return hr; +} + + /*********************************************************************** * RoInitialize (combase.@) */ @@ -51,10 +132,58 @@ void WINAPI RoUninitialize(void) /*********************************************************************** * RoGetActivationFactory (combase.@) */ -HRESULT WINAPI RoGetActivationFactory(HSTRING classid, REFIID iid, void **factory) +HRESULT WINAPI RoGetActivationFactory(HSTRING classid, REFIID iid, void **class_factory) { - FIXME("stub: %p %p %p\n", classid, iid, factory); - return E_NOTIMPL; + PFNGETACTIVATIONFACTORY pDllGetActivationFactory; + IActivationFactory *factory; + WCHAR *library; + HMODULE module; + HRESULT hr; + + FIXME("(%s, %s, %p): semi-stub\n", debugstr_hstring(classid), debugstr_guid(iid), class_factory); + + if (!iid || !class_factory) + return E_INVALIDARG; + + hr = get_library_for_classid(WindowsGetStringRawBuffer(classid, NULL), &library); + if (FAILED(hr)) + { + ERR("Failed to find library for %s\n", debugstr_hstring(classid)); + return hr; + } + + if (!(module = LoadLibraryW(library))) + { + ERR("Failed to load module %s\n", debugstr_w(library)); + hr = HRESULT_FROM_WIN32(GetLastError()); + goto done; + } + + if (!(pDllGetActivationFactory = (void *)GetProcAddress(module, "DllGetActivationFactory"))) + { + ERR("Module %s does not implement DllGetActivationFactory\n", debugstr_w(library)); + hr = E_FAIL; + goto done; + } + + TRACE("Found library %s for class %s\n", debugstr_w(library), debugstr_hstring(classid)); + + hr = pDllGetActivationFactory(classid, &factory); + if (SUCCEEDED(hr)) + { + hr = IActivationFactory_QueryInterface(factory, iid, class_factory); + if (SUCCEEDED(hr)) + { + TRACE("Created interface %p\n", *class_factory); + module = NULL; + } + IActivationFactory_Release(factory); + } + +done: + HeapFree(GetProcessHeap(), 0, library); + if (module) FreeLibrary(module); + return hr; } /***********************************************************************
1
0
0
0
Daniel Lehman : advapi32/tests: Don't call function in assert().
by Alexandre Julliard
02 May '18
02 May '18
Module: wine Branch: master Commit: 36a67edd1ef0b1eb45a9928ac9337244b935cee7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=36a67edd1ef0b1eb45a9928a…
Author: Daniel Lehman <dlehman(a)esri.com> Date: Sat Apr 28 13:02:08 2018 -0700 advapi32/tests: Don't call function in assert(). Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/registry.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 1df117b..2f7566c 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -175,9 +175,12 @@ static DWORD delete_key( HKEY hkey ) static void setup_main_key(void) { + DWORD ret; + if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkey_main )) delete_key( hkey_main ); - assert (!RegCreateKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkey_main )); + ret = RegCreateKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkey_main ); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); } static void check_user_privs(void)
1
0
0
0
← Newer
1
...
66
67
68
69
70
71
72
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
Results per page:
10
25
50
100
200