Compare commits

...

22 Commits
v3.7 ... v3.8

Author SHA1 Message Date
Alistair Leslie-Hughes
eb684dd939 Release 3.8 2018-05-12 17:19:45 +10:00
Alistair Leslie-Hughes
3851931e1c Added wined3d-Implement-oMask patchset 2018-05-12 13:55:47 +10:00
Alistair Leslie-Hughes
054b0f6db6 Added dxgi-IDXGIDevice2 patchset 2018-05-12 13:49:45 +10:00
Alistair Leslie-Hughes
fcff4a78ba Rebase against 7280f7fb744e951281e7f051c347fb8fef5ab36b 2018-05-12 09:24:56 +10:00
Alistair Leslie-Hughes
44ee738e8b Updated ntdll-Loader_Machine_Type patchset 2018-05-11 19:57:03 +10:00
Alistair Leslie-Hughes
fd7f8c9f16 Rebase against 6d6b4bffb3f619ae298669b888775350223e281f 2018-05-11 11:32:38 +10:00
Alistair Leslie-Hughes
54122cc23e Updated ntdll-Loader_Machine_Type patchset
- Resource only DLLs need to be excluded from the Architecture test.
2018-05-10 08:29:54 +10:00
Alistair Leslie-Hughes
31a33b08ad Rebase against 8f46ac233ed96f7286f6aacd1f8fb2626d3ed1c2 2018-05-10 08:26:38 +10:00
Zebediah Figura
ec4fd3ebdc Rebase against 7f955f22d317cad1e7d5323179e9a0ee635c9768. 2018-05-08 17:53:51 -05:00
Alistair Leslie-Hughes
e9ce651159 Added d3d11-dynamic-cpu-access patchset 2018-05-08 15:35:51 +10:00
Alistair Leslie-Hughes
9f3d2b6601 Disabled dwrite-FontFallback patchset
The tests pass without the implementaion.
2018-05-08 15:31:50 +10:00
Alistair Leslie-Hughes
eaebccd0b8 Rebase against 540c48b91175b11c7b8646d0a036b20c46425080 2018-05-05 09:01:04 +10:00
Alistair Leslie-Hughes
3c3993fdfa Updated shell32-NewMenu_Interface patchset 2018-05-04 18:45:15 +10:00
Alistair Leslie-Hughes
cc3e8145ba Updated shell32-NewMenu_Interface patchset 2018-05-04 10:32:47 +10:00
Alistair Leslie-Hughes
5571baf8cc Rebase against e637a6f0bf1eeba3e6be62c4e1c5688bb8f6102e 2018-05-04 10:25:05 +10:00
Alistair Leslie-Hughes
c7b329f9f1 Added dwrite-FontFallback patch 2018-05-04 09:32:17 +10:00
Alistair Leslie-Hughes
a022e6ff69 Added d3d11-shader-count patchset 2018-05-04 09:27:24 +10:00
Alistair Leslie-Hughes
f9342fe22e Added d2d1-ID2D1Factory1 patchset 2018-05-04 09:20:44 +10:00
Zebediah Figura
797372c132 ntoskrnl-DriverTest: Merge tests with appropriate patches in ntoskrnl-Stubs and winedevice-Default_Drivers. 2018-05-02 18:37:53 -05:00
Zebediah Figura
27c94566e3 Rebase against 8dca6c35e11a104385242ed8346ee05707b78ef7 2018-05-02 17:29:44 -05:00
Zebediah Figura
c6a90a954b Rebase against dbce559df683b7831861c747f1f4d28614eedbe2 2018-05-01 18:26:01 -05:00
Alistair Leslie-Hughes
d13e9fa487 Rebase against 784b617ae936f97118e18624da85cc9de900e3a7 2018-05-01 12:33:16 +10:00
113 changed files with 6265 additions and 4629 deletions

View File

