winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
728 discussions
Start a n
N
ew thread
Alexandre Julliard : wow64: Add thunks for the directory object syscalls.
by Alexandre Julliard
23 Jul '21
23 Jul '21
Module: wine Branch: master Commit: 994e4fba75a561ea643ad82988109507523d72b8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=994e4fba75a561ea643ad829…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 23 17:09:08 2021 +0200 wow64: Add thunks for the directory object syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/struct32.h | 6 ++++ dlls/wow64/sync.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 3 ++ 3 files changed, 89 insertions(+) diff --git a/dlls/wow64/struct32.h b/dlls/wow64/struct32.h index e8b2e22cdcf..23144e9e15a 100644 --- a/dlls/wow64/struct32.h +++ b/dlls/wow64/struct32.h @@ -31,4 +31,10 @@ typedef struct ULONG SecurityQualityOfService; } OBJECT_ATTRIBUTES32; +typedef struct +{ + UNICODE_STRING32 ObjectName; + UNICODE_STRING32 ObjectTypeName; +} DIRECTORY_BASIC_INFORMATION32; + #endif /* __WOW64_STRUCT32_H */ diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index 596e90bc71d..55c0ed08e32 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -27,6 +27,9 @@ #include "winnt.h" #include "winternl.h" #include "wow64_private.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(wow); /********************************************************************** @@ -52,6 +55,26 @@ NTSTATUS WINAPI wow64_NtClearEvent( UINT *args ) } +/********************************************************************** + * wow64_NtCreateDirectoryObject + */ +NTSTATUS WINAPI wow64_NtCreateDirectoryObject( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtCreateDirectoryObject( &handle, access, objattr_32to64( &attr, attr32 )); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtCreateEvent */ @@ -159,6 +182,26 @@ NTSTATUS WINAPI wow64_NtCreateTimer( UINT *args ) } +/********************************************************************** + * wow64_NtOpenDirectoryObject + */ +NTSTATUS WINAPI wow64_NtOpenDirectoryObject( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtOpenDirectoryObject( &handle, access, objattr_32to64( &attr, attr32 )); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtOpenEvent */ @@ -271,6 +314,43 @@ NTSTATUS WINAPI wow64_NtPulseEvent( UINT *args ) } +/********************************************************************** + * wow64_NtQueryDirectoryObject + */ +NTSTATUS WINAPI wow64_NtQueryDirectoryObject( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + DIRECTORY_BASIC_INFORMATION32 *info32 = get_ptr( &args ); + ULONG size32 = get_ulong( &args ); + BOOLEAN single_entry = get_ulong( &args ); + BOOLEAN restart = get_ulong( &args ); + ULONG *context = get_ptr( &args ); + ULONG *retlen = get_ptr( &args ); + + NTSTATUS status; + DIRECTORY_BASIC_INFORMATION *info; + ULONG size = size32 + sizeof(*info) - sizeof(*info32); + + if (!single_entry) FIXME( "not implemented\n" ); + info = RtlAllocateHeap( GetProcessHeap(), 0, size ); + status = NtQueryDirectoryObject( handle, info, size, single_entry, restart, context, NULL ); + if (!status) + { + info32->ObjectName.Buffer = PtrToUlong( info32 + 1 ); + info32->ObjectName.Length = info->ObjectName.Length; + info32->ObjectName.MaximumLength = info->ObjectName.MaximumLength; + info32->ObjectTypeName.Buffer = info32->ObjectName.Buffer + info->ObjectName.MaximumLength; + info32->ObjectTypeName.Length = info->ObjectTypeName.Length; + info32->ObjectTypeName.MaximumLength = info->ObjectTypeName.MaximumLength; + size = info->ObjectName.MaximumLength + info->ObjectTypeName.MaximumLength; + memcpy( info32 + 1, info + 1, size ); + if (retlen) *retlen = sizeof(*info32) + size; + } + RtlFreeHeap( GetProcessHeap(), 0, info ); + return status; +} + + /********************************************************************** * wow64_NtQueryEvent */ diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index db2b386fe24..b64cabd15b5 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -28,6 +28,7 @@ SYSCALL_ENTRY( NtCancelTimer ) \ SYSCALL_ENTRY( NtClearEvent ) \ SYSCALL_ENTRY( NtClose ) \ + SYSCALL_ENTRY( NtCreateDirectoryObject ) \ SYSCALL_ENTRY( NtCreateEvent ) \ SYSCALL_ENTRY( NtCreateKeyedEvent ) \ SYSCALL_ENTRY( NtCreateMutant ) \ @@ -36,6 +37,7 @@ SYSCALL_ENTRY( NtDeleteAtom ) \ SYSCALL_ENTRY( NtFindAtom ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ + SYSCALL_ENTRY( NtOpenDirectoryObject ) \ SYSCALL_ENTRY( NtOpenEvent ) \ SYSCALL_ENTRY( NtOpenKeyedEvent ) \ SYSCALL_ENTRY( NtOpenMutant ) \ @@ -44,6 +46,7 @@ SYSCALL_ENTRY( NtPulseEvent ) \ SYSCALL_ENTRY( NtQueryDefaultLocale ) \ SYSCALL_ENTRY( NtQueryDefaultUILanguage ) \ + SYSCALL_ENTRY( NtQueryDirectoryObject ) \ SYSCALL_ENTRY( NtQueryEvent ) \ SYSCALL_ENTRY( NtQueryInformationAtom ) \ SYSCALL_ENTRY( NtQueryInstallUILanguage ) \
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the keyed event syscalls.
by Alexandre Julliard
23 Jul '21
23 Jul '21
Module: wine Branch: master Commit: fb5eae4a70bca9f37afbe0e15b61ddf3e56fc815 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fb5eae4a70bca9f37afbe0e1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 23 17:04:11 2021 +0200 wow64: Add thunks for the keyed event syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/sync.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 6 ++++- 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index c6c5e1d374d..596e90bc71d 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -74,6 +74,27 @@ NTSTATUS WINAPI wow64_NtCreateEvent( UINT *args ) } +/********************************************************************** + * wow64_NtCreateKeyedEvent + */ +NTSTATUS WINAPI wow64_NtCreateKeyedEvent( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + ULONG flags = get_ulong( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtCreateKeyedEvent( &handle, access, objattr_32to64( &attr, attr32 ), flags ); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtCreateMutant */ @@ -158,6 +179,26 @@ NTSTATUS WINAPI wow64_NtOpenEvent( UINT *args ) } +/********************************************************************** + * wow64_NtOpenKeyedEvent + */ +NTSTATUS WINAPI wow64_NtOpenKeyedEvent( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtOpenKeyedEvent( &handle, access, objattr_32to64( &attr, attr32 )); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtOpenMutant */ @@ -290,6 +331,20 @@ NTSTATUS WINAPI wow64_NtQueryTimer( UINT *args ) } +/********************************************************************** + * wow64_NtReleaseKeyedEvent + */ +NTSTATUS WINAPI wow64_NtReleaseKeyedEvent( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + void *key = get_ptr( &args ); + BOOLEAN alertable = get_ulong( &args ); + const LARGE_INTEGER *timeout = get_ptr( &args ); + + return NtReleaseKeyedEvent( handle, key, alertable, timeout ); +} + + /********************************************************************** * wow64_NtReleaseMutant */ @@ -355,3 +410,17 @@ NTSTATUS WINAPI wow64_NtSetTimer( UINT *args ) return NtSetTimer( handle, when, apc_32to64( apc ), apc_param_32to64( apc, apc_param ), resume, period, state ); } + + +/********************************************************************** + * wow64_NtWaitForKeyedEvent + */ +NTSTATUS WINAPI wow64_NtWaitForKeyedEvent( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + const void *key = get_ptr( &args ); + BOOLEAN alertable = get_ulong( &args ); + const LARGE_INTEGER *timeout = get_ptr( &args ); + + return NtWaitForKeyedEvent( handle, key, alertable, timeout ); +} diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index f348ecfe1d9..db2b386fe24 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -29,6 +29,7 @@ SYSCALL_ENTRY( NtClearEvent ) \ SYSCALL_ENTRY( NtClose ) \ SYSCALL_ENTRY( NtCreateEvent ) \ + SYSCALL_ENTRY( NtCreateKeyedEvent ) \ SYSCALL_ENTRY( NtCreateMutant ) \ SYSCALL_ENTRY( NtCreateSemaphore ) \ SYSCALL_ENTRY( NtCreateTimer ) \ @@ -36,6 +37,7 @@ SYSCALL_ENTRY( NtFindAtom ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ SYSCALL_ENTRY( NtOpenEvent ) \ + SYSCALL_ENTRY( NtOpenKeyedEvent ) \ SYSCALL_ENTRY( NtOpenMutant ) \ SYSCALL_ENTRY( NtOpenSemaphore ) \ SYSCALL_ENTRY( NtOpenTimer ) \ @@ -48,12 +50,14 @@ SYSCALL_ENTRY( NtQueryMutant ) \ SYSCALL_ENTRY( NtQuerySemaphore ) \ SYSCALL_ENTRY( NtQueryTimer ) \ + SYSCALL_ENTRY( NtReleaseKeyedEvent ) \ SYSCALL_ENTRY( NtReleaseMutant ) \ SYSCALL_ENTRY( NtReleaseSemaphore ) \ SYSCALL_ENTRY( NtResetEvent ) \ SYSCALL_ENTRY( NtSetDefaultLocale ) \ SYSCALL_ENTRY( NtSetDefaultUILanguage ) \ SYSCALL_ENTRY( NtSetEvent ) \ - SYSCALL_ENTRY( NtSetTimer ) + SYSCALL_ENTRY( NtSetTimer ) \ + SYSCALL_ENTRY( NtWaitForKeyedEvent ) #endif /* __WOW64_SYSCALL_H */
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the timer syscalls.
by Alexandre Julliard
23 Jul '21
23 Jul '21
Module: wine Branch: master Commit: 54901695dcbf97173bc22c0df4b916089d2eeb11 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=54901695dcbf97173bc22c0d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 23 17:00:52 2021 +0200 wow64: Add thunks for the timer syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/sync.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 7 +++- dlls/wow64/wow64_private.h | 11 ++++++ 3 files changed, 103 insertions(+), 1 deletion(-) diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index bd7e20ca02c..c6c5e1d374d 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -29,6 +29,18 @@ #include "wow64_private.h" +/********************************************************************** + * wow64_NtCancelTimer + */ +NTSTATUS WINAPI wow64_NtCancelTimer( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + BOOLEAN *state = get_ptr( &args ); + + return NtCancelTimer( handle, state ); +} + + /********************************************************************** * wow64_NtClearEvent */ @@ -105,6 +117,27 @@ NTSTATUS WINAPI wow64_NtCreateSemaphore( UINT *args ) } +/********************************************************************** + * wow64_NtCreateTimer + */ +NTSTATUS WINAPI wow64_NtCreateTimer( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + TIMER_TYPE type = get_ulong( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtCreateTimer( &handle, access, objattr_32to64( &attr, attr32 ), type ); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtOpenEvent */ @@ -165,6 +198,26 @@ NTSTATUS WINAPI wow64_NtOpenSemaphore( UINT *args ) } +/********************************************************************** + * wow64_NtOpenTimer + */ +NTSTATUS WINAPI wow64_NtOpenTimer( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtOpenTimer( &handle, access, objattr_32to64( &attr, attr32 )); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtPulseEvent */ @@ -222,6 +275,21 @@ NTSTATUS WINAPI wow64_NtQuerySemaphore( UINT *args ) } +/********************************************************************** + * wow64_NtQueryTimer + */ +NTSTATUS WINAPI wow64_NtQueryTimer( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + TIMER_INFORMATION_CLASS class = get_ulong( &args ); + void *info = get_ptr( &args ); + ULONG len = get_ulong( &args ); + ULONG *retlen = get_ptr( &args ); + + return NtQueryTimer( handle, class, info, len, retlen ); +} + + /********************************************************************** * wow64_NtReleaseMutant */ @@ -269,3 +337,21 @@ NTSTATUS WINAPI wow64_NtSetEvent( UINT *args ) return NtSetEvent( handle, prev_state ); } + + +/********************************************************************** + * wow64_NtSetTimer + */ +NTSTATUS WINAPI wow64_NtSetTimer( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + LARGE_INTEGER *when = get_ptr( &args ); + ULONG apc = get_ulong( &args ); + ULONG apc_param = get_ulong( &args ); + BOOLEAN resume = get_ulong( &args ); + ULONG period = get_ulong( &args ); + BOOLEAN *state = get_ptr( &args ); + + return NtSetTimer( handle, when, apc_32to64( apc ), apc_param_32to64( apc, apc_param ), + resume, period, state ); +} diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index bb9f220332c..f348ecfe1d9 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -25,17 +25,20 @@ SYSCALL_ENTRY( NtAddAtom ) \ SYSCALL_ENTRY( NtAllocateLocallyUniqueId ) \ SYSCALL_ENTRY( NtAllocateUuids ) \ + SYSCALL_ENTRY( NtCancelTimer ) \ SYSCALL_ENTRY( NtClearEvent ) \ SYSCALL_ENTRY( NtClose ) \ SYSCALL_ENTRY( NtCreateEvent ) \ SYSCALL_ENTRY( NtCreateMutant ) \ SYSCALL_ENTRY( NtCreateSemaphore ) \ + SYSCALL_ENTRY( NtCreateTimer ) \ SYSCALL_ENTRY( NtDeleteAtom ) \ SYSCALL_ENTRY( NtFindAtom ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ SYSCALL_ENTRY( NtOpenEvent ) \ SYSCALL_ENTRY( NtOpenMutant ) \ SYSCALL_ENTRY( NtOpenSemaphore ) \ + SYSCALL_ENTRY( NtOpenTimer ) \ SYSCALL_ENTRY( NtPulseEvent ) \ SYSCALL_ENTRY( NtQueryDefaultLocale ) \ SYSCALL_ENTRY( NtQueryDefaultUILanguage ) \ @@ -44,11 +47,13 @@ SYSCALL_ENTRY( NtQueryInstallUILanguage ) \ SYSCALL_ENTRY( NtQueryMutant ) \ SYSCALL_ENTRY( NtQuerySemaphore ) \ + SYSCALL_ENTRY( NtQueryTimer ) \ SYSCALL_ENTRY( NtReleaseMutant ) \ SYSCALL_ENTRY( NtReleaseSemaphore ) \ SYSCALL_ENTRY( NtResetEvent ) \ SYSCALL_ENTRY( NtSetDefaultLocale ) \ SYSCALL_ENTRY( NtSetDefaultUILanguage ) \ - SYSCALL_ENTRY( NtSetEvent ) + SYSCALL_ENTRY( NtSetEvent ) \ + SYSCALL_ENTRY( NtSetTimer ) #endif /* __WOW64_SYSCALL_H */ diff --git a/dlls/wow64/wow64_private.h b/dlls/wow64/wow64_private.h index 5ec8ef9d847..f555f8db7bb 100644 --- a/dlls/wow64/wow64_private.h +++ b/dlls/wow64/wow64_private.h @@ -63,6 +63,17 @@ static inline ULONG get_ulong( UINT **args ) { return *(*args)++; } static inline HANDLE get_handle( UINT **args ) { return LongToHandle( *(*args)++ ); } static inline void *get_ptr( UINT **args ) { return ULongToPtr( *(*args)++ ); } +static inline void *apc_32to64( ULONG func ) +{ + return func ? Wow64ApcRoutine : NULL; +} + +static inline void *apc_param_32to64( ULONG func, ULONG context ) +{ + if (!func) return ULongToPtr( context ); + return (void *)(ULONG_PTR)(((ULONG64)func << 32) | context); +} + static inline UNICODE_STRING *unicode_str_32to64( UNICODE_STRING *str, const UNICODE_STRING32 *str32 ) { if (!str32) return NULL;
1
0
0
0
Alexandre Julliard : wow64: Add a stub for Wow64ApcRoutine().
by Alexandre Julliard
23 Jul '21
23 Jul '21
Module: wine Branch: master Commit: d1171c7d10f7c8fda64fe3e36fc626a6ebbb5748 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d1171c7d10f7c8fda64fe3e3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 23 17:00:39 2021 +0200 wow64: Add a stub for Wow64ApcRoutine(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/syscall.c | 9 +++++++++ dlls/wow64/wow64.spec | 2 +- dlls/wow64/wow64_private.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index 5c9bc8d4f27..6803efbd7e9 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -398,6 +398,15 @@ NTSTATUS WINAPI Wow64SystemServiceEx( UINT num, UINT *args ) } +/********************************************************************** + * Wow64ApcRoutine (NTDLL.@) + */ +void WINAPI Wow64ApcRoutine( ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3, CONTEXT *context ) +{ + FIXME( "stub %lx %lx %lx\n", arg1, arg2, arg3 ); +} + + /********************************************************************** * Wow64LdrpInitialize (NTDLL.@) */ diff --git a/dlls/wow64/wow64.spec b/dlls/wow64/wow64.spec index a477b6b628a..8f188043556 100644 --- a/dlls/wow64/wow64.spec +++ b/dlls/wow64/wow64.spec @@ -1,7 +1,7 @@ @ stub Wow64AllocThreadHeap @ stub Wow64AllocateHeap @ stub Wow64AllocateTemp -@ stub Wow64ApcRoutine +@ stdcall Wow64ApcRoutine(long long long ptr) @ stub Wow64CheckIfNXEnabled @ stub Wow64EmulateAtlThunk @ stub Wow64FreeHeap diff --git a/dlls/wow64/wow64_private.h b/dlls/wow64/wow64_private.h index affd39df03b..5ec8ef9d847 100644 --- a/dlls/wow64/wow64_private.h +++ b/dlls/wow64/wow64_private.h @@ -28,6 +28,8 @@ ALL_SYSCALLS #undef SYSCALL_ENTRY +void WINAPI Wow64ApcRoutine( ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3, CONTEXT *context ) DECLSPEC_HIDDEN; + extern USHORT native_machine DECLSPEC_HIDDEN; extern USHORT current_machine DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the semaphore syscalls.
by Alexandre Julliard
23 Jul '21
23 Jul '21
Module: wine Branch: master Commit: e1a4fbe7307cb1ac842a00894b8a3438df012544 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e1a4fbe7307cb1ac842a0089…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 23 16:51:33 2021 +0200 wow64: Add thunks for the semaphore syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/sync.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 4 +++ 2 files changed, 74 insertions(+) diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index 2ca7764c3cd..bd7e20ca02c 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -83,6 +83,28 @@ NTSTATUS WINAPI wow64_NtCreateMutant( UINT *args ) } +/********************************************************************** + * wow64_NtCreateSemaphore + */ +NTSTATUS WINAPI wow64_NtCreateSemaphore( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + LONG initial = get_ulong( &args ); + LONG max = get_ulong( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtCreateSemaphore( &handle, access, objattr_32to64( &attr, attr32 ), initial, max ); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtOpenEvent */ @@ -123,6 +145,26 @@ NTSTATUS WINAPI wow64_NtOpenMutant( UINT *args ) } +/********************************************************************** + * wow64_NtOpenSemaphore + */ +NTSTATUS WINAPI wow64_NtOpenSemaphore( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtOpenSemaphore( &handle, access, objattr_32to64( &attr, attr32 )); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtPulseEvent */ @@ -165,6 +207,21 @@ NTSTATUS WINAPI wow64_NtQueryMutant( UINT *args ) } +/********************************************************************** + * wow64_NtQuerySemaphore + */ +NTSTATUS WINAPI wow64_NtQuerySemaphore( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + SEMAPHORE_INFORMATION_CLASS class = get_ulong( &args ); + void *info = get_ptr( &args ); + ULONG len = get_ulong( &args ); + ULONG *retlen = get_ptr( &args ); + + return NtQuerySemaphore( handle, class, info, len, retlen ); +} + + /********************************************************************** * wow64_NtReleaseMutant */ @@ -177,6 +234,19 @@ NTSTATUS WINAPI wow64_NtReleaseMutant( UINT *args ) } +/********************************************************************** + * wow64_NtReleaseSemaphore + */ +NTSTATUS WINAPI wow64_NtReleaseSemaphore( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + ULONG count = get_ulong( &args ); + ULONG *previous = get_ptr( &args ); + + return NtReleaseSemaphore( handle, count, previous ); +} + + /********************************************************************** * wow64_NtResetEvent */ diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index 8481db2a587..bb9f220332c 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -29,11 +29,13 @@ SYSCALL_ENTRY( NtClose ) \ SYSCALL_ENTRY( NtCreateEvent ) \ SYSCALL_ENTRY( NtCreateMutant ) \ + SYSCALL_ENTRY( NtCreateSemaphore ) \ SYSCALL_ENTRY( NtDeleteAtom ) \ SYSCALL_ENTRY( NtFindAtom ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ SYSCALL_ENTRY( NtOpenEvent ) \ SYSCALL_ENTRY( NtOpenMutant ) \ + SYSCALL_ENTRY( NtOpenSemaphore ) \ SYSCALL_ENTRY( NtPulseEvent ) \ SYSCALL_ENTRY( NtQueryDefaultLocale ) \ SYSCALL_ENTRY( NtQueryDefaultUILanguage ) \ @@ -41,7 +43,9 @@ SYSCALL_ENTRY( NtQueryInformationAtom ) \ SYSCALL_ENTRY( NtQueryInstallUILanguage ) \ SYSCALL_ENTRY( NtQueryMutant ) \ + SYSCALL_ENTRY( NtQuerySemaphore ) \ SYSCALL_ENTRY( NtReleaseMutant ) \ + SYSCALL_ENTRY( NtReleaseSemaphore ) \ SYSCALL_ENTRY( NtResetEvent ) \ SYSCALL_ENTRY( NtSetDefaultLocale ) \ SYSCALL_ENTRY( NtSetDefaultUILanguage ) \
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the mutant syscalls.
by Alexandre Julliard
23 Jul '21
23 Jul '21
Module: wine Branch: master Commit: 2b0931182b49d31db9987080cdcea872ca5c817b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2b0931182b49d31db9987080…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 23 16:48:03 2021 +0200 wow64: Add thunks for the mutant syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/sync.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 4 ++++ 2 files changed, 72 insertions(+) diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index d61eed0a22d..2ca7764c3cd 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -62,6 +62,27 @@ NTSTATUS WINAPI wow64_NtCreateEvent( UINT *args ) } +/********************************************************************** + * wow64_NtCreateMutant + */ +NTSTATUS WINAPI wow64_NtCreateMutant( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + BOOLEAN owned = get_ulong( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtCreateMutant( &handle, access, objattr_32to64( &attr, attr32 ), owned ); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtOpenEvent */ @@ -82,6 +103,26 @@ NTSTATUS WINAPI wow64_NtOpenEvent( UINT *args ) } +/********************************************************************** + * wow64_NtOpenMutant + */ +NTSTATUS WINAPI wow64_NtOpenMutant( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtOpenMutant( &handle, access, objattr_32to64( &attr, attr32 )); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtPulseEvent */ @@ -109,6 +150,33 @@ NTSTATUS WINAPI wow64_NtQueryEvent( UINT *args ) } +/********************************************************************** + * wow64_NtQueryMutant + */ +NTSTATUS WINAPI wow64_NtQueryMutant( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + MUTANT_INFORMATION_CLASS class = get_ulong( &args ); + void *info = get_ptr( &args ); + ULONG len = get_ulong( &args ); + ULONG *retlen = get_ptr( &args ); + + return NtQueryMutant( handle, class, info, len, retlen ); +} + + +/********************************************************************** + * wow64_NtReleaseMutant + */ +NTSTATUS WINAPI wow64_NtReleaseMutant( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + LONG *prev_count = get_ptr( &args ); + + return NtReleaseMutant( handle, prev_count ); +} + + /********************************************************************** * wow64_NtResetEvent */ diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index df9da2261bb..8481db2a587 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -28,16 +28,20 @@ SYSCALL_ENTRY( NtClearEvent ) \ SYSCALL_ENTRY( NtClose ) \ SYSCALL_ENTRY( NtCreateEvent ) \ + SYSCALL_ENTRY( NtCreateMutant ) \ SYSCALL_ENTRY( NtDeleteAtom ) \ SYSCALL_ENTRY( NtFindAtom ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ SYSCALL_ENTRY( NtOpenEvent ) \ + SYSCALL_ENTRY( NtOpenMutant ) \ SYSCALL_ENTRY( NtPulseEvent ) \ SYSCALL_ENTRY( NtQueryDefaultLocale ) \ SYSCALL_ENTRY( NtQueryDefaultUILanguage ) \ SYSCALL_ENTRY( NtQueryEvent ) \ SYSCALL_ENTRY( NtQueryInformationAtom ) \ SYSCALL_ENTRY( NtQueryInstallUILanguage ) \ + SYSCALL_ENTRY( NtQueryMutant ) \ + SYSCALL_ENTRY( NtReleaseMutant ) \ SYSCALL_ENTRY( NtResetEvent ) \ SYSCALL_ENTRY( NtSetDefaultLocale ) \ SYSCALL_ENTRY( NtSetDefaultUILanguage ) \
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the event syscalls.
by Alexandre Julliard
23 Jul '21
23 Jul '21
Module: wine Branch: master Commit: 8b8b92e1ff553209a8eeb2bb8d78936fec9c98b9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8b8b92e1ff553209a8eeb2bb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 23 16:43:28 2021 +0200 wow64: Add thunks for the event syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/Makefile.in | 1 + dlls/wow64/struct32.h | 34 ++++++++++++ dlls/wow64/sync.c | 133 +++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 9 ++- dlls/wow64/wow64_private.h | 63 +++++++++++++++++++++ 5 files changed, 239 insertions(+), 1 deletion(-) diff --git a/dlls/wow64/Makefile.in b/dlls/wow64/Makefile.in index 8dc4dac5ba7..76e3ff97d6b 100644 --- a/dlls/wow64/Makefile.in +++ b/dlls/wow64/Makefile.in @@ -5,4 +5,5 @@ IMPORTS = ntdll winecrt0 EXTRADLLFLAGS = -nodefaultlibs -mno-cygwin -Wl,--image-base,0x6f000000 C_SRCS = \ + sync.c \ syscall.c diff --git a/dlls/wow64/struct32.h b/dlls/wow64/struct32.h new file mode 100644 index 00000000000..e8b2e22cdcf --- /dev/null +++ b/dlls/wow64/struct32.h @@ -0,0 +1,34 @@ +/* + * 32-bit version of ntdll structures + * + * Copyright 2021 Alexandre Julliard + * + * 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 + */ + +#ifndef __WOW64_STRUCT32_H +#define __WOW64_STRUCT32_H + +typedef struct +{ + ULONG Length; + ULONG RootDirectory; + ULONG ObjectName; + ULONG Attributes; + ULONG SecurityDescriptor; + ULONG SecurityQualityOfService; +} OBJECT_ATTRIBUTES32; + +#endif /* __WOW64_STRUCT32_H */ diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c new file mode 100644 index 00000000000..d61eed0a22d --- /dev/null +++ b/dlls/wow64/sync.c @@ -0,0 +1,133 @@ +/* + * WoW64 synchronization objects and functions + * + * Copyright 2021 Alexandre Julliard + * + * 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 <stdarg.h> + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winnt.h" +#include "winternl.h" +#include "wow64_private.h" + + +/********************************************************************** + * wow64_NtClearEvent + */ +NTSTATUS WINAPI wow64_NtClearEvent( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + + return NtClearEvent( handle ); +} + + +/********************************************************************** + * wow64_NtCreateEvent + */ +NTSTATUS WINAPI wow64_NtCreateEvent( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + EVENT_TYPE type = get_ulong( &args ); + BOOLEAN state = get_ulong( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtCreateEvent( &handle, access, objattr_32to64( &attr, attr32 ), type, state ); + put_handle( handle_ptr, handle ); + return status; +} + + +/********************************************************************** + * wow64_NtOpenEvent + */ +NTSTATUS WINAPI wow64_NtOpenEvent( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtOpenEvent( &handle, access, objattr_32to64( &attr, attr32 )); + put_handle( handle_ptr, handle ); + return status; +} + + +/********************************************************************** + * wow64_NtPulseEvent + */ +NTSTATUS WINAPI wow64_NtPulseEvent( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + LONG *prev_state = get_ptr( &args ); + + return NtPulseEvent( handle, prev_state ); +} + + +/********************************************************************** + * wow64_NtQueryEvent + */ +NTSTATUS WINAPI wow64_NtQueryEvent( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + EVENT_INFORMATION_CLASS class = get_ulong( &args ); + void *info = get_ptr( &args ); + ULONG len = get_ulong( &args ); + ULONG *retlen = get_ptr( &args ); + + return NtQueryEvent( handle, class, info, len, retlen ); +} + + +/********************************************************************** + * wow64_NtResetEvent + */ +NTSTATUS WINAPI wow64_NtResetEvent( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + LONG *prev_state = get_ptr( &args ); + + return NtResetEvent( handle, prev_state ); +} + + +/********************************************************************** + * wow64_NtSetEvent + */ +NTSTATUS WINAPI wow64_NtSetEvent( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + LONG *prev_state = get_ptr( &args ); + + return NtSetEvent( handle, prev_state ); +} diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index 583af0db476..df9da2261bb 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -25,15 +25,22 @@ SYSCALL_ENTRY( NtAddAtom ) \ SYSCALL_ENTRY( NtAllocateLocallyUniqueId ) \ SYSCALL_ENTRY( NtAllocateUuids ) \ + SYSCALL_ENTRY( NtClearEvent ) \ SYSCALL_ENTRY( NtClose ) \ + SYSCALL_ENTRY( NtCreateEvent ) \ SYSCALL_ENTRY( NtDeleteAtom ) \ SYSCALL_ENTRY( NtFindAtom ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ + SYSCALL_ENTRY( NtOpenEvent ) \ + SYSCALL_ENTRY( NtPulseEvent ) \ SYSCALL_ENTRY( NtQueryDefaultLocale ) \ SYSCALL_ENTRY( NtQueryDefaultUILanguage ) \ + SYSCALL_ENTRY( NtQueryEvent ) \ SYSCALL_ENTRY( NtQueryInformationAtom ) \ SYSCALL_ENTRY( NtQueryInstallUILanguage ) \ + SYSCALL_ENTRY( NtResetEvent ) \ SYSCALL_ENTRY( NtSetDefaultLocale ) \ - SYSCALL_ENTRY( NtSetDefaultUILanguage ) + SYSCALL_ENTRY( NtSetDefaultUILanguage ) \ + SYSCALL_ENTRY( NtSetEvent ) #endif /* __WOW64_SYSCALL_H */ diff --git a/dlls/wow64/wow64_private.h b/dlls/wow64/wow64_private.h index c441f1bf481..affd39df03b 100644 --- a/dlls/wow64/wow64_private.h +++ b/dlls/wow64/wow64_private.h @@ -22,6 +22,7 @@ #define __WOW64_PRIVATE_H #include "syscall.h" +#include "struct32.h" #define SYSCALL_ENTRY(func) extern NTSTATUS WINAPI wow64_ ## func( UINT *args ) DECLSPEC_HIDDEN; ALL_SYSCALLS @@ -30,6 +31,13 @@ ALL_SYSCALLS extern USHORT native_machine DECLSPEC_HIDDEN; extern USHORT current_machine DECLSPEC_HIDDEN; +struct object_attr64 +{ + OBJECT_ATTRIBUTES attr; + UNICODE_STRING str; + SECURITY_DESCRIPTOR sd; +}; + static inline void *get_rva( HMODULE module, DWORD va ) { return (void *)((char *)module + va); @@ -53,4 +61,59 @@ static inline ULONG get_ulong( UINT **args ) { return *(*args)++; } static inline HANDLE get_handle( UINT **args ) { return LongToHandle( *(*args)++ ); } static inline void *get_ptr( UINT **args ) { return ULongToPtr( *(*args)++ ); } +static inline UNICODE_STRING *unicode_str_32to64( UNICODE_STRING *str, const UNICODE_STRING32 *str32 ) +{ + if (!str32) return NULL; + str->Length = str32->Length; + str->MaximumLength = str32->MaximumLength; + str->Buffer = ULongToPtr( str32->Buffer ); + return str; +} + +static inline SECURITY_DESCRIPTOR *secdesc_32to64( SECURITY_DESCRIPTOR *out, const SECURITY_DESCRIPTOR *in ) +{ + /* relative descr has the same layout for 32 and 64 */ + const SECURITY_DESCRIPTOR_RELATIVE *sd = (const SECURITY_DESCRIPTOR_RELATIVE *)in; + + if (!in) return NULL; + out->Revision = sd->Revision; + out->Sbz1 = sd->Sbz1; + out->Control = sd->Control & ~SE_SELF_RELATIVE; + if (sd->Control & SE_SELF_RELATIVE) + { + if (sd->Owner) out->Owner = (PSID)((BYTE *)sd + sd->Owner); + if (sd->Group) out->Group = (PSID)((BYTE *)sd + sd->Group); + if ((sd->Control & SE_SACL_PRESENT) && sd->Sacl) out->Sacl = (PSID)((BYTE *)sd + sd->Sacl); + if ((sd->Control & SE_DACL_PRESENT) && sd->Dacl) out->Dacl = (PSID)((BYTE *)sd + sd->Dacl); + } + else + { + out->Owner = ULongToPtr( sd->Owner ); + out->Group = ULongToPtr( sd->Group ); + if (sd->Control & SE_SACL_PRESENT) out->Sacl = ULongToPtr( sd->Sacl ); + if (sd->Control & SE_DACL_PRESENT) out->Dacl = ULongToPtr( sd->Dacl ); + } + return out; +} + +static inline OBJECT_ATTRIBUTES *objattr_32to64( struct object_attr64 *out, const OBJECT_ATTRIBUTES32 *in ) +{ + memset( out, 0, sizeof(*out) ); + if (!in) return NULL; + if (in->Length != sizeof(*in)) return &out->attr; + + out->attr.Length = sizeof(out->attr); + out->attr.RootDirectory = LongToHandle( in->RootDirectory ); + out->attr.Attributes = in->Attributes; + out->attr.ObjectName = unicode_str_32to64( &out->str, ULongToPtr( in->ObjectName )); + out->attr.SecurityQualityOfService = ULongToPtr( in->SecurityQualityOfService ); + out->attr.SecurityDescriptor = secdesc_32to64( &out->sd, ULongToPtr( in->SecurityDescriptor )); + return &out->attr; +} + +static inline void put_handle( ULONG *handle32, HANDLE handle ) +{ + *handle32 = HandleToULong( handle ); +} + #endif /* __WOW64_PRIVATE_H */
1
0
0
0
Alexandre Julliard : ntdll: Always clear the returned handle in Nt object functions.
by Alexandre Julliard
23 Jul '21
23 Jul '21
Module: wine Branch: master Commit: 3fb4d1f779770eab44d3f56fb9e95899b3791ca5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3fb4d1f779770eab44d3f56f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 23 11:14:08 2021 +0200 ntdll: Always clear the returned handle in Nt object functions. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/info.c | 9 +- dlls/ntdll/tests/om.c | 310 +++++++++++++++++++++++++++++++++++++++++++-- dlls/ntdll/unix/file.c | 5 +- dlls/ntdll/unix/process.c | 2 + dlls/ntdll/unix/registry.c | 9 +- dlls/ntdll/unix/security.c | 5 + dlls/ntdll/unix/server.c | 2 + dlls/ntdll/unix/sync.c | 37 ++++-- dlls/ntdll/unix/thread.c | 2 + 9 files changed, 354 insertions(+), 27 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=3fb4d1f779770eab44d3…
1
0
0
0
Francois Gouget : oleaut32/tests: Show the input string when VarFormatCurrency() fails.
by Alexandre Julliard
23 Jul '21
23 Jul '21
Module: wine Branch: master Commit: b0a7a6527c57d6c0b2266fb70f66f01f975162b3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b0a7a6527c57d6c0b2266fb7…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Jul 23 13:19:12 2021 +0200 oleaut32/tests: Show the input string when VarFormatCurrency() fails. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/varformat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c index d1951b85a61..55190574ca9 100644 --- a/dlls/oleaut32/tests/varformat.c +++ b/dlls/oleaut32/tests/varformat.c @@ -639,14 +639,14 @@ static void test_VarFormatCurrency(void) V_VT(&in) = VT_BSTR; V_BSTR(&in) = str; hr = VarFormatCurrency(&in, 1, -2, -2, -2, 0, &str2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#x for %s\n", hr, wine_dbgstr_w(str)); ok(lstrcmpW(str, str2), "Expected different string.\n"); SysFreeString(str2); V_VT(&in) = VT_BSTR | VT_BYREF; V_BSTRREF(&in) = &str; hr = VarFormatCurrency(&in, 1, -2, -2, -2, 0, &str2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#x for %s\n", hr, wine_dbgstr_w(str)); ok(lstrcmpW(str, str2), "Expected different string.\n"); SysFreeString(str);
1
0
0
0
Gerald Pfeifer : nsiproxy: Include sys/socket.h.
by Alexandre Julliard
23 Jul '21
23 Jul '21
Module: wine Branch: master Commit: 49a1f9cf282ed38c7b1e4d584e06cb06c0c01f9c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=49a1f9cf282ed38c7b1e4d58…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Thu Jul 22 12:21:43 2021 +0200 nsiproxy: Include sys/socket.h. This addresses invalid use of undefined type 'struct sock addr' and AF_INET being unknown when building on FreeBSD 11.x. Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/nsiproxy.sys/ip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/nsiproxy.sys/ip.c b/dlls/nsiproxy.sys/ip.c index ab1b6294bea..93fdefa24cc 100644 --- a/dlls/nsiproxy.sys/ip.c +++ b/dlls/nsiproxy.sys/ip.c @@ -21,6 +21,10 @@ #include "config.h" #include <stdarg.h> +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif + #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
73
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Results per page:
10
25
50
100
200