Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/ntdll/tests/om.c | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 250984ebdda..c32136763a1 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -71,6 +71,7 @@ static NTSTATUS (WINAPI *pNtOpenProcessToken)(HANDLE,DWORD,HANDLE*); static NTSTATUS (WINAPI *pNtOpenThreadToken)(HANDLE,DWORD,BOOLEAN,HANDLE*); static NTSTATUS (WINAPI *pNtDuplicateToken)(HANDLE,ACCESS_MASK,OBJECT_ATTRIBUTES*,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,HANDLE*); static NTSTATUS (WINAPI *pNtDuplicateObject)(HANDLE,HANDLE,HANDLE,HANDLE*,ACCESS_MASK,ULONG,ULONG); +static NTSTATUS (WINAPI *pNtCompareObjects)(HANDLE,HANDLE);
#define KEYEDEVENT_WAIT 0x0001 #define KEYEDEVENT_WAKE 0x0002 @@ -2446,6 +2447,59 @@ static void test_globalroot(void) pNtClose(h); }
+static void test_object_identity(void) +{ + NTSTATUS status; + HANDLE h1, h2; + + if (!pNtCompareObjects) + { + skip("NtCompareObjects is not available.\n"); + return; + } + + status = pNtCompareObjects( GetCurrentProcess(), GetCurrentProcess() ); + ok( status == STATUS_SUCCESS, "comparing GetCurrentProcess() to self failed with %08x\n", status ); + + status = pNtCompareObjects( GetCurrentThread(), GetCurrentThread() ); + ok( status == STATUS_SUCCESS, "comparing GetCurrentThread() to self failed with %08x\n", status ); + + status = pNtCompareObjects( GetCurrentProcess(), GetCurrentThread() ); + ok( status == STATUS_NOT_SAME_OBJECT, "comparing GetCurrentProcess() to GetCurrentThread() returned %08x\n", status ); + + h1 = NULL; + status = pNtDuplicateObject( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), + &h1, 0, 0, DUPLICATE_SAME_ACCESS ); + ok( status == STATUS_SUCCESS, "failed to duplicate current process handle: %08x\n", status); + + status = pNtCompareObjects( GetCurrentProcess(), h1 ); + ok( status == STATUS_SUCCESS, "comparing GetCurrentProcess() with %p failed with %08x\n", h1, status ); + + pNtClose( h1 ); + + h1 = CreateFileA( "\\.\NUL", GENERIC_ALL, 0, NULL, OPEN_EXISTING, 0, 0 ); + ok( h1 != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError() ); + + h2 = NULL; + status = pNtDuplicateObject( GetCurrentProcess(), h1, GetCurrentProcess(), + &h2, 0, 0, DUPLICATE_SAME_ACCESS ); + ok( status == STATUS_SUCCESS, "failed to duplicate handle %p: %08x\n", h1, status); + + status = pNtCompareObjects( h1, h2 ); + ok( status == STATUS_SUCCESS, "comparing %p with %p failed with %08x\n", h1, h2, status ); + + pNtClose( h2 ); + + h2 = CreateFileA( "\\.\NUL", GENERIC_ALL, 0, NULL, OPEN_EXISTING, 0, 0 ); + ok( h2 != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError() ); + + status = pNtCompareObjects( h1, h2 ); + ok( status == STATUS_NOT_SAME_OBJECT, "comparing %p with %p returned %08x\n", h1, h2, status ); + + pNtClose( h2 ); + pNtClose( h1 ); +} + START_TEST(om) { HMODULE hntdll = GetModuleHandleA("ntdll.dll"); @@ -2489,6 +2543,7 @@ START_TEST(om) pNtOpenThreadToken = (void *)GetProcAddress(hntdll, "NtOpenThreadToken"); pNtDuplicateToken = (void *)GetProcAddress(hntdll, "NtDuplicateToken"); pNtDuplicateObject = (void *)GetProcAddress(hntdll, "NtDuplicateObject"); + pNtCompareObjects = (void *)GetProcAddress(hntdll, "NtCompareObjects");
test_case_sensitive(); test_namespace_pipe(); @@ -2505,4 +2560,5 @@ START_TEST(om) test_object_types(); test_get_next_thread(); test_globalroot(); + test_object_identity(); }
Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/ntdll/ntdll.spec | 2 ++ dlls/ntdll/unix/loader.c | 1 + dlls/ntdll/unix/server.c | 19 +++++++++++++++++++ dlls/wow64/sync.c | 12 ++++++++++++ dlls/wow64/syscall.h | 1 + include/wine/server_protocol.h | 19 ++++++++++++++++++- include/winternl.h | 1 + server/handle.c | 17 +++++++++++++++++ server/protocol.def | 7 +++++++ server/request.h | 5 +++++ server/trace.c | 10 ++++++++++ 11 files changed, 93 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index e5a49ba1a1f..343db34cb6d 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -157,6 +157,7 @@ @ stdcall -syscall NtClose(long) # @ stub NtCloseObjectAuditAlarm # @ stub NtCompactKeys +@ stdcall -syscall NtCompareObjects(ptr ptr) # @ stub NtCompareTokens @ stdcall -syscall NtCompleteConnectPort(ptr) # @ stub NtCompressKey @@ -1180,6 +1181,7 @@ @ stdcall -private -syscall ZwClose(long) NtClose # @ stub ZwCloseObjectAuditAlarm # @ stub ZwCompactKeys +@ stdcall -private -syscall ZwCompareObjects(ptr ptr) NtCompareObjects # @ stub ZwCompareTokens @ stdcall -private -syscall ZwCompleteConnectPort(ptr) NtCompleteConnectPort # @ stub ZwCompressKey diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index f19d1d68dc7..61041061b32 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -145,6 +145,7 @@ static void * const syscalls[] = NtCancelTimer, NtClearEvent, NtClose, + NtCompareObjects, NtCompleteConnectPort, NtConnectPort, NtContinue, diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c index 399b1cceb16..a086d0cb583 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -1690,6 +1690,25 @@ NTSTATUS WINAPI NtDuplicateObject( HANDLE source_process, HANDLE source, HANDLE }
+/************************************************************************** + * NtCompareObjects (NTDLL.@) + */ +NTSTATUS WINAPI NtCompareObjects( HANDLE first, HANDLE second ) +{ + NTSTATUS status; + + SERVER_START_REQ( compare_objects ) + { + req->first = wine_server_obj_handle( first ); + req->second = wine_server_obj_handle( second ); + status = wine_server_call( req ); + } + SERVER_END_REQ; + + return status; +} + + /************************************************************************** * NtClose */ diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index 20776378a7d..b8f3fabe06c 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -169,6 +169,18 @@ NTSTATUS WINAPI wow64_NtClearEvent( UINT *args ) }
+/********************************************************************** + * wow64_NtCompareObjects + */ +NTSTATUS WINAPI wow64_NtCompareObjects( UINT *args ) +{ + HANDLE first = get_handle( &args ); + HANDLE second = get_handle( &args ); + + return NtCompareObjects( first, second ); +} + + /********************************************************************** * wow64_NtCompleteConnectPort */ diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index 112711875f7..cb8fed9b99c 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -42,6 +42,7 @@ SYSCALL_ENTRY( NtCancelTimer ) \ SYSCALL_ENTRY( NtClearEvent ) \ SYSCALL_ENTRY( NtClose ) \ + SYSCALL_ENTRY( NtCompareObjects ) \ SYSCALL_ENTRY( NtCompleteConnectPort ) \ SYSCALL_ENTRY( NtConnectPort ) \ SYSCALL_ENTRY( NtContinue ) \ diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 5a66e9aff8f..b37a8e8e056 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -1252,6 +1252,20 @@ struct dup_handle_reply
+struct compare_objects_request +{ + struct request_header __header; + obj_handle_t first; + obj_handle_t second; + char __pad_20[4]; +}; +struct compare_objects_reply +{ + struct reply_header __header; +}; + + + struct make_temporary_request { struct request_header __header; @@ -5448,6 +5462,7 @@ enum request REQ_close_handle, REQ_set_handle_info, REQ_dup_handle, + REQ_compare_objects, REQ_make_temporary, REQ_open_process, REQ_open_thread, @@ -5729,6 +5744,7 @@ union generic_request struct close_handle_request close_handle_request; struct set_handle_info_request set_handle_info_request; struct dup_handle_request dup_handle_request; + struct compare_objects_request compare_objects_request; struct make_temporary_request make_temporary_request; struct open_process_request open_process_request; struct open_thread_request open_thread_request; @@ -6008,6 +6024,7 @@ union generic_reply struct close_handle_reply close_handle_reply; struct set_handle_info_reply set_handle_info_reply; struct dup_handle_reply dup_handle_reply; + struct compare_objects_reply compare_objects_reply; struct make_temporary_reply make_temporary_reply; struct open_process_reply open_process_reply; struct open_thread_reply open_thread_reply; @@ -6262,7 +6279,7 @@ union generic_reply
/* ### protocol_version begin ### */
-#define SERVER_PROTOCOL_VERSION 736 +#define SERVER_PROTOCOL_VERSION 737
/* ### protocol_version end ### */
diff --git a/include/winternl.h b/include/winternl.h index cfd83f16337..5c2a1c07aeb 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -3872,6 +3872,7 @@ NTSYSAPI NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*); NTSYSAPI NTSTATUS WINAPI NtClearEvent(HANDLE); NTSYSAPI NTSTATUS WINAPI NtClose(HANDLE); NTSYSAPI NTSTATUS WINAPI NtCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN); +NTSYSAPI NTSTATUS WINAPI NtCompareObjects(HANDLE,HANDLE); NTSYSAPI NTSTATUS WINAPI NtCompleteConnectPort(HANDLE); NTSYSAPI NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG); NTSYSAPI NTSTATUS WINAPI NtContinue(PCONTEXT,BOOLEAN); diff --git a/server/handle.c b/server/handle.c index 13e40770aea..bc692b8ebeb 100644 --- a/server/handle.c +++ b/server/handle.c @@ -879,3 +879,20 @@ DECL_HANDLER(make_temporary) } release_object( obj ); } + +DECL_HANDLER(compare_objects) +{ + struct object *obj1, *obj2; + + if (!(obj1 = get_handle_obj( current->process, req->first, 0, NULL ))) return; + if (!(obj2 = get_handle_obj( current->process, req->second, 0, NULL ))) + { + release_object( obj1 ); + return; + } + + if (obj1 != obj2) set_error( STATUS_NOT_SAME_OBJECT ); + + release_object( obj2 ); + release_object( obj1 ); +} diff --git a/server/protocol.def b/server/protocol.def index ad6d2bb58d0..c83e6a2ef7c 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1121,6 +1121,13 @@ typedef struct @END
+/* Test if two handles refer to the same object */ +@REQ(compare_objects) + obj_handle_t first; /* first object handle */ + obj_handle_t second; /* second object handle */ +@END + + /* Make an object temporary */ @REQ(make_temporary) obj_handle_t handle; /* handle to the object */ diff --git a/server/request.h b/server/request.h index 33d4237f49f..6a63e842357 100644 --- a/server/request.h +++ b/server/request.h @@ -143,6 +143,7 @@ DECL_HANDLER(get_apc_result); DECL_HANDLER(close_handle); DECL_HANDLER(set_handle_info); DECL_HANDLER(dup_handle); +DECL_HANDLER(compare_objects); DECL_HANDLER(make_temporary); DECL_HANDLER(open_process); DECL_HANDLER(open_thread); @@ -423,6 +424,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] = (req_handler)req_close_handle, (req_handler)req_set_handle_info, (req_handler)req_dup_handle, + (req_handler)req_compare_objects, (req_handler)req_make_temporary, (req_handler)req_open_process, (req_handler)req_open_thread, @@ -874,6 +876,9 @@ C_ASSERT( FIELD_OFFSET(struct dup_handle_request, options) == 32 ); C_ASSERT( sizeof(struct dup_handle_request) == 40 ); C_ASSERT( FIELD_OFFSET(struct dup_handle_reply, handle) == 8 ); C_ASSERT( sizeof(struct dup_handle_reply) == 16 ); +C_ASSERT( FIELD_OFFSET(struct compare_objects_request, first) == 12 ); +C_ASSERT( FIELD_OFFSET(struct compare_objects_request, second) == 16 ); +C_ASSERT( sizeof(struct compare_objects_request) == 24 ); C_ASSERT( FIELD_OFFSET(struct make_temporary_request, handle) == 12 ); C_ASSERT( sizeof(struct make_temporary_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct open_process_request, pid) == 12 ); diff --git a/server/trace.c b/server/trace.c index 903e323273b..99c5d3996ab 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1749,6 +1749,12 @@ static void dump_dup_handle_reply( const struct dup_handle_reply *req ) fprintf( stderr, " handle=%04x", req->handle ); }
+static void dump_compare_objects_request( const struct compare_objects_request *req ) +{ + fprintf( stderr, " first=%04x", req->first ); + fprintf( stderr, ", second=%04x", req->second ); +} + static void dump_make_temporary_request( const struct make_temporary_request *req ) { fprintf( stderr, " handle=%04x", req->handle ); @@ -4581,6 +4587,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = { (dump_func)dump_close_handle_request, (dump_func)dump_set_handle_info_request, (dump_func)dump_dup_handle_request, + (dump_func)dump_compare_objects_request, (dump_func)dump_make_temporary_request, (dump_func)dump_open_process_request, (dump_func)dump_open_thread_request, @@ -4859,6 +4866,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = { (dump_func)dump_set_handle_info_reply, (dump_func)dump_dup_handle_reply, NULL, + NULL, (dump_func)dump_open_process_reply, (dump_func)dump_open_thread_reply, (dump_func)dump_select_reply, @@ -5135,6 +5143,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = { "close_handle", "set_handle_info", "dup_handle", + "compare_objects", "make_temporary", "open_process", "open_thread", @@ -5474,6 +5483,7 @@ static const struct { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW }, { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE }, { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE }, + { "NOT_SAME_OBJECT", STATUS_NOT_SAME_OBJECT }, { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED }, { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED }, { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/kernelbase/tests/Makefile.in | 3 +- dlls/kernelbase/tests/process.c | 101 ++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 dlls/kernelbase/tests/process.c
diff --git a/dlls/kernelbase/tests/Makefile.in b/dlls/kernelbase/tests/Makefile.in index fe7ab212e6e..44ea96f9864 100644 --- a/dlls/kernelbase/tests/Makefile.in +++ b/dlls/kernelbase/tests/Makefile.in @@ -2,7 +2,8 @@ TESTDLL = kernelbase.dll
C_SRCS = \ path.c \ - sync.c + sync.c \ + process.c
RC_SRCS = \ rsrc.rc diff --git a/dlls/kernelbase/tests/process.c b/dlls/kernelbase/tests/process.c new file mode 100644 index 00000000000..e001fdbbd2a --- /dev/null +++ b/dlls/kernelbase/tests/process.c @@ -0,0 +1,101 @@ +/* + * Process tests + * + * Copyright 2021 Jinoh Kang + * + * 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 <stdlib.h> + +#include <ntstatus.h> +#define WIN32_NO_STATUS +#include <windef.h> +#include <winbase.h> +#include <winerror.h> +#include <winternl.h> + +#include "wine/test.h" + +static BOOL (WINAPI *pCompareObjectHandles)(HANDLE, HANDLE); + +static void test_CompareObjectHandles(void) +{ + HANDLE h1, h2; + + if (!pCompareObjectHandles) + { + skip("CompareObjectHandles is not available.\n"); + return; + } + + ok( pCompareObjectHandles( GetCurrentProcess(), GetCurrentProcess() ), + "comparing GetCurrentProcess() to self failed with %u\n", GetLastError() ); + + ok( pCompareObjectHandles( GetCurrentThread(), GetCurrentThread() ), + "comparing GetCurrentThread() to self failed with %u\n", GetLastError() ); + + SetLastError(0); + ok( !pCompareObjectHandles( GetCurrentProcess(), GetCurrentThread() ) && + GetLastError() == ERROR_NOT_SAME_OBJECT, + "comparing GetCurrentProcess() to GetCurrentThread() returned %u\n", GetLastError() ); + + h1 = NULL; + ok( DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), + &h1, 0, FALSE, DUPLICATE_SAME_ACCESS ), + "failed to duplicate current process handle: %u\n", GetLastError() ); + + ok( pCompareObjectHandles( GetCurrentProcess(), h1 ), + "comparing GetCurrentProcess() with %p failed with %u\n", h1, GetLastError() ); + + CloseHandle( h1 ); + + h1 = CreateFileA( "\\.\NUL", GENERIC_ALL, 0, NULL, OPEN_EXISTING, 0, 0 ); + ok( h1 != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError() ); + + h2 = NULL; + ok( DuplicateHandle( GetCurrentProcess(), h1, GetCurrentProcess(), + &h2, 0, FALSE, DUPLICATE_SAME_ACCESS ), + "failed to duplicate handle %p: %u\n", h1, GetLastError() ); + + ok( pCompareObjectHandles( h1, h2 ), + "comparing %p with %p failed with %u\n", h1, h2, GetLastError() ); + + CloseHandle( h2 ); + + h2 = CreateFileA( "\\.\NUL", GENERIC_ALL, 0, NULL, OPEN_EXISTING, 0, 0 ); + ok( h2 != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError() ); + + SetLastError(0); + ok( !pCompareObjectHandles( h1, h2 ) && GetLastError() == ERROR_NOT_SAME_OBJECT, + "comparing %p with %p returned %u\n", h1, h2, GetLastError() ); + + CloseHandle( h2 ); + CloseHandle( h1 ); +} + +START_TEST(process) +{ + HMODULE hmod; + + hmod = GetModuleHandleA("kernel32.dll"); + pCompareObjectHandles = (void *)GetProcAddress(hmod, "CompareObjectHandles"); + ok(!pCompareObjectHandles, "expected CompareObjectHandles only in kernelbase.dll\n"); + + hmod = GetModuleHandleA("kernelbase.dll"); + pCompareObjectHandles = (void *)GetProcAddress(hmod, "CompareObjectHandles"); + + test_CompareObjectHandles(); +}
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=102824
Your paranoid android.
=== build (build log) ===
../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ Makefile:87310: recipe for target 'dlls/kernelbase/tests/process.cross.o' failed Task: The exe32 Wine build failed
=== debiant2 (build log) ===
../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ Task: The win32 Wine build failed
=== debiant2 (build log) ===
../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ Task: The wow32 Wine build failed
Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com
--- dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/process.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index be40e425783..7bc0c262fdd 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -153,7 +153,7 @@ @ stdcall CloseThreadpoolWork(ptr) ntdll.TpReleaseWork # @ stub CommitStateAtom @ stdcall CompareFileTime(ptr ptr) -# @ stub CompareObjectHandles +@ stdcall CompareObjectHandles(ptr ptr) @ stdcall CompareStringA(long long str long str long) @ stdcall CompareStringEx(wstr long wstr long wstr long ptr ptr long) @ stdcall CompareStringOrdinal(wstr long wstr long long) diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c index 5973eb7d933..0e4a3eb9b6b 100644 --- a/dlls/kernelbase/process.c +++ b/dlls/kernelbase/process.c @@ -1771,3 +1771,12 @@ void WINAPI DECLSPEC_HOTPATCH DeleteProcThreadAttributeList( struct _PROC_THREAD { return; } + + +/*********************************************************************** + * CompareObjectHandles (kernelbase.@) + */ +BOOL WINAPI DECLSPEC_HOTPATCH CompareObjectHandles( HANDLE first, HANDLE second ) +{ + return set_ntstatus( NtCompareObjects( first, second )); +}
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=102825
Your paranoid android.
=== debiant2 (build log) ===
../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ Task: The win32 Wine build failed
=== debiant2 (build log) ===
../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ ../wine/include/windef.h:112:24: error: unknown type name ‘va_list’ Task: The wow32 Wine build failed