@@ -1,4 +1,4 @@
From 3f314cc8251f62f592013abe7b1c3b977de0699a Mon Sep 17 00:00:00 2001
From 1eb8acd819f9eee8fdf154d0ef43881008265916 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 4 Aug 2017 02:33:14 +0200
Subject: ntdll: Implement NtFilterToken.
@@ -15,10 +15,10 @@ Subject: ntdll: Implement NtFilterToken.
8 files changed, 162 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 93554e929be..5822dec9b15 100644
index c3f5df3..59a08de 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -136,6 +136,65 @@ NTSTATUS WINAPI NtDuplicateToken(
@@ -119,6 +119,65 @@ NTSTATUS WINAPI NtDuplicateToken(
}
/******************************************************************************
@@ -85,10 +85,10 @@ index 93554e929be..5822dec9b15 100644
* ZwOpenProcessToken [NTDLL.@]
*/
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 4f7ee496437..275fda57970 100644
index c260b0d..3c5e69c 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -179,7 +179,7 @@
@@ -176,7 +176,7 @@
# @ stub NtEnumerateSystemEnvironmentValuesEx
@ stdcall NtEnumerateValueKey(long long long ptr long ptr)
@ stub NtExtendSection
@@ -98,10 +98,10 @@ index 4f7ee496437..275fda57970 100644
@ stdcall NtFlushBuffersFile(long ptr)
@ stdcall NtFlushInstructionCache(long ptr long)
diff --git a/include/winnt.h b/include/winnt.h
index f91f81eb559..891c9b6d4bb 100644
index 16d96d8..4e238f9 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -3844,6 +3844,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
@@ -3904,6 +3904,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
TOKEN_ADJUST_SESSIONID | \
TOKEN_ADJUST_DEFAULT )
@@ -114,10 +114,10 @@ index f91f81eb559..891c9b6d4bb 100644
#define _SECURITY_DEFINED
diff --git a/include/winternl.h b/include/winternl.h
index 140669b0105..899e8324d67 100644
index c84e6d7..288f93e 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2348,6 +2348,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
@@ -2303,6 +2303,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
@@ -126,10 +126,10 @@ index 140669b0105..899e8324d67 100644
NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
diff --git a/server/process.c b/server/process.c
index cbe726afe81..f0f60edcd3f 100644
index f8739d0..71d9d6d 100644
--- a/server/process.c
+++ b/server/process.c
@@ -571,7 +571,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
@@ -566,7 +566,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
: alloc_handle_table( process, 0 );
/* Note: for security reasons, starting a new process does not attempt
* to use the current impersonation token for the new process */
@@ -139,10 +139,10 @@ index cbe726afe81..f0f60edcd3f 100644
}
if (!process->handles || !process->token) goto error;
diff --git a/server/protocol.def b/server/protocol.def
index fc6e343af52..b3dce66eb9c 100644
index 35824ae..6ee6d28 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3391,6 +3391,16 @@ enum caret_state
@@ -3356,6 +3356,16 @@ enum caret_state
obj_handle_t new_handle; /* duplicated handle */
@END
@@ -160,10 +160,10 @@ index fc6e343af52..b3dce66eb9c 100644
obj_handle_t handle; /* handle to the token */
unsigned int desired_access; /* desired access to the object */
diff --git a/server/security.h b/server/security.h
index 606dbb2ab2c..6c337143c3d 100644
index 873bbc6..bc4a8f6 100644
--- a/server/security.h
+++ b/server/security.h
@@ -56,7 +56,9 @@ extern const PSID security_high_label_sid;
@@ -55,7 +55,9 @@ extern const PSID security_high_label_sid;
extern struct token *token_create_admin(void);
extern int token_assign_label( struct token *token, PSID label );
extern struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -175,10 +175,10 @@ index 606dbb2ab2c..6c337143c3d 100644
const LUID_AND_ATTRIBUTES *reqprivs,
unsigned int count, LUID_AND_ATTRIBUTES *usedprivs);
diff --git a/server/token.c b/server/token.c
index 74db66e1e24..acd7a4dedb5 100644
index 0810a61..2f6a467 100644
--- a/server/token.c
+++ b/server/token.c
@@ -299,6 +299,19 @@ static int acl_is_valid( const ACL *acl, data_size_t size )
@@ -276,6 +276,19 @@ static int acl_is_valid( const ACL *acl, data_size_t size )
return TRUE;
}
@@ -198,7 +198,7 @@ index 74db66e1e24..acd7a4dedb5 100644
/* checks whether all members of a security descriptor fit inside the size
* of memory specified */
int sd_is_valid( const struct security_descriptor *sd, data_size_t size )
@@ -639,8 +652,36 @@ static struct token *create_token( unsigned primary, const SID *user,
@@ -619,8 +632,36 @@ static struct token *create_token( unsigned primary, const SID *user,
return token;
}
@@ -236,7 +236,7 @@ index 74db66e1e24..acd7a4dedb5 100644
{
const luid_t *modified_id =
primary || (impersonation_level == src_token->impersonation_level) ?
@@ -676,6 +717,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -656,6 +697,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
return NULL;
}
memcpy( newgroup, group, size );
@@ -248,8 +248,8 @@ index 74db66e1e24..acd7a4dedb5 100644
+ }
list_add_tail( &token->groups, &newgroup->entry );
if (src_token->primary_group == &group->sid)
token->primary_group = &newgroup->sid;
@@ -684,11 +731,14 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
{
@@ -667,11 +714,14 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
/* copy privileges */
LIST_FOR_EACH_ENTRY( privilege, &src_token->privileges, struct privilege, entry )
@@ -264,7 +264,7 @@ index 74db66e1e24..acd7a4dedb5 100644
if (sd) default_set_sd( &token->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
@@ -1322,7 +1372,7 @@ DECL_HANDLER(duplicate_token)
@@ -1304,7 +1354,7 @@ DECL_HANDLER(duplicate_token)
TOKEN_DUPLICATE,
&token_ops )))
{
@@ -273,7 +273,7 @@ index 74db66e1e24..acd7a4dedb5 100644
if (token)
{
reply->new_handle = alloc_handle_no_access_check( current->process, token, req->access, objattr->attributes );
@@ -1332,6 +1382,36 @@ DECL_HANDLER(duplicate_token)
@@ -1314,6 +1364,36 @@ DECL_HANDLER(duplicate_token)
}
}
@@ -311,5 +311,5 @@ index 74db66e1e24..acd7a4dedb5 100644
DECL_HANDLER(check_token_privileges)
{
--
2.13.1
2.7.4

View File

@@ -1,4 +1,4 @@
From 77c9e6c6f408a2b59a79f3773a379a43b6994f2c Mon Sep 17 00:00:00 2001
From 48f4c131f9e8ffc091dde12437ad0772ed1c5ca6 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 6 Aug 2017 15:16:33 +0200
Subject: server: Use all group attributes in create_token.
@@ -8,10 +8,10 @@ Subject: server: Use all group attributes in create_token.
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/server/token.c b/server/token.c
index 8d2de6ab58e..e61fe97bfa0 100644
index 0019b3a..2a56664 100644
--- a/server/token.c
+++ b/server/token.c
@@ -613,13 +613,13 @@ static struct token *create_token( unsigned primary, const SID *user,
@@ -592,13 +592,13 @@ static struct token *create_token( unsigned primary, const SID *user,
return NULL;
}
memcpy( &group->sid, groups[i].Sid, security_sid_len( groups[i].Sid ));
@@ -29,9 +29,9 @@ index 8d2de6ab58e..e61fe97bfa0 100644
+ group->logon = (groups[i].Attributes & SE_GROUP_LOGON_ID) != 0;
+ group->resource = (groups[i].Attributes & SE_GROUP_RESOURCE) != 0;
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)
@@ -1628,8 +1628,8 @@ DECL_HANDLER(get_token_groups)
@@ -1603,8 +1603,8 @@ DECL_HANDLER(get_token_groups)
if (group->enabled) *attr_ptr |= SE_GROUP_ENABLED;
if (group->owner) *attr_ptr |= SE_GROUP_OWNER;
if (group->deny_only) *attr_ptr |= SE_GROUP_USE_FOR_DENY_ONLY;
@@ -42,5 +42,5 @@ index 8d2de6ab58e..e61fe97bfa0 100644
memcpy(sid_ptr, &group->sid, security_sid_len( &group->sid ));
--
2.13.1
2.7.4

View File

@@ -1,4 +1,4 @@
From 796879e9a1840f7b893933d37821751cf1d35048 Mon Sep 17 00:00:00 2001
From a7af0ee96959aab299e543e9d6938e2533780c47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 04:02:16 +0200
Subject: [PATCH] kernel32: Implement CreateProcessInternalW.
@@ -11,7 +11,7 @@ Subject: [PATCH] kernel32: Implement CreateProcessInternalW.
4 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 60809f4..59915f9 100644
index e78c1ca..fde5f18 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -315,7 +315,7 @@
@@ -24,10 +24,10 @@ index 60809f4..59915f9 100644
@ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr)
@ stdcall CreateRemoteThread(long ptr long ptr long long ptr)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index e7f9fd9..d37003c 100644
index 2075dfd..f9606be 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -2432,12 +2432,13 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
@@ -2436,12 +2436,13 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
return ret;
}
@@ -47,7 +47,7 @@ index e7f9fd9..d37003c 100644
{
BOOL retv = FALSE;
HANDLE hFile = 0;
@@ -2450,6 +2451,9 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
@@ -2454,6 +2455,9 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
TRACE("app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
@@ -57,7 +57,7 @@ index e7f9fd9..d37003c 100644
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, sizeof(name)/sizeof(WCHAR),
&hFile, &binary_info )))
return FALSE;
@@ -2601,8 +2605,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA( LPCSTR app_name, LPSTR cmd_line, L
@@ -2605,8 +2609,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA( LPCSTR app_name, LPSTR cmd_line, L
FIXME("StartupInfo.lpReserved is used, please report (%s)\n",
debugstr_a(startup_info->lpReserved));
@@ -68,7 +68,7 @@ index e7f9fd9..d37003c 100644
done:
HeapFree( GetProcessHeap(), 0, app_nameW );
HeapFree( GetProcessHeap(), 0, cmd_lineW );
@@ -2621,8 +2625,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW( LPCWSTR app_name, LPWSTR cmd_line,
@@ -2625,8 +2629,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW( LPCWSTR app_name, LPWSTR cmd_line,
LPVOID env, LPCWSTR cur_dir, LPSTARTUPINFOW startup_info,
LPPROCESS_INFORMATION info )
{
@@ -80,7 +80,7 @@ index e7f9fd9..d37003c 100644
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 1a6f1ff..8d2b722 100644
index 8cac67f..e8fd7aa 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -209,7 +209,7 @@
@@ -93,7 +93,7 @@ index 1a6f1ff..8d2b722 100644
@ stdcall CreateRemoteThread(long ptr long ptr long long ptr) kernel32.CreateRemoteThread
@ stdcall CreateRemoteThreadEx(long ptr long ptr ptr long ptr ptr) kernel32.CreateRemoteThreadEx
diff --git a/include/winbase.h b/include/winbase.h
index 8d65d78..35a2213 100644
index 4ddc1d3..e21cf6e 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -1856,6 +1856,7 @@ WINBASEAPI BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTE

View File

@@ -1,7 +1,8 @@
From 2993a76ec1711bb3ea1e889289f8d129f17ae2a3 Mon Sep 17 00:00:00 2001
From 23181e8cbe07ac0fd3b6effd04624122a6b0024f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 6 Aug 2017 02:08:05 +0200
Subject: server: Implement support for creating processes using a token.
Subject: [PATCH] server: Implement support for creating processes using a
token.
---
dlls/kernel32/process.c | 33 ++++++++++++++++++---------------
@@ -14,10 +15,10 @@ Subject: server: Implement support for creating processes using a token.
7 files changed, 59 insertions(+), 21 deletions(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index c3dcd1349b3..69a026d5441 100644
index f9606be..c0b89f9 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -2051,7 +2051,7 @@ static NTSTATUS create_struct_sd(PSECURITY_DESCRIPTOR nt_sd, struct security_des
@@ -2034,7 +2034,7 @@ static NTSTATUS create_struct_sd(PSECURITY_DESCRIPTOR nt_sd, struct security_des
* Create a new process. If hFile is a valid handle we have an exe
* file, otherwise it is a Winelib app.
*/
@@ -26,7 +27,7 @@ index c3dcd1349b3..69a026d5441 100644
LPCWSTR cur_dir, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
LPPROCESS_INFORMATION info, LPCSTR unixdir,
@@ -2197,6 +2197,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
@@ -2180,6 +2180,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
req->info_size = startup_info_size;
req->env_size = (env_end - env) * sizeof(WCHAR);
req->process_sd_size = process_sd_size;
@@ -34,7 +35,7 @@ index c3dcd1349b3..69a026d5441 100644
wine_server_add_data( req, startup_info, startup_info_size );
wine_server_add_data( req, env, (env_end - env) * sizeof(WCHAR) );
@@ -2297,7 +2298,7 @@ error:
@@ -2280,7 +2281,7 @@ error:
*
* Create a new VDM process for a 16-bit or DOS application.
*/
@@ -43,7 +44,7 @@ index c3dcd1349b3..69a026d5441 100644
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
LPPROCESS_INFORMATION info, LPCSTR unixdir,
@@ -2321,7 +2322,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
@@ -2304,7 +2305,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
return FALSE;
}
sprintfW(new_cmd_line, argsW, winevdmW, buffer, cmd_line);
@@ -52,7 +53,7 @@ index c3dcd1349b3..69a026d5441 100644
flags, startup, info, unixdir, binary_info, exec_only );
HeapFree( GetProcessHeap(), 0, new_cmd_line );
return ret;
@@ -2333,7 +2334,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
@@ -2316,7 +2317,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
*
* Create a new cmd shell process for a .BAT file.
*/
@@ -61,10 +62,10 @@ index c3dcd1349b3..69a026d5441 100644
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
LPPROCESS_INFORMATION info )
@@ -2358,8 +2359,8 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L
strcpyW( newcmdline, comspec );
strcatW( newcmdline, slashcW );
@@ -2344,8 +2345,8 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L
strcatW( newcmdline, quotW );
strcatW( newcmdline, cmd_line );
strcatW( newcmdline, quotW );
- ret = CreateProcessW( comspec, newcmdline, psa, tsa, inherit,
- flags, env, cur_dir, startup, info );
+ ret = CreateProcessInternalW( token, comspec, newcmdline, psa, tsa, inherit,
@@ -72,7 +73,7 @@ index c3dcd1349b3..69a026d5441 100644
HeapFree( GetProcessHeap(), 0, newcmdline );
return ret;
}
@@ -2469,7 +2470,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
@@ -2455,7 +2456,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
TRACE("app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
@@ -83,7 +84,7 @@ index c3dcd1349b3..69a026d5441 100644
if (new_token) FIXME("No support for returning created process token\n");
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, sizeof(name)/sizeof(WCHAR),
@@ -2527,20 +2530,20 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
@@ -2513,20 +2516,20 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
debugstr_w(name), (binary_info.flags & BINARY_FLAG_64BIT) ? 64 : 32,
wine_dbgstr_longlong(binary_info.res_start), wine_dbgstr_longlong(binary_info.res_end),
binary_info.arch, (binary_info.flags & BINARY_FLAG_FAKEDLL) ? ", fakedll" : "" );
@@ -107,7 +108,7 @@ index c3dcd1349b3..69a026d5441 100644
inherit, flags, startup_info, info, unixdir, &binary_info, FALSE );
break;
case BINARY_UNKNOWN:
@@ -2552,7 +2555,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
@@ -2538,7 +2541,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
TRACE( "starting %s as DOS binary\n", debugstr_w(name) );
binary_info.type = BINARY_DOS;
binary_info.arch = IMAGE_FILE_MACHINE_I386;
@@ -116,7 +117,7 @@ index c3dcd1349b3..69a026d5441 100644
inherit, flags, startup_info, info, unixdir,
&binary_info, FALSE );
break;
@@ -2560,7 +2563,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
@@ -2546,7 +2549,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
if (!strcmpiW( p, batW ) || !strcmpiW( p, cmdW ) )
{
TRACE( "starting %s as batch binary\n", debugstr_w(name) );
@@ -125,7 +126,7 @@ index c3dcd1349b3..69a026d5441 100644
inherit, flags, startup_info, info );
break;
}
@@ -2680,12 +2683,12 @@ static void exec_process( LPCWSTR name )
@@ -2666,12 +2669,12 @@ static void exec_process( LPCWSTR name )
debugstr_w(name), (binary_info.flags & BINARY_FLAG_64BIT) ? 64 : 32,
wine_dbgstr_longlong(binary_info.res_start), wine_dbgstr_longlong(binary_info.res_end),
binary_info.arch );
@@ -140,7 +141,7 @@ index c3dcd1349b3..69a026d5441 100644
FALSE, 0, &startup_info, &info, NULL, &binary_info, TRUE );
break;
case BINARY_UNKNOWN:
@@ -2699,7 +2702,7 @@ static void exec_process( LPCWSTR name )
@@ -2685,7 +2688,7 @@ static void exec_process( LPCWSTR name )
case BINARY_WIN16:
case BINARY_DOS:
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(name) );
@@ -150,7 +151,7 @@ index c3dcd1349b3..69a026d5441 100644
break;
default:
diff --git a/server/process.c b/server/process.c
index 81cea2f1baa..7d2206f2744 100644
index 81cea2f..7d2206f 100644
--- a/server/process.c
+++ b/server/process.c
@@ -496,7 +496,7 @@ static void start_sigkill_timer( struct process *process )
@@ -234,7 +235,7 @@ index 81cea2f1baa..7d2206f2744 100644
}
diff --git a/server/process.h b/server/process.h
index 78e88ec350a..313c36ab241 100644
index 78e88ec..313c36a 100644
--- a/server/process.h
+++ b/server/process.h
@@ -114,7 +114,7 @@ struct process_snapshot
@@ -247,10 +248,10 @@ index 78e88ec350a..313c36ab241 100644
extern struct thread *get_process_first_thread( struct process *process );
extern struct process *get_process_from_id( process_id_t id );
diff --git a/server/protocol.def b/server/protocol.def
index 1ea129fec08..95513fef6c3 100644
index 5fb6e38..f0bc83b 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -739,6 +739,7 @@ struct rawinput_device
@@ -748,6 +748,7 @@ struct rawinput_device
data_size_t info_size; /* size of startup info */
data_size_t env_size; /* size of the environment */
data_size_t process_sd_size;/* size of the process security descriptor */
@@ -259,7 +260,7 @@ index 1ea129fec08..95513fef6c3 100644
VARARG(env,unicode_str,env_size); /* environment for new process */
VARARG(process_sd,security_descriptor,process_sd_size); /* security descriptor to set on the process */
diff --git a/server/request.c b/server/request.c
index 6120bc550ff..a648c306496 100644
index 6120bc5..a648c30 100644
--- a/server/request.c
+++ b/server/request.c
@@ -570,7 +570,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
@@ -272,7 +273,7 @@ index 6120bc550ff..a648c306496 100644
}
diff --git a/server/security.h b/server/security.h
index 21e90ccf23f..32dfe5f8db9 100644
index 21e90cc..32dfe5f 100644
--- a/server/security.h
+++ b/server/security.h
@@ -67,6 +67,8 @@ extern const ACL *token_get_default_dacl( struct token *token );
@@ -285,10 +286,10 @@ index 21e90ccf23f..32dfe5f8db9 100644
static inline const ACE_HEADER *ace_next( const ACE_HEADER *ace )
{
diff --git a/server/token.c b/server/token.c
index 49e84362a83..f6b6165d7a9 100644
index de1d624..2804247 100644
--- a/server/token.c
+++ b/server/token.c
@@ -843,6 +843,12 @@ int token_assign_label( struct token *token, PSID label )
@@ -836,6 +836,12 @@ int token_assign_label( struct token *token, PSID label )
return ret;
}
@@ -301,7 +302,7 @@ index 49e84362a83..f6b6165d7a9 100644
struct token *token_create_admin( void )
{
struct token *token = NULL;
@@ -1269,6 +1275,11 @@ const SID *token_get_primary_group( struct token *token )
@@ -1263,6 +1269,11 @@ const SID *token_get_primary_group( struct token *token )
return token->primary_group;
}
@@ -314,5 +315,5 @@ index 49e84362a83..f6b6165d7a9 100644
{
GENERIC_MAPPING mapping;
--
2.14.2
1.9.1

View File

@@ -1,34 +1,34 @@
From 78679414663a0d7d5e90227ab58bc6b9f4db9634 Mon Sep 17 00:00:00 2001
From 7f05362e86a285551a5694e98fa9abecb99018a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 17:07:35 +0100
Subject: [PATCH] ext-ms-win-xaml-pal-l1-1-0: Add dll and add stub for
XamlBehaviorEnabled.
---
configure.ac | 1 +
dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in | 4 +++
.../ext-ms-win-xaml-pal-l1-1-0.spec | 6 ++++
dlls/ext-ms-win-xaml-pal-l1-1-0/main.c | 35 ++++++++++++++++++++++
configure.ac | 1 +
dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in | 4 +++
.../ext-ms-win-xaml-pal-l1-1-0.spec | 6 ++++
dlls/ext-ms-win-xaml-pal-l1-1-0/main.c | 35 +++++++++++++++++++
4 files changed, 46 insertions(+)
create mode 100644 dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in
create mode 100644 dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec
create mode 100644 dlls/ext-ms-win-xaml-pal-l1-1-0/main.c
diff --git a/configure.ac b/configure.ac
index 7215237..4d7111a 100644
index 420f6311db3..30718491bb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3252,6 +3252,7 @@ WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-rtcore-ntuser-dpi-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-rtcore-ntuser-sysparams-l1-1-0)
@@ -3289,6 +3289,7 @@ WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-rtcore-ntuser-sysparams-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-security-credui-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-security-cryptui-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-uxtheme-themes-l1-1-0)
+WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-xaml-pal-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/faultrep)
WINE_CONFIG_MAKEFILE(dlls/faultrep/tests)
WINE_CONFIG_MAKEFILE(dlls/fltlib)
WINE_CONFIG_MAKEFILE(dlls/feclient)
diff --git a/dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in b/dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in
new file mode 100644
index 0000000..6382d85
index 00000000000..6382d85272b
--- /dev/null
+++ b/dlls/ext-ms-win-xaml-pal-l1-1-0/Makefile.in
@@ -0,0 +1,4 @@
@@ -38,7 +38,7 @@ index 0000000..6382d85
+ main.c
diff --git a/dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec b/dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec
new file mode 100644
index 0000000..c167f5e
index 00000000000..c167f5e753e
--- /dev/null
+++ b/dlls/ext-ms-win-xaml-pal-l1-1-0/ext-ms-win-xaml-pal-l1-1-0.spec
@@ -0,0 +1,6 @@
@@ -50,7 +50,7 @@ index 0000000..c167f5e
+@ stub XamlPalUninitialize
diff --git a/dlls/ext-ms-win-xaml-pal-l1-1-0/main.c b/dlls/ext-ms-win-xaml-pal-l1-1-0/main.c
new file mode 100644
index 0000000..3e28275
index 00000000000..3e282758f41
--- /dev/null
+++ b/dlls/ext-ms-win-xaml-pal-l1-1-0/main.c
@@ -0,0 +1,35 @@
@@ -90,5 +90,5 @@ index 0000000..3e28275
+ return TRUE;
+}
--
1.9.1
2.17.0

View File

@@ -1,81 +0,0 @@
From 3ac2d7e513ec9872239ff0113a047f9b0dae5b79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 23 Jan 2016 21:02:52 +0100
Subject: [PATCH] ext-ms-win-uxtheme-themes-l1-1-0: Add dll.
---
configure.ac | 1 +
dlls/ext-ms-win-uxtheme-themes-l1-1-0/Makefile.in | 1 +
.../ext-ms-win-uxtheme-themes-l1-1-0.spec | 24 ++++++++++++++++++++++
tools/make_specfiles | 4 ++++
4 files changed, 30 insertions(+)
create mode 100644 dlls/ext-ms-win-uxtheme-themes-l1-1-0/Makefile.in
create mode 100644 dlls/ext-ms-win-uxtheme-themes-l1-1-0/ext-ms-win-uxtheme-themes-l1-1-0.spec
diff --git a/configure.ac b/configure.ac
index 17b6070..10a1804 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3256,6 +3256,7 @@ WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-rtcore-ntuser-dpi-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-rtcore-ntuser-sysparams-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-security-credui-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-security-cryptui-l1-1-0)
+WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-uxtheme-themes-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-xaml-pal-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/faultrep)
WINE_CONFIG_MAKEFILE(dlls/faultrep/tests)
diff --git a/dlls/ext-ms-win-uxtheme-themes-l1-1-0/Makefile.in b/dlls/ext-ms-win-uxtheme-themes-l1-1-0/Makefile.in
new file mode 100644
index 0000000..576b6f6
--- /dev/null
+++ b/dlls/ext-ms-win-uxtheme-themes-l1-1-0/Makefile.in
@@ -0,0 +1 @@
+MODULE = ext-ms-win-uxtheme-themes-l1-1-0.dll
diff --git a/dlls/ext-ms-win-uxtheme-themes-l1-1-0/ext-ms-win-uxtheme-themes-l1-1-0.spec b/dlls/ext-ms-win-uxtheme-themes-l1-1-0/ext-ms-win-uxtheme-themes-l1-1-0.spec
new file mode 100644
index 0000000..0a96983
--- /dev/null
+++ b/dlls/ext-ms-win-uxtheme-themes-l1-1-0/ext-ms-win-uxtheme-themes-l1-1-0.spec
@@ -0,0 +1,24 @@
+@ stdcall CloseThemeData(ptr) uxtheme.CloseThemeData
+@ stdcall DrawThemeBackground(ptr ptr long long ptr ptr) uxtheme.DrawThemeBackground
+@ stub GetColorFromPreference
+@ stub GetImmersiveColorFromColorSetEx
+@ stub GetImmersiveUserColorSetPreference
+@ stub GetThemeAnimationProperty
+@ stub GetThemeAnimationTransform
+@ stdcall GetThemeBackgroundExtent(ptr ptr long long ptr ptr) uxtheme.GetThemeBackgroundExtent
+@ stub GetThemeBitmap
+@ stdcall GetThemeColor(ptr long long long ptr) uxtheme.GetThemeColor
+@ stdcall GetThemeEnumValue(ptr long long long ptr) uxtheme.GetThemeEnumValue
+@ stdcall GetThemeFont(ptr ptr long long long ptr) uxtheme.GetThemeFont
+@ stdcall GetThemeInt(ptr long long long ptr) uxtheme.GetThemeInt
+@ stdcall GetThemeMargins(ptr ptr long long long ptr ptr) uxtheme.GetThemeMargins
+@ stdcall GetThemePartSize(ptr ptr long long ptr long ptr) uxtheme.GetThemePartSize
+@ stdcall GetThemePosition(ptr long long long ptr) uxtheme.GetThemePosition
+@ stub GetThemeTimingFunction
+@ stub GetUserColorPreference
+@ stdcall IsAppThemed() uxtheme.IsAppThemed
+@ stdcall IsThemeActive() uxtheme.IsThemeActive
+@ stdcall IsThemePartDefined(ptr long long) uxtheme.IsThemePartDefined
+@ stdcall OpenThemeData(ptr wstr) uxtheme.OpenThemeData
+@ stdcall OpenThemeDataEx(ptr wstr long) uxtheme.OpenThemeDataEx
+@ stdcall SetWindowTheme(ptr wstr wstr) uxtheme.SetWindowTheme
diff --git a/tools/make_specfiles b/tools/make_specfiles
index 680ade4..2e092f2 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -408,6 +408,10 @@ my @dll_groups =
"api-ms-win-core-winrt-string-l1-1-0",
],
[
+ "uxtheme",
+ "ext-ms-win-uxtheme-themes-l1-1-0",
+ ],
+ [
"bthprops.cpl",
"irprops.cpl",
],
--
1.9.1

View File

@@ -1,133 +0,0 @@
From b03da4a4b66c303a58037d6a241c8326bb6057e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 12 Apr 2016 01:00:02 +0200
Subject: [PATCH] feclient: Add stub dll.
---
configure.ac | 1 +
dlls/feclient/Makefile.in | 4 ++++
dlls/feclient/feclient.spec | 36 ++++++++++++++++++++++++++++++++++++
dlls/feclient/main.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 86 insertions(+)
create mode 100644 dlls/feclient/Makefile.in
create mode 100644 dlls/feclient/feclient.spec
create mode 100644 dlls/feclient/main.c
diff --git a/configure.ac b/configure.ac
index 18fc8a8..fa783a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3263,6 +3263,7 @@ WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-uxtheme-themes-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/ext-ms-win-xaml-pal-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/faultrep)
WINE_CONFIG_MAKEFILE(dlls/faultrep/tests)
+WINE_CONFIG_MAKEFILE(dlls/feclient)
WINE_CONFIG_MAKEFILE(dlls/fltlib)
WINE_CONFIG_MAKEFILE(dlls/fltmgr.sys)
WINE_CONFIG_MAKEFILE(dlls/fntcache)
diff --git a/dlls/feclient/Makefile.in b/dlls/feclient/Makefile.in
new file mode 100644
index 0000000..d3eeefb
--- /dev/null
+++ b/dlls/feclient/Makefile.in
@@ -0,0 +1,4 @@
+MODULE = feclient.dll
+
+C_SRCS = \
+ main.c
diff --git a/dlls/feclient/feclient.spec b/dlls/feclient/feclient.spec
new file mode 100644
index 0000000..3620b85
--- /dev/null
+++ b/dlls/feclient/feclient.spec
@@ -0,0 +1,36 @@
+@ stub EdpContainerizeFile
+@ stub EdpCredentialCreate
+@ stub EdpCredentialDelete
+@ stub EdpCredentialExists
+@ stub EdpCredentialQuery
+@ stub EdpDecontainerizeFile
+@ stub EdpDplPolicyEnabledForUser
+@ stub EdpDplUpgradePinInfo
+@ stub EdpDplUpgradeVerifyUser
+@ stub EdpDplUserCredentialsSet
+@ stub EdpDplUserUnlockComplete
+@ stub EdpDplUserUnlockStart
+@ stub EdpFree
+@ stub EdpGetContainerIdentity
+@ stub EdpGetCredServiceState
+@ stub EdpQueryCredServiceInfo
+@ stub EdpQueryDplEnforcedPolicyOwnerIds
+@ stub EdpQueryRevokedPolicyOwnerIds
+@ stub EdpRmsClearKeys
+@ stub EdpSetCredServiceInfo
+@ stub EfsClientCloseFileRaw
+@ stub EfsClientDecryptFile
+@ stub EfsClientDuplicateEncryptionInfo
+@ stub EfsClientEncryptFileEx
+@ stub EfsClientFileEncryptionStatus
+@ stub EfsClientFreeProtectorList
+@ stub EfsClientGetEncryptedFileVersion
+@ stub EfsClientOpenFileRaw
+@ stub EfsClientQueryProtectors
+@ stub EfsClientReadFileRaw
+@ stub EfsClientWriteFileRaw
+@ stub EfsClientWriteFileWithHeaderRaw
+@ stub EfsUtilGetCurrentKey
+@ stub FeClientInitialize
+@ stub GetLockSessionUnwrappedKey
+@ stub GetLockSessionWrappedKey
diff --git a/dlls/feclient/main.c b/dlls/feclient/main.c
new file mode 100644
index 0000000..91aed70
--- /dev/null
+++ b/dlls/feclient/main.c
@@ -0,0 +1,45 @@
+/*
+ * feclient API
+ *
+ * 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
+ * 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
+ */
+
+#include "config.h"
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(feclient);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
--
1.9.1

View File

@@ -19,4 +19,3 @@ Fixes: Add ext-ms-win-kernel32-package-current-l1-1-0 dll
Fixes: Add iertutil dll
Fixes: Add shcore dll
Fixes: [40451] Add feclient dll
Depends: combase-RoApi

View File

@@ -1,196 +0,0 @@
From 45b77996f35a193f0586110cd03377e8a04bda20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 01:42:05 +0100
Subject: [PATCH] combase: Implement RoGetActivationFactory.
---
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 b1d759e49a8..df051ad2934 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 a2d625202d9..f7862fb774a 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;
}
/***********************************************************************
--
2.16.3

View File

@@ -1,65 +0,0 @@
From 4707618a4e4d1ecb55362e95052465266055eada Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 01:45:30 +0100
Subject: [PATCH] combase: Implement RoActivateInstance.
---
.../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 74c9d27aae3..978c3dc6d07 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 c238eb82db7..f42bdae605b 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 f7862fb774a..bfd07fb3f4e 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;
+}
--
2.16.3

View File

@@ -1,61 +0,0 @@
From 15be870f14039bb8c2d276640b4b40c558ddcc32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 01:47:08 +0100
Subject: [PATCH 3/7] combase: Add stub for RoGetApartmentIdentifier.
---
.../api-ms-win-core-winrt-l1-1-0.spec | 2 +-
dlls/combase/combase.spec | 2 +-
dlls/combase/roapi.c | 14 ++++++++++++++
3 files changed, 16 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 978c3dc..88139fb 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,6 +1,6 @@
@ stdcall RoActivateInstance(ptr ptr) combase.RoActivateInstance
@ stdcall RoGetActivationFactory(ptr ptr ptr) combase.RoGetActivationFactory
-@ stub RoGetApartmentIdentifier
+@ stdcall RoGetApartmentIdentifier(ptr) combase.RoGetApartmentIdentifier
@ stdcall RoInitialize(long) combase.RoInitialize
@ stub RoRegisterActivationFactories
@ stub RoRegisterForApartmentShutdown
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
index f42bdae..ff89232 100644
--- a/dlls/combase/combase.spec
+++ b/dlls/combase/combase.spec
@@ -250,7 +250,7 @@
@ stub RoGetActivatableClassRegistration
@ stdcall RoGetActivationFactory(ptr ptr ptr)
@ stub RoGetAgileReference
-@ stub RoGetApartmentIdentifier
+@ stdcall RoGetApartmentIdentifier(ptr)
@ stub RoGetErrorReportingFlags
@ stub RoGetMatchingRestrictedErrorInfo
@ stdcall RoGetParameterizedTypeInstanceIID(long ptr ptr ptr ptr)
diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c
index a272d2c..1c0b373 100644
--- a/dlls/combase/roapi.c
+++ b/dlls/combase/roapi.c
@@ -91,3 +91,17 @@ HRESULT WINAPI RoActivateInstance(HSTRING classid, IInspectable **instance)
return hr;
}
+
+/***********************************************************************
+ * RoGetApartmentIdentifier (combase.@)
+ */
+HRESULT WINAPI RoGetApartmentIdentifier(UINT64 *identifier)
+{
+ FIXME("(%p): stub\n", identifier);
+
+ if (!identifier)
+ return E_INVALIDARG;
+
+ *identifier = 0xdeadbeef;
+ return S_OK;
+}
--
1.9.1

View File

@@ -1,66 +0,0 @@
From fe7c55c675e474efd68fcf04ce18ae4c5891d38c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 02:01:59 +0100
Subject: [PATCH 4/7] combase: Add stub for RoRegisterForApartmentShutdown.
---
.../api-ms-win-core-winrt-l1-1-0.spec | 2 +-
dlls/combase/combase.spec | 2 +-
dlls/combase/roapi.c | 18 ++++++++++++++++++
3 files changed, 20 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 88139fb..d27130c 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
@@ -3,7 +3,7 @@
@ stdcall RoGetApartmentIdentifier(ptr) combase.RoGetApartmentIdentifier
@ stdcall RoInitialize(long) combase.RoInitialize
@ stub RoRegisterActivationFactories
-@ stub RoRegisterForApartmentShutdown
+@ stdcall RoRegisterForApartmentShutdown(ptr ptr ptr) combase.RoRegisterForApartmentShutdown
@ stub RoRevokeActivationFactories
@ stdcall RoUninitialize() combase.RoUninitialize
@ stub RoUnregisterForApartmentShutdown
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
index ff89232..ec4a6cd 100644
--- a/dlls/combase/combase.spec
+++ b/dlls/combase/combase.spec
@@ -263,7 +263,7 @@
@ stub RoOriginateLanguageException
@ stub RoParameterizedTypeExtraGetTypeSignature
@ stub RoRegisterActivationFactories
-@ stub RoRegisterForApartmentShutdown
+@ stdcall RoRegisterForApartmentShutdown(ptr ptr ptr)
@ stub RoReportCapabilityCheckFailure
@ stub RoReportFailedDelegate
@ stub RoReportUnhandledError
diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c
index 1c0b373..d56ceb1 100644
--- a/dlls/combase/roapi.c
+++ b/dlls/combase/roapi.c
@@ -105,3 +105,21 @@ HRESULT WINAPI RoGetApartmentIdentifier(UINT64 *identifier)
*identifier = 0xdeadbeef;
return S_OK;
}
+
+/***********************************************************************
+ * RoRegisterForApartmentShutdown (combase.@)
+ */
+HRESULT WINAPI RoRegisterForApartmentShutdown(IApartmentShutdown *callback,
+ UINT64 *identifier, APARTMENT_SHUTDOWN_REGISTRATION_COOKIE *cookie)
+{
+ HRESULT hr;
+
+ FIXME("(%p, %p, %p): stub\n", callback, identifier, cookie);
+
+ hr = RoGetApartmentIdentifier(identifier);
+ if (FAILED(hr))
+ return hr;
+
+ *cookie = (void *)0xcafecafe;
+ return S_OK;
+}
--
1.9.1

View File

@@ -1,54 +0,0 @@
From e3c49d6a259d63f43103174d78e1f90316fa27a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 02:03:47 +0100
Subject: [PATCH 5/7] combase: Add stub for RoGetServerActivatableClasses.
---
.../api-ms-win-core-winrt-registration-l1-1-0.spec | 2 +-
dlls/combase/combase.spec | 2 +-
dlls/combase/roapi.c | 11 +++++++++++
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-core-winrt-registration-l1-1-0/api-ms-win-core-winrt-registration-l1-1-0.spec b/dlls/api-ms-win-core-winrt-registration-l1-1-0/api-ms-win-core-winrt-registration-l1-1-0.spec
index 350ac04..20c8d9c 100644
--- a/dlls/api-ms-win-core-winrt-registration-l1-1-0/api-ms-win-core-winrt-registration-l1-1-0.spec
+++ b/dlls/api-ms-win-core-winrt-registration-l1-1-0/api-ms-win-core-winrt-registration-l1-1-0.spec
@@ -1,2 +1,2 @@
@ stub RoGetActivatableClassRegistration
-@ stub RoGetServerActivatableClasses
+@ stdcall RoGetServerActivatableClasses(ptr ptr ptr) combase.RoGetServerActivatableClasses
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
index ec4a6cd..c721f43 100644
--- a/dlls/combase/combase.spec
+++ b/dlls/combase/combase.spec
@@ -254,7 +254,7 @@
@ stub RoGetErrorReportingFlags
@ stub RoGetMatchingRestrictedErrorInfo
@ stdcall RoGetParameterizedTypeInstanceIID(long ptr ptr ptr ptr)
-@ stub RoGetServerActivatableClasses
+@ stdcall RoGetServerActivatableClasses(ptr ptr ptr)
@ stdcall RoInitialize(long)
@ stub RoInspectCapturedStackBackTrace
@ stub RoInspectThreadErrorInfo
diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c
index d56ceb1..2a228ce 100644
--- a/dlls/combase/roapi.c
+++ b/dlls/combase/roapi.c
@@ -123,3 +123,14 @@ HRESULT WINAPI RoRegisterForApartmentShutdown(IApartmentShutdown *callback,
*cookie = (void *)0xcafecafe;
return S_OK;
}
+
+/***********************************************************************
+ * RoGetServerActivatableClasses (combase.@)
+ */
+HRESULT WINAPI RoGetServerActivatableClasses(HSTRING name, HSTRING **classes, DWORD *count)
+{
+ FIXME("(%p, %p, %p): stub\n", name, classes, count);
+
+ *count = 0;
+ return S_OK;
+}
--
1.9.1

View File

@@ -1,59 +0,0 @@
From 30ad6da4756f20339d4f52b959a128fb231dbf14 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 02:20:39 +0100
Subject: [PATCH 6/7] combase: Add stub for RoRegisterActivationFactories.
---
.../api-ms-win-core-winrt-l1-1-0.spec | 2 +-
dlls/combase/combase.spec | 2 +-
dlls/combase/roapi.c | 11 +++++++++++
3 files changed, 13 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 d27130c..32b9474 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
@@ -2,7 +2,7 @@
@ stdcall RoGetActivationFactory(ptr ptr ptr) combase.RoGetActivationFactory
@ stdcall RoGetApartmentIdentifier(ptr) combase.RoGetApartmentIdentifier
@ stdcall RoInitialize(long) combase.RoInitialize
-@ stub RoRegisterActivationFactories
+@ stdcall RoRegisterActivationFactories(ptr ptr long ptr) combase.RoRegisterActivationFactories
@ stdcall RoRegisterForApartmentShutdown(ptr ptr ptr) combase.RoRegisterForApartmentShutdown
@ stub RoRevokeActivationFactories
@ stdcall RoUninitialize() combase.RoUninitialize
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
index c721f43..72a7eb5 100644
--- a/dlls/combase/combase.spec
+++ b/dlls/combase/combase.spec
@@ -262,7 +262,7 @@
@ stub RoOriginateErrorW
@ stub RoOriginateLanguageException
@ stub RoParameterizedTypeExtraGetTypeSignature
-@ stub RoRegisterActivationFactories
+@ stdcall RoRegisterActivationFactories(ptr ptr long ptr)
@ stdcall RoRegisterForApartmentShutdown(ptr ptr ptr)
@ stub RoReportCapabilityCheckFailure
@ stub RoReportFailedDelegate
diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c
index 2a228ce..ae063a2 100644
--- a/dlls/combase/roapi.c
+++ b/dlls/combase/roapi.c
@@ -134,3 +134,14 @@ HRESULT WINAPI RoGetServerActivatableClasses(HSTRING name, HSTRING **classes, DW
*count = 0;
return S_OK;
}
+
+/***********************************************************************
+ * RoRegisterActivationFactories (combase.@)
+ */
+HRESULT WINAPI RoRegisterActivationFactories(HSTRING *classes, PFNGETACTIVATIONFACTORY *callbacks,
+ UINT32 count, RO_REGISTRATION_COOKIE *cookie)
+{
+ FIXME("(%p, %p, %d, %p): stub\n", classes, callbacks, count, cookie);
+
+ return S_OK;
+}
--
1.9.1

View File

@@ -1,42 +0,0 @@
From a336f80cc6d83ae000d676ce641d1f3844229db1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 02:21:48 +0100
Subject: [PATCH 7/7] combase: Add stub for CleanupTlsOleState.
---
dlls/combase/combase.spec | 2 +-
dlls/combase/roapi.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
index 72a7eb5..c8a8dee 100644
--- a/dlls/combase/combase.spec
+++ b/dlls/combase/combase.spec
@@ -66,7 +66,7 @@
@ stdcall CLSIDFromProgID(wstr ptr) ole32.CLSIDFromProgID
@ stdcall CLSIDFromString(wstr ptr) ole32.CLSIDFromString
@ stub CleanupOleStateInAllTls
-@ stub CleanupTlsOleState
+@ stdcall CleanupTlsOleState(ptr)
@ stub ClearCleanupFlag
@ stdcall CoAddRefServerProcess() ole32.CoAddRefServerProcess
@ stub CoAllowUnmarshalerCLSID
diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c
index ae063a2..3a81fb4 100644
--- a/dlls/combase/roapi.c
+++ b/dlls/combase/roapi.c
@@ -145,3 +145,11 @@ HRESULT WINAPI RoRegisterActivationFactories(HSTRING *classes, PFNGETACTIVATIONF
return S_OK;
}
+
+/***********************************************************************
+ * CleanupTlsOleState (combase.@)
+ */
+void WINAPI CleanupTlsOleState(void *unknown)
+{
+ FIXME("(%p): stub\n", unknown);
+}
--
1.9.1

View File

@@ -1,3 +0,0 @@
Fixes: [44399] Implement semi-stub for RoGetActivationFactory
Fixes: Implement semi-stub for RoActivateInstance
Fixes: Implement stubs for further combase Ro* functions

View File

@@ -0,0 +1,152 @@
From 041f7ef0b4e4d0ca72470032b2ce7eac9b3a118b Mon Sep 17 00:00:00 2001
From: Lucian Poston <lucian.poston@gmail.com>
Date: Wed, 2 May 2018 23:38:21 -0700
Subject: [PATCH 2/7] d2d1: Test ID2D1DeviceContext drawing ID2D1Bitmap1
This test is based on the d2d usage in the Temple+ app referred to in
the winehq bug at https://bugs.winehq.org/show_bug.cgi?id=44052
Essentially, this test draws a rectangle using a d2d device context,
similar to the basic how-to in the link below.
https://msdn.microsoft.com/en-us/library/windows/desktop/hh780339(v=vs.85).aspx
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
---
dlls/d2d1/tests/d2d1.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 107 insertions(+)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 9bd9e2b..21b4e53 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -20,6 +20,7 @@
#include <limits.h>
#include <math.h>
#include "d2d1.h"
+#include "d2d1_1.h"
#include "wincrypt.h"
#include "wine/test.h"
#include "initguid.h"
@@ -4635,6 +4636,111 @@ todo_wine
DestroyWindow(window);
}
+static void test_draw_via_ID2D1DeviceContext(void)
+{
+ HRESULT hr;
+ ID2D1Factory1 *factory;
+ ID2D1Device *device;
+ ID3D10Device1 *d3d10_device;
+ IDXGIDevice *dxgi_device;
+ ID2D1DeviceContext *context;
+ IDXGISurface *dxgi_surface;
+ ID2D1Bitmap1 *bitmap;
+ D2D1_BITMAP_PROPERTIES1 bitmap_properties;
+ IDXGISwapChain *swapchain;
+ HWND window;
+ ID2D1SolidColorBrush *brush;
+ D2D1_COLOR_F c;
+ D2D1_RECT_F r;
+ set_color(&c, 0.5f, 0.5f, 0.5f, 0.5f);
+ set_rect(&r, 10.0f, 480.0f, 10.0f, 480.0f);
+
+ if (!(d3d10_device = create_device()))
+ {
+ skip("Failed to create device, skipping test.\n");
+ return;
+ }
+
+ window = create_window();
+ swapchain = create_swapchain(d3d10_device, window, TRUE);
+ hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGISurface, (void **)&dxgi_surface);
+ ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+
+ hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED,
+ &IID_ID2D1Factory1, NULL, (void**)&factory);
+ if (FAILED(hr))
+ {
+ skip("ID2D1Factory1 unavailable, skipping test.\n");
+ return;
+ }
+
+ hr = ID3D10Device1_QueryInterface(d3d10_device, &IID_IDXGIDevice,
+ (void**)&dxgi_device);
+ ok(SUCCEEDED(hr), "Failed to create dxgi_device, hr %#x.\n", hr);
+ if (FAILED(hr))
+ {
+ skip("dxgi_device unavailable, skipping test.\n");
+ return;
+ }
+
+ hr = ID2D1Factory1_CreateDevice(factory, dxgi_device, &device);
+ todo_wine
+ ok(SUCCEEDED(hr), "Failed to create device, hr %#x.\n", hr);
+ if (FAILED(hr))
+ {
+ skip("device unavailable, skipping test.\n");
+ return;
+ }
+
+ hr = ID2D1Device_CreateDeviceContext(device,
+ D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &context);
+ todo_wine
+ ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
+ if (FAILED(hr))
+ {
+ skip("device context unavailable, skipping test.\n");
+ return;
+ }
+
+ bitmap_properties.pixelFormat.format = DXGI_FORMAT_UNKNOWN;
+ bitmap_properties.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
+ bitmap_properties.dpiX = 96.0;
+ bitmap_properties.dpiY = 96.0;
+ bitmap_properties.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
+ hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(context, dxgi_surface,
+ &bitmap_properties, &bitmap);
+ todo_wine
+ ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ if (FAILED(hr))
+ {
+ skip("bitmap unavailable for use as device context target, skipping test.\n");
+ return;
+ }
+
+ ID2D1DeviceContext_SetTarget(context, (ID2D1Image *)bitmap);
+ ID2D1DeviceContext_CreateSolidColorBrush(context, &c, NULL, &brush);
+
+ ID2D1DeviceContext_BeginDraw(context);
+ ID2D1DeviceContext_DrawRectangle(context, &r, (ID2D1Brush *)brush, 1.0f, NULL);
+ hr = ID2D1DeviceContext_EndDraw(context, NULL, NULL);
+ todo_wine
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
+ hr = IDXGISwapChain_Present(swapchain, 0, 0);
+ todo_wine
+ ok(SUCCEEDED(hr), "Failed to present image, hr %#x.\n", hr);
+
+ ID2D1SolidColorBrush_Release(brush);
+ DestroyWindow(window);
+ IDXGISwapChain_Release(swapchain);
+ ID2D1Bitmap1_Release(bitmap);
+ IDXGISurface_Release(dxgi_surface);
+ ID2D1DeviceContext_Release(context);
+ IDXGIDevice_Release(dxgi_device);
+ ID3D10Device1_Release(d3d10_device);
+ ID2D1Device_Release(device);
+ ID2D1Factory1_Release(factory);
+}
+
static void create_target_dibsection(HDC hdc, UINT32 width, UINT32 height)
{
char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
@@ -6444,6 +6550,7 @@ START_TEST(d2d1)
test_opacity_brush();
test_create_target();
test_draw_text_layout();
+ test_draw_via_ID2D1DeviceContext();
test_dc_target();
test_hwnd_target();
test_bitmap_target();
--
1.9.1

View File

@@ -0,0 +1,141 @@
From f2291f6639479555979f1f403518f86a1ef31640 Mon Sep 17 00:00:00 2001
From: Lucian Poston <lucian.poston@gmail.com>
Date: Thu, 3 May 2018 00:38:06 -0700
Subject: [PATCH 3/7] d2d1: Use ID2D1Factory1 in d2d_geometry
https://bugs.winehq.org/show_bug.cgi?id=44052
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
---
dlls/d2d1/d2d1_private.h | 8 ++++----
dlls/d2d1/geometry.c | 30 +++++++++++++++++++++---------
2 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
index dbfb83c..ed29c4c 100644
--- a/dlls/d2d1/d2d1_private.h
+++ b/dlls/d2d1/d2d1_private.h
@@ -406,7 +406,7 @@ struct d2d_geometry
ID2D1Geometry ID2D1Geometry_iface;
LONG refcount;
- ID2D1Factory *factory;
+ ID2D1Factory1 *factory;
D2D_MATRIX_3X2_F transform;
@@ -470,10 +470,10 @@ struct d2d_geometry
} u;
};
-void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory) DECLSPEC_HIDDEN;
+void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory) DECLSPEC_HIDDEN;
HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry,
- ID2D1Factory *factory, const D2D1_RECT_F *rect) DECLSPEC_HIDDEN;
-void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
+ ID2D1Factory1 *factory, const D2D1_RECT_F *rect) DECLSPEC_HIDDEN;
+void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory,
ID2D1Geometry *src_geometry, const D2D_MATRIX_3X2_F *transform) DECLSPEC_HIDDEN;
struct d2d_geometry *unsafe_impl_from_ID2D1Geometry(ID2D1Geometry *iface) DECLSPEC_HIDDEN;
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
index d716fb1..5bf63f6 100644
--- a/dlls/d2d1/geometry.c
+++ b/dlls/d2d1/geometry.c
@@ -2343,15 +2343,15 @@ static void d2d_geometry_cleanup(struct d2d_geometry *geometry)
heap_free(geometry->fill.bezier_vertices);
heap_free(geometry->fill.faces);
heap_free(geometry->fill.vertices);
- ID2D1Factory_Release(geometry->factory);
+ ID2D1Factory1_Release(geometry->factory);
}
-static void d2d_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
+static void d2d_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory,
const D2D1_MATRIX_3X2_F *transform, const struct ID2D1GeometryVtbl *vtbl)
{
geometry->ID2D1Geometry_iface.lpVtbl = vtbl;
geometry->refcount = 1;
- ID2D1Factory_AddRef(geometry->factory = factory);
+ ID2D1Factory1_AddRef(geometry->factory = factory);
geometry->transform = *transform;
}
@@ -3040,10 +3040,14 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_Release(ID2D1PathGeometry *ifac
static void STDMETHODCALLTYPE d2d_path_geometry_GetFactory(ID2D1PathGeometry *iface, ID2D1Factory **factory)
{
struct d2d_geometry *geometry = impl_from_ID2D1PathGeometry(iface);
+ HRESULT hr;
TRACE("iface %p, factory %p.\n", iface, factory);
- ID2D1Factory_AddRef(*factory = geometry->factory);
+ if (FAILED(hr = ID2D1Factory1_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
+ {
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
+ }
}
static HRESULT STDMETHODCALLTYPE d2d_path_geometry_GetBounds(ID2D1PathGeometry *iface,
@@ -3491,7 +3495,7 @@ static const struct ID2D1PathGeometryVtbl d2d_path_geometry_vtbl =
d2d_path_geometry_GetFigureCount,
};
-void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory)
+void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory)
{
d2d_geometry_init(geometry, factory, &identity, (ID2D1GeometryVtbl *)&d2d_path_geometry_vtbl);
geometry->u.path.ID2D1GeometrySink_iface.lpVtbl = &d2d_geometry_sink_vtbl;
@@ -3556,10 +3560,14 @@ static ULONG STDMETHODCALLTYPE d2d_rectangle_geometry_Release(ID2D1RectangleGeom
static void STDMETHODCALLTYPE d2d_rectangle_geometry_GetFactory(ID2D1RectangleGeometry *iface, ID2D1Factory **factory)
{
struct d2d_geometry *geometry = impl_from_ID2D1RectangleGeometry(iface);
+ HRESULT hr;
TRACE("iface %p, factory %p.\n", iface, factory);
- ID2D1Factory_AddRef(*factory = geometry->factory);
+ if (FAILED(hr = ID2D1Factory1_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
+ {
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
+ }
}
static HRESULT STDMETHODCALLTYPE d2d_rectangle_geometry_GetBounds(ID2D1RectangleGeometry *iface,
@@ -3780,7 +3788,7 @@ static const struct ID2D1RectangleGeometryVtbl d2d_rectangle_geometry_vtbl =
d2d_rectangle_geometry_GetRect,
};
-HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory, const D2D1_RECT_F *rect)
+HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory, const D2D1_RECT_F *rect)
{
struct d2d_face *f;
D2D1_POINT_2F *v;
@@ -3901,10 +3909,14 @@ static void STDMETHODCALLTYPE d2d_transformed_geometry_GetFactory(ID2D1Transform
ID2D1Factory **factory)
{
struct d2d_geometry *geometry = impl_from_ID2D1TransformedGeometry(iface);
+ HRESULT hr;
TRACE("iface %p, factory %p.\n", iface, factory);
- ID2D1Factory_AddRef(*factory = geometry->factory);
+ if (FAILED(hr = ID2D1Factory1_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
+ {
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
+ }
}
static HRESULT STDMETHODCALLTYPE d2d_transformed_geometry_GetBounds(ID2D1TransformedGeometry *iface,
@@ -4098,7 +4110,7 @@ static const struct ID2D1TransformedGeometryVtbl d2d_transformed_geometry_vtbl =
d2d_transformed_geometry_GetTransform,
};
-void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
+void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory,
ID2D1Geometry *src_geometry, const D2D_MATRIX_3X2_F *transform)
{
struct d2d_geometry *src_impl;
--
1.9.1

View File

@@ -0,0 +1,253 @@
From d8f2ab6b92e9c845c57df905d13c60d9dec0f94f Mon Sep 17 00:00:00 2001
From: Lucian Poston <lucian.poston@gmail.com>
Date: Thu, 3 May 2018 01:37:52 -0700
Subject: [PATCH 4/7] d2d1: Implement ID2D1Device
https://bugs.winehq.org/show_bug.cgi?id=44052
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
---
dlls/d2d1/Makefile.in | 1 +
dlls/d2d1/d2d1_private.h | 10 +++
dlls/d2d1/device.c | 159 +++++++++++++++++++++++++++++++++++++++++++++++
dlls/d2d1/factory.c | 13 +++-
dlls/d2d1/tests/d2d1.c | 1 -
5 files changed, 181 insertions(+), 3 deletions(-)
create mode 100644 dlls/d2d1/device.c
diff --git a/dlls/d2d1/Makefile.in b/dlls/d2d1/Makefile.in
index 20d3f26..5aa2f4c 100644
--- a/dlls/d2d1/Makefile.in
+++ b/dlls/d2d1/Makefile.in
@@ -8,6 +8,7 @@ C_SRCS = \
bitmap_render_target.c \
brush.c \
dc_render_target.c \
+ device.c \
factory.c \
geometry.c \
hwnd_render_target.c \
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
index ed29c4c..4af5372 100644
--- a/dlls/d2d1/d2d1_private.h
+++ b/dlls/d2d1/d2d1_private.h
@@ -567,4 +567,14 @@ static inline const char *debug_d2d_rect_f(const D2D1_RECT_F *rect)
return wine_dbg_sprintf("(%.8e,%.8e)-(%.8e,%.8e)", rect->left, rect->top, rect->right, rect->bottom );
}
+struct d2d_device
+{
+ ID2D1Device ID2D1Device_iface;
+ LONG refcount;
+ ID2D1Factory1 *factory;
+ IDXGIDevice *dxgi_device;
+};
+
+void d2d_device_init(struct d2d_device *This, ID2D1Factory1 *iface, IDXGIDevice *dxgiDevice) DECLSPEC_HIDDEN;
+
#endif /* __WINE_D2D1_PRIVATE_H */
diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c
new file mode 100644
index 0000000..c060d4f
--- /dev/null
+++ b/dlls/d2d1/device.c
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2018 Lucian Poston
+ *
+ * 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
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include "d2d1_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d2d);
+
+static inline struct d2d_device *impl_from_ID2D1Device(ID2D1Device *iface)
+{
+ return CONTAINING_RECORD(iface, struct d2d_device, ID2D1Device_iface);
+}
+
+static HRESULT WINAPI d2d_device_QueryInterface(
+ ID2D1Device *iface,
+ REFIID riid,
+ void **ppvObject)
+{
+ TRACE("iface %p, riid %s, ppvObject %p.\n", iface, debugstr_guid(riid), ppvObject);
+ if (ppvObject == NULL)
+ return E_POINTER;
+
+ if (IsEqualGUID(riid, &IID_ID2D1Device)
+ || IsEqualGUID(riid, &IID_ID2D1Resource)
+ || IsEqualGUID(riid, &IID_IUnknown))
+ {
+ ID2D1Device_AddRef(iface);
+ *ppvObject = iface;
+ return S_OK;
+ }
+
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
+ *ppvObject = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI d2d_device_AddRef(
+ ID2D1Device *iface)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ ULONG refcount = InterlockedIncrement(&This->refcount);
+ TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ return refcount;
+}
+
+static ULONG WINAPI d2d_device_Release(
+ ID2D1Device *iface)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ ULONG refcount = InterlockedDecrement(&This->refcount);
+ TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+
+ if (refcount == 0)
+ {
+ IDXGIDevice_Release(This->dxgi_device);
+ ID2D1Factory1_Release(This->factory);
+ HeapFree(GetProcessHeap(), 0, This);
+ }
+
+ return refcount;
+}
+
+static void WINAPI d2d_device_GetFactory(
+ ID2D1Device *iface,
+ ID2D1Factory **factory)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+
+ TRACE("iface %p, factory %p.\n", iface, factory);
+ *factory = (ID2D1Factory *)This->factory;
+ ID2D1Factory1_AddRef(This->factory);
+}
+
+static HRESULT WINAPI d2d_device_CreateDeviceContext(
+ ID2D1Device *iface,
+ D2D1_DEVICE_CONTEXT_OPTIONS options,
+ ID2D1DeviceContext **deviceContext)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d2d_device_CreatePrintControl(
+ ID2D1Device *iface,
+ IWICImagingFactory *wicFactory,
+ IPrintDocumentPackageTarget *documentTarget,
+ const D2D1_PRINT_CONTROL_PROPERTIES *printControlProperties,
+ ID2D1PrintControl **printControl)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static void WINAPI d2d_device_SetMaximumTextureMemory(
+ ID2D1Device *iface,
+ UINT64 maximumInBytes)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+}
+
+static UINT64 WINAPI d2d_device_GetMaximumTextureMemory(
+ ID2D1Device *iface)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d2d_device_ClearResources(
+ ID2D1Device *iface,
+ UINT millisecondsSinceUse)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static const struct ID2D1DeviceVtbl d2d_device_vtbl =
+{
+ d2d_device_QueryInterface,
+ d2d_device_AddRef,
+ d2d_device_Release,
+ d2d_device_GetFactory,
+ d2d_device_CreateDeviceContext,
+ d2d_device_CreatePrintControl,
+ d2d_device_SetMaximumTextureMemory,
+ d2d_device_GetMaximumTextureMemory,
+ d2d_device_ClearResources,
+};
+
+void d2d_device_init(struct d2d_device *device, ID2D1Factory1 *iface, IDXGIDevice *dxgi_device)
+{
+ device->ID2D1Device_iface.lpVtbl = &d2d_device_vtbl;
+ device->refcount = 1;
+ device->factory = iface;
+ ID2D1Factory1_AddRef(device->factory);
+ device->dxgi_device = dxgi_device;
+ IDXGIDevice_AddRef(device->dxgi_device);
+}
diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c
index 9bacc85..a6bc6e2 100644
--- a/dlls/d2d1/factory.c
+++ b/dlls/d2d1/factory.c
@@ -375,9 +375,18 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory1
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDevice(ID2D1Factory1 *iface,
IDXGIDevice *dxgi_device, ID2D1Device **device)
{
- FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device);
+ struct d2d_device *object;
- return E_NOTIMPL;
+ TRACE("iface %p, dxgi_device %p, device %p\n", iface, dxgi_device, device);
+
+ if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
+ return E_OUTOFMEMORY;
+
+ d2d_device_init(object, iface, dxgi_device);
+ *device = &object->ID2D1Device_iface;
+ TRACE("Created device %p.\n", object);
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory1 *iface,
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 21b4e53..cf0ddd7 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -4684,7 +4684,6 @@ static void test_draw_via_ID2D1DeviceContext(void)
}
hr = ID2D1Factory1_CreateDevice(factory, dxgi_device, &device);
- todo_wine
ok(SUCCEEDED(hr), "Failed to create device, hr %#x.\n", hr);
if (FAILED(hr))
{
--
1.9.1

Some files were not shown because too many files have changed in this diff Show More