winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2019
----- 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
895 discussions
Start a n
N
ew thread
Alexandre Julliard : kernelbase: Implement GetSystemWow64Directory2().
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: bf039539426aebaa352d17f04f7d21ac5fbc79de URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bf039539426aebaa352d17f0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 12 21:51:23 2019 +0100 kernelbase: Implement GetSystemWow64Directory2(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/file.c | 66 ++++++++++++++++++++++++++++++++--------- dlls/kernelbase/kernelbase.spec | 4 +-- include/winbase.h | 3 ++ include/winnt.h | 1 + 4 files changed, 58 insertions(+), 16 deletions(-) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index af21687aa3..472f1ec964 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -57,6 +57,19 @@ static void WINAPI read_write_apc( void *apc_user, PIO_STATUS_BLOCK io, ULONG re func( RtlNtStatusToDosError( io->u.Status ), io->Information, (LPOVERLAPPED)io ); } +static const WCHAR *get_machine_wow64_dir( WORD machine ) +{ + switch (machine) + { + case IMAGE_FILE_MACHINE_TARGET_HOST: return system_dir; + case IMAGE_FILE_MACHINE_I386: return L"C:\\windows\\syswow64"; + case IMAGE_FILE_MACHINE_ARMNT: return L"C:\\windows\\sysarm32"; + case IMAGE_FILE_MACHINE_AMD64: return L"C:\\windows\\sysx8664"; + case IMAGE_FILE_MACHINE_ARM64: return L"C:\\windows\\sysarm64"; + default: return NULL; + } +} + /*********************************************************************** * Operations on file names @@ -194,6 +207,21 @@ done: } +/*********************************************************************** + * copy_filename + */ +static DWORD copy_filename( const WCHAR *name, WCHAR *buffer, DWORD len ) +{ + UINT ret = lstrlenW( name ) + 1; + if (buffer && len >= ret) + { + lstrcpyW( buffer, name ); + ret--; + } + return ret; +} + + /*********************************************************************** * copy_filename_WtoA * @@ -1211,13 +1239,7 @@ UINT WINAPI DECLSPEC_HOTPATCH GetSystemDirectoryA( LPSTR path, UINT count ) */ UINT WINAPI DECLSPEC_HOTPATCH GetSystemDirectoryW( LPWSTR path, UINT count ) { - UINT len = lstrlenW( system_dir ) + 1; - if (path && count >= len) - { - lstrcpyW( path, system_dir ); - len--; - } - return len; + return copy_filename( system_dir, path, count ); } @@ -1239,6 +1261,28 @@ UINT WINAPI DECLSPEC_HOTPATCH GetSystemWindowsDirectoryW( LPWSTR path, UINT coun } +/*********************************************************************** + * GetSystemWow64Directory2A (kernelbase.@) + */ +UINT WINAPI DECLSPEC_HOTPATCH GetSystemWow64Directory2A( LPSTR path, UINT count, WORD machine ) +{ + const WCHAR *dir = get_machine_wow64_dir( machine ); + + return dir ? copy_filename_WtoA( dir, path, count ) : 0; +} + + +/*********************************************************************** + * GetSystemWow64Directory2W (kernelbase.@) + */ +UINT WINAPI DECLSPEC_HOTPATCH GetSystemWow64Directory2W( LPWSTR path, UINT count, WORD machine ) +{ + const WCHAR *dir = get_machine_wow64_dir( machine ); + + return dir ? copy_filename( dir, path, count ) : 0; +} + + /*********************************************************************** * GetTempFileNameA (kernelbase.@) */ @@ -1413,13 +1457,7 @@ UINT WINAPI DECLSPEC_HOTPATCH GetWindowsDirectoryA( LPSTR path, UINT count ) */ UINT WINAPI DECLSPEC_HOTPATCH GetWindowsDirectoryW( LPWSTR path, UINT count ) { - UINT len = lstrlenW( windows_dir ) + 1; - if (path && count >= len) - { - lstrcpyW( path, windows_dir ); - len--; - } - return len; + return copy_filename( windows_dir, path, count ); } diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 5b2c5ef2e0..40c82f464e 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -701,8 +701,8 @@ @ stdcall GetSystemTimes(ptr ptr ptr) kernel32.GetSystemTimes @ stdcall GetSystemWindowsDirectoryA(ptr long) @ stdcall GetSystemWindowsDirectoryW(ptr long) -# @ stub GetSystemWow64Directory2A -# @ stub GetSystemWow64Directory2W +@ stdcall GetSystemWow64Directory2A(ptr long long) +@ stdcall GetSystemWow64Directory2W(ptr long long) @ stdcall GetSystemWow64DirectoryA(ptr long) kernel32.GetSystemWow64DirectoryA @ stdcall GetSystemWow64DirectoryW(ptr long) kernel32.GetSystemWow64DirectoryW # @ stub GetTargetPlatformContext diff --git a/include/winbase.h b/include/winbase.h index 2d9fafa52d..8b30c5a69a 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2289,6 +2289,9 @@ WINBASEAPI VOID WINAPI GetSystemTimePreciseAsFileTime(LPFILETIME); WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryA(LPSTR,UINT); WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR,UINT); #define GetSystemWindowsDirectory WINELIB_NAME_AW(GetSystemWindowsDirectory) +WINBASEAPI UINT WINAPI GetSystemWow64Directory2A(LPSTR,UINT,WORD); +WINBASEAPI UINT WINAPI GetSystemWow64Directory2W(LPWSTR,UINT,WORD); +#define GetSystemWow64Directory2 WINELIB_NAME_AW(GetSystemWow64Directory2) WINBASEAPI UINT WINAPI GetSystemWow64DirectoryA(LPSTR,UINT); WINBASEAPI UINT WINAPI GetSystemWow64DirectoryW(LPWSTR,UINT); #define GetSystemWow64Directory WINELIB_NAME_AW(GetSystemWow64Directory) diff --git a/include/winnt.h b/include/winnt.h index 9c39eb7e4d..d18b2e03b4 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2874,6 +2874,7 @@ typedef struct _IMAGE_VXD_HEADER { /* These are the settings of the Machine field. */ #define IMAGE_FILE_MACHINE_UNKNOWN 0 +#define IMAGE_FILE_MACHINE_TARGET_HOST 0x0001 #define IMAGE_FILE_MACHINE_I860 0x014d #define IMAGE_FILE_MACHINE_I386 0x014c #define IMAGE_FILE_MACHINE_R3000 0x0162
1
0
0
0
Alexandre Julliard : kernel32: Move support for starting Unix processes to ntdll.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: eee3a4e84a07c50c65c3a7619247f62dbca826b6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eee3a4e84a07c50c65c3a761…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 12 21:48:49 2019 +0100 kernel32: Move support for starting Unix processes to ntdll. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 364 ++---------------------------------------------- dlls/ntdll/env.c | 68 +++++++++ dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/process.c | 105 +++++++++++++- 4 files changed, 184 insertions(+), 354 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=eee3a4e84a07c50c65c3…
1
0
0
0
Alexandre Julliard : kernel32: Use RtlCreateUserProcess() to start new processes.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 1deefb84ee2b6d326b5ae1bad592a72c69a89b36 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1deefb84ee2b6d326b5ae1ba…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 12 21:41:06 2019 +0100 kernel32: Use RtlCreateUserProcess() to start new processes. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 1052 ++++++----------------------------------------- dlls/ntdll/process.c | 3 +- 2 files changed, 121 insertions(+), 934 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=1deefb84ee2b6d326b5a…
1
0
0
0
Piotr Caban : winebus: Fix DEVICE_RELATIONS content on device removal.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: c3bfc1b7264277395f2bbe9b2c059d34f4dffae3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c3bfc1b7264277395f2bbe9b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Nov 12 20:03:31 2019 +0100 winebus: Fix DEVICE_RELATIONS content on device removal. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus.h | 1 + dlls/winebus.sys/bus_iohid.c | 1 + dlls/winebus.sys/bus_sdl.c | 2 ++ dlls/winebus.sys/bus_udev.c | 2 ++ dlls/winebus.sys/main.c | 14 ++++++++++---- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/winebus.sys/bus.h b/dlls/winebus.sys/bus.h index 09666dc151..041a37ad04 100644 --- a/dlls/winebus.sys/bus.h +++ b/dlls/winebus.sys/bus.h @@ -45,6 +45,7 @@ DEVICE_OBJECT *bus_create_hid_device(const WCHAR *busidW, WORD vid, WORD pid, WORD input, DWORD version, DWORD uid, const WCHAR *serialW, BOOL is_gamepad, const platform_vtbl *vtbl, DWORD platform_data_size) DECLSPEC_HIDDEN; DEVICE_OBJECT *bus_find_hid_device(const platform_vtbl *vtbl, void *platform_dev) DECLSPEC_HIDDEN; +void bus_unlink_hid_device(DEVICE_OBJECT *device) DECLSPEC_HIDDEN; void bus_remove_hid_device(DEVICE_OBJECT *device) DECLSPEC_HIDDEN; void process_hid_report(DEVICE_OBJECT *device, BYTE *report, DWORD length) DECLSPEC_HIDDEN; DEVICE_OBJECT* bus_enumerate_hid_devices(const platform_vtbl *vtbl, enum_func function, void* context) DECLSPEC_HIDDEN; diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c index ed91b51fc8..df578b4b9d 100644 --- a/dlls/winebus.sys/bus_iohid.c +++ b/dlls/winebus.sys/bus_iohid.c @@ -368,6 +368,7 @@ static void handle_RemovalCallback(void *context, IOReturn result, void *sender, device = bus_find_hid_device(&iohid_vtbl, IOHIDDevice); if (device) { + bus_unlink_hid_device(device); IoInvalidateDeviceRelations(bus_pdo, BusRelations); bus_remove_hid_device(device); } diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index 61651c92f6..7a2069fafe 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -899,6 +899,7 @@ static void try_remove_device(SDL_JoystickID id) sdl_controller = private->sdl_controller; sdl_haptic = private->sdl_haptic; + bus_unlink_hid_device(device); IoInvalidateDeviceRelations(bus_pdo, BusRelations); bus_remove_hid_device(device); @@ -988,6 +989,7 @@ static void try_add_device(unsigned int index) if (!rc) { ERR("Building report descriptor failed, removing device\n"); + bus_unlink_hid_device(device); bus_remove_hid_device(device); HeapFree(GetProcessHeap(), 0, serial); return; diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 239051723c..24d7961b06 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -1259,6 +1259,7 @@ static void try_add_device(struct udev_device *dev) ERR("Building report descriptor failed, removing device\n"); close(fd); udev_device_unref(dev); + bus_unlink_hid_device(device); bus_remove_hid_device(device); HeapFree(GetProcessHeap(), 0, serial); return; @@ -1293,6 +1294,7 @@ static void try_remove_device(struct udev_device *dev) #endif if (!device) return; + bus_unlink_hid_device(device); IoInvalidateDeviceRelations(bus_pdo, BusRelations); private = impl_from_DEVICE_OBJECT(device); diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index 7b05d4ce84..8bba968202 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -346,6 +346,16 @@ DEVICE_OBJECT* bus_enumerate_hid_devices(const platform_vtbl *vtbl, enum_func fu return ret; } +void bus_unlink_hid_device(DEVICE_OBJECT *device) +{ + struct device_extension *ext = (struct device_extension *)device->DeviceExtension; + struct pnp_device *pnp_device = ext->pnp_device; + + EnterCriticalSection(&device_list_cs); + list_remove(&pnp_device->entry); + LeaveCriticalSection(&device_list_cs); +} + void bus_remove_hid_device(DEVICE_OBJECT *device) { struct device_extension *ext = (struct device_extension *)device->DeviceExtension; @@ -355,10 +365,6 @@ void bus_remove_hid_device(DEVICE_OBJECT *device) TRACE("(%p)\n", device); - EnterCriticalSection(&device_list_cs); - list_remove(&pnp_device->entry); - LeaveCriticalSection(&device_list_cs); - /* Cancel pending IRPs */ EnterCriticalSection(&ext->report_cs); while ((entry = RemoveHeadList(&ext->irp_queue)) != &ext->irp_queue)
1
0
0
0
Piotr Caban : winebus: Reference PDOs added to DEVICE_RELATIONS structure.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: cc395391ed51e55a8f13150a4eb62f50417d1436 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cc395391ed51e55a8f13150a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Nov 12 19:02:20 2019 +0100 winebus: Reference PDOs added to DEVICE_RELATIONS structure. Fixes crash caused by 81cda52d153. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver.c | 2 -- dlls/winebus.sys/main.c | 19 +++++++++++++++++++ include/ddk/wdm.h | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 67f22a4b2b..a0f63ade79 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -62,8 +62,6 @@ static void *create_caller_thread; static PETHREAD create_irp_thread; -void WINAPI ObfReferenceObject( void *obj ); - NTSTATUS WINAPI ZwQueryInformationProcess(HANDLE,PROCESSINFOCLASS,void*,ULONG,ULONG*); static void kvprintf(const char *format, __ms_va_list ap) diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index b4599b6889..7b05d4ce84 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -31,6 +31,7 @@ #include "ddk/wdm.h" #include "ddk/hidport.h" #include "ddk/hidtypes.h" +#include "wine/asm.h" #include "wine/debug.h" #include "wine/unicode.h" #include "wine/list.h" @@ -41,6 +42,23 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay); WINE_DECLARE_DEBUG_CHANNEL(hid_report); +#if defined(__i386__) && !defined(_WIN32) + +extern void * WINAPI wrap_fastcall_func1( void *func, const void *a ); +__ASM_STDCALL_FUNC( wrap_fastcall_func1, 8, + "popl %ecx\n\t" + "popl %eax\n\t" + "xchgl (%esp),%ecx\n\t" + "jmp *%eax" ); + +#define call_fastcall_func1(func,a) wrap_fastcall_func1(func,a) + +#else + +#define call_fastcall_func1(func,a) func(a) + +#endif + struct product_desc { WORD vid; @@ -381,6 +399,7 @@ static NTSTATUS build_device_relations(DEVICE_RELATIONS **devices) LIST_FOR_EACH_ENTRY(ptr, &pnp_devset, struct pnp_device, entry) { (*devices)->Objects[i] = ptr->device; + call_fastcall_func1(ObfReferenceObject, ptr->device); i++; } LeaveCriticalSection(&device_list_cs); diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 21c9539c0a..a092216b82 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1665,6 +1665,7 @@ static inline void *MmGetSystemAddressForMdlSafe(MDL *mdl, ULONG priority) return MmMapLockedPagesSpecifyCache(mdl, KernelMode, MmCached, NULL, FALSE, priority); } +void FASTCALL ObfReferenceObject(void*); void WINAPI ObDereferenceObject(void*); USHORT WINAPI ObGetFilterVersion(void); NTSTATUS WINAPI ObRegisterCallbacks(POB_CALLBACK_REGISTRATION*, void**);
1
0
0
0
João Diogo Ferreira : kernel32: Handle GEOCLASS_REGION in Get/SetUserGeoID().
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: c2485bb12e36f99c6e26121bfd3002465c2e3fd7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c2485bb12e36f99c6e26121b…
Author: João Diogo Ferreira <devilj(a)outlook.pt> Date: Wed Nov 6 23:32:48 2019 +0000 kernel32: Handle GEOCLASS_REGION in Get/SetUserGeoID(). Signed-off-by: João Diogo Craveiro Ferreira <devilj(a)outlook.pt> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/locale.c | 62 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 884709730c..42f47c4211 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -3996,12 +3996,22 @@ static const struct geoinfo_t *get_geoinfo_dataptr(GEOID geoid) /****************************************************************************** * GetUserGeoID (KERNEL32.@) + * + * Retrieves the ID of the user's geographic nation or region. + * + * PARAMS + * geoclass [I] One of GEOCLASS_NATION or GEOCLASS_REGION (SYSGEOCLASS enum from "winnls.h"). + * + * RETURNS + * SUCCESS: The ID of the specified geographic class. + * FAILURE: GEOID_NOT_AVAILABLE. */ GEOID WINAPI GetUserGeoID(GEOCLASS geoclass) { GEOID ret = GEOID_NOT_AVAILABLE; static const WCHAR geoW[] = {'G','e','o',0}; static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; + static const WCHAR regionW[] = {'R','e','g','i','o','n',0}; WCHAR bufferW[40], *end; HANDLE hkey, hsubkey = 0; UNICODE_STRING keyW; @@ -4009,20 +4019,26 @@ GEOID WINAPI GetUserGeoID(GEOCLASS geoclass) DWORD count = sizeof(bufferW); RtlInitUnicodeString(&keyW, nationW); - if (!(hkey = create_registry_key())) return ret; - - switch (geoclass) { + switch (geoclass) + { case GEOCLASS_NATION: - if ((hsubkey = NLS_RegOpenKey(hkey, geoW))) - { - if ((NtQueryValueKey(hsubkey, &keyW, KeyValuePartialInformation, - bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength) - ret = strtolW((const WCHAR*)info->Data, &end, 10); - } + RtlInitUnicodeString(&keyW, nationW); break; case GEOCLASS_REGION: - FIXME("GEOCLASS_REGION not handled yet\n"); + RtlInitUnicodeString(&keyW, regionW); break; + default: + WARN("Unknown geoclass %d\n", geoclass); + return ret; + } + + if (!(hkey = create_registry_key())) return ret; + + if ((hsubkey = NLS_RegOpenKey(hkey, geoW))) + { + if((NtQueryValueKey(hsubkey, &keyW, KeyValuePartialInformation, + bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength) + ret = strtolW((const WCHAR*)info->Data, &end, 10); } NtClose(hkey); @@ -4032,17 +4048,34 @@ GEOID WINAPI GetUserGeoID(GEOCLASS geoclass) /****************************************************************************** * SetUserGeoID (KERNEL32.@) + * + * Sets the ID of the user's geographic location. + * + * PARAMS + * geoid [I] The geographic ID to be set. + * + * RETURNS + * SUCCESS: TRUE. + * FAILURE: FALSE. GetLastError() will return ERROR_INVALID_PARAMETER if the ID was invalid. */ BOOL WINAPI SetUserGeoID(GEOID geoid) { + const struct geoinfo_t *geoinfo = get_geoinfo_dataptr(geoid); static const WCHAR geoW[] = {'G','e','o',0}; static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; + static const WCHAR regionW[] = {'R','e','g','i','o','n',0}; static const WCHAR formatW[] = {'%','i',0}; UNICODE_STRING nameW, keyW; WCHAR bufferW[10]; OBJECT_ATTRIBUTES attr; HANDLE hkey; + if (!geoinfo) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (!(hkey = create_registry_key())) return FALSE; attr.Length = sizeof(attr); @@ -4052,16 +4085,19 @@ BOOL WINAPI SetUserGeoID(GEOID geoid) attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; RtlInitUnicodeString(&nameW, geoW); - RtlInitUnicodeString(&keyW, nationW); - if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS) + if (geoinfo->kind == LOCATION_NATION) + RtlInitUnicodeString(&keyW, nationW); + else + RtlInitUnicodeString(&keyW, regionW); + if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS) { NtClose(attr.RootDirectory); return FALSE; } - sprintfW(bufferW, formatW, geoid); + sprintfW(bufferW, formatW, geoinfo->id); NtSetValueKey(hkey, &keyW, 0, REG_SZ, bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR)); NtClose(attr.RootDirectory); NtClose(hkey);
1
0
0
0
João Diogo Ferreira : kernel32: Move Get/SetUserGeoID() to after the geoinfo struct.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: dd505fab260491f5606070b3dcb8e9c2f15d3b63 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dd505fab260491f5606070b3…
Author: João Diogo Ferreira <devilj(a)outlook.pt> Date: Thu Nov 7 14:04:28 2019 +0000 kernel32: Move Get/SetUserGeoID() to after the geoinfo struct. Signed-off-by: João Diogo Craveiro Ferreira <devilj(a)outlook.pt> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/locale.c | 149 ++++++++++++++++++++++++------------------------- 1 file changed, 74 insertions(+), 75 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index c690aa8d5e..884709730c 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -3643,81 +3643,6 @@ BOOL WINAPI InvalidateNLSCache(void) return FALSE; } -/****************************************************************************** - * GetUserGeoID (KERNEL32.@) - */ -GEOID WINAPI GetUserGeoID( GEOCLASS GeoClass ) -{ - GEOID ret = GEOID_NOT_AVAILABLE; - static const WCHAR geoW[] = {'G','e','o',0}; - static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; - WCHAR bufferW[40], *end; - DWORD count; - HANDLE hkey, hSubkey = 0; - UNICODE_STRING keyW; - const KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)bufferW; - RtlInitUnicodeString( &keyW, nationW ); - count = sizeof(bufferW); - - if(!(hkey = create_registry_key())) return ret; - - switch( GeoClass ){ - case GEOCLASS_NATION: - if ((hSubkey = NLS_RegOpenKey(hkey, geoW))) - { - if((NtQueryValueKey(hSubkey, &keyW, KeyValuePartialInformation, - bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength) - ret = strtolW((LPCWSTR)info->Data, &end, 10); - } - break; - case GEOCLASS_REGION: - FIXME("GEOCLASS_REGION not handled yet\n"); - break; - } - - NtClose(hkey); - if (hSubkey) NtClose(hSubkey); - return ret; -} - -/****************************************************************************** - * SetUserGeoID (KERNEL32.@) - */ -BOOL WINAPI SetUserGeoID( GEOID GeoID ) -{ - static const WCHAR geoW[] = {'G','e','o',0}; - static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; - static const WCHAR formatW[] = {'%','i',0}; - UNICODE_STRING nameW,keyW; - WCHAR bufferW[10]; - OBJECT_ATTRIBUTES attr; - HANDLE hkey; - - if(!(hkey = create_registry_key())) return FALSE; - - attr.Length = sizeof(attr); - attr.RootDirectory = hkey; - attr.ObjectName = &nameW; - attr.Attributes = 0; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - RtlInitUnicodeString( &nameW, geoW ); - RtlInitUnicodeString( &keyW, nationW ); - - if (NtCreateKey( &hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL ) != STATUS_SUCCESS) - - { - NtClose(attr.RootDirectory); - return FALSE; - } - - sprintfW(bufferW, formatW, GeoID); - NtSetValueKey(hkey, &keyW, 0, REG_SZ, bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR)); - NtClose(attr.RootDirectory); - NtClose(hkey); - return TRUE; -} - /****************************************************************************** * EnumUILanguagesA (KERNEL32.@) */ @@ -4069,6 +3994,80 @@ static const struct geoinfo_t *get_geoinfo_dataptr(GEOID geoid) return NULL; } +/****************************************************************************** + * GetUserGeoID (KERNEL32.@) + */ +GEOID WINAPI GetUserGeoID(GEOCLASS geoclass) +{ + GEOID ret = GEOID_NOT_AVAILABLE; + static const WCHAR geoW[] = {'G','e','o',0}; + static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; + WCHAR bufferW[40], *end; + HANDLE hkey, hsubkey = 0; + UNICODE_STRING keyW; + const KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)bufferW; + DWORD count = sizeof(bufferW); + RtlInitUnicodeString(&keyW, nationW); + + if (!(hkey = create_registry_key())) return ret; + + switch (geoclass) { + case GEOCLASS_NATION: + if ((hsubkey = NLS_RegOpenKey(hkey, geoW))) + { + if ((NtQueryValueKey(hsubkey, &keyW, KeyValuePartialInformation, + bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength) + ret = strtolW((const WCHAR*)info->Data, &end, 10); + } + break; + case GEOCLASS_REGION: + FIXME("GEOCLASS_REGION not handled yet\n"); + break; + } + + NtClose(hkey); + if (hsubkey) NtClose(hsubkey); + return ret; +} + +/****************************************************************************** + * SetUserGeoID (KERNEL32.@) + */ +BOOL WINAPI SetUserGeoID(GEOID geoid) +{ + static const WCHAR geoW[] = {'G','e','o',0}; + static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; + static const WCHAR formatW[] = {'%','i',0}; + UNICODE_STRING nameW, keyW; + WCHAR bufferW[10]; + OBJECT_ATTRIBUTES attr; + HANDLE hkey; + + if (!(hkey = create_registry_key())) return FALSE; + + attr.Length = sizeof(attr); + attr.RootDirectory = hkey; + attr.ObjectName = &nameW; + attr.Attributes = 0; + attr.SecurityDescriptor = NULL; + attr.SecurityQualityOfService = NULL; + RtlInitUnicodeString(&nameW, geoW); + RtlInitUnicodeString(&keyW, nationW); + + if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS) + + { + NtClose(attr.RootDirectory); + return FALSE; + } + + sprintfW(bufferW, formatW, geoid); + NtSetValueKey(hkey, &keyW, 0, REG_SZ, bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR)); + NtClose(attr.RootDirectory); + NtClose(hkey); + return TRUE; +} + /****************************************************************************** * GetGeoInfoW (KERNEL32.@) */
1
0
0
0
Dmitry Timoshkov : kernelbase: Implement EqualDomainSid.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: fde235da03de45c8520c069cd7c27ca1f7b6167c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fde235da03de45c8520c069c…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Nov 8 14:12:52 2019 +0800 kernelbase: Implement EqualDomainSid. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/advapi32.spec | 2 +- dlls/advapi32/tests/security.c | 78 ++++++++++++++++++++++ .../api-ms-win-downlevel-advapi32-l1-1-0.spec | 2 +- .../api-ms-win-security-base-l1-1-0.spec | 2 +- .../api-ms-win-security-base-l1-2-0.spec | 2 +- dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/security.c | 55 +++++++++++++++ include/winbase.h | 1 + include/winerror.h | 2 + 9 files changed, 141 insertions(+), 5 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=fde235da03de45c8520c…
1
0
0
0
Matteo Bruni : d3dcompiler/tests: Add a small test for MinPrecision.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 27bf34bb515af6006c2cbd5a4f19bad888153802 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27bf34bb515af6006c2cbd5a…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Nov 12 19:47:29 2019 +0100 d3dcompiler/tests: Add a small test for MinPrecision. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/tests/reflection.c | 37 ++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c index 8e48d4d402..fb117fd6a9 100644 --- a/dlls/d3dcompiler_43/tests/reflection.c +++ b/dlls/d3dcompiler_43/tests/reflection.c @@ -296,16 +296,31 @@ static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_vs_resultout[] {"SV_InstanceID", 0, 6, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_UINT32, 0x1, 0xe, 0}, }; +struct D3D11_SIGNATURE_PARAMETER_DESC_46 +{ + const char *SemanticName; + UINT SemanticIndex; + UINT Register; + D3D_NAME SystemValueType; + D3D_REGISTER_COMPONENT_TYPE ComponentType; + BYTE Mask; + BYTE ReadWriteMask; + UINT Stream; + D3D_MIN_PRECISION MinPrecision; +}; + static void test_reflection_desc_vs(void) { - HRESULT hr; - ULONG count; - ID3D11ShaderReflection *ref11; - D3D11_SHADER_DESC sdesc11 = {0}; - D3D11_SIGNATURE_PARAMETER_DESC desc = {0}; + struct D3D11_SIGNATURE_PARAMETER_DESC_46 desc_46 = {0}; const D3D11_SIGNATURE_PARAMETER_DESC *pdesc; - UINT ret; + D3D11_SIGNATURE_PARAMETER_DESC desc = {0}; + D3D_MIN_PRECISION expected_min_prec; + D3D11_SHADER_DESC sdesc11 = {0}; + ID3D11ShaderReflection *ref11; unsigned int i; + ULONG count; + HRESULT hr; + UINT ret; hr = pD3DReflect(test_reflection_desc_vs_blob, test_reflection_desc_vs_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11); ok(hr == S_OK, "D3DReflect failed %x\n", hr); @@ -368,6 +383,16 @@ static void test_reflection_desc_vs(void) ok(ret == 0, "GetMovcInstructionCount failed, got %u, expected %u\n", ret, 0); /* GetIn/OutputParameterDesc */ + desc_46.MinPrecision = ~0u; + hr = ref11->lpVtbl->GetInputParameterDesc(ref11, 0, (D3D11_SIGNATURE_PARAMETER_DESC *)&desc_46); +#if D3D_COMPILER_VERSION >= 46 + expected_min_prec = 0; +#else + expected_min_prec = ~0u; +#endif + ok(desc_46.MinPrecision == expected_min_prec, "Got MinPrecision %#x, expected %#x.\n", + desc_46.MinPrecision, expected_min_prec); + for (i = 0; i < ARRAY_SIZE(test_reflection_desc_vs_resultin); ++i) { pdesc = &test_reflection_desc_vs_resultin[i];
1
0
0
0
Matteo Bruni : d3dcompiler/tests: Add d3dcompiler_47 tests.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: f14962e55dc90710687647abb60bfc46c42b6eeb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f14962e55dc90710687647ab…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Nov 12 20:37:32 2019 +0100 d3dcompiler/tests: Add d3dcompiler_47 tests. Share the code with the existing d3dcompiler_43 tests. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 1 + configure.ac | 1 + dlls/d3dcompiler_43/tests/reflection.c | 44 +++++++++++++++++++++++----------- dlls/d3dcompiler_47/tests/Makefile.in | 10 ++++++++ 4 files changed, 42 insertions(+), 14 deletions(-) diff --git a/configure b/configure index ad0b149b7d..e40850201b 100755 --- a/configure +++ b/configure @@ -20255,6 +20255,7 @@ wine_fn_config_makefile dlls/d3dcompiler_43 enable_d3dcompiler_43 wine_fn_config_makefile dlls/d3dcompiler_43/tests enable_tests wine_fn_config_makefile dlls/d3dcompiler_46 enable_d3dcompiler_46 wine_fn_config_makefile dlls/d3dcompiler_47 enable_d3dcompiler_47 +wine_fn_config_makefile dlls/d3dcompiler_47/tests enable_tests wine_fn_config_makefile dlls/d3dim enable_d3dim wine_fn_config_makefile dlls/d3drm enable_d3drm wine_fn_config_makefile dlls/d3drm/tests enable_tests diff --git a/configure.ac b/configure.ac index 4f651efbd5..c7768db9f9 100644 --- a/configure.ac +++ b/configure.ac @@ -3131,6 +3131,7 @@ WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_43) WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_43/tests) WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_46) WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_47) +WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_47/tests) WINE_CONFIG_MAKEFILE(dlls/d3dim) WINE_CONFIG_MAKEFILE(dlls/d3drm) WINE_CONFIG_MAKEFILE(dlls/d3drm/tests) diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c index 1b9d2d418d..8e48d4d402 100644 --- a/dlls/d3dcompiler_43/tests/reflection.c +++ b/dlls/d3dcompiler_43/tests/reflection.c @@ -75,11 +75,11 @@ static DWORD test_reflection_blob[] = { static void test_reflection_references(void) { - HRESULT hr; - ULONG count; ID3D11ShaderReflection *ref11, *ref11_test; - ID3D10ShaderReflection *ref10; ID3D10ShaderReflection1 *ref10_1; + ID3D10ShaderReflection *ref10; + HRESULT hr, expected; + ULONG count; hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11); ok(hr == S_OK, "D3DReflect failed, got %x, expected %x\n", hr, S_OK); @@ -100,11 +100,16 @@ static void test_reflection_references(void) ok(count == 0, "Release failed %u\n", count); /* check invalid cases */ +#if D3D_COMPILER_VERSION >= 46 + expected = E_INVALIDARG; +#else + expected = E_NOINTERFACE; +#endif hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6], &IID_ID3D10ShaderReflection, (void **)&ref10); - ok(hr == E_NOINTERFACE, "D3DReflect failed, got %x, expected %x\n", hr, E_NOINTERFACE); + ok(hr == expected, "D3DReflect failed, got %x, expected %x\n", hr, expected); hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6], &IID_ID3D10ShaderReflection1, (void **)&ref10_1); - ok(hr == E_NOINTERFACE, "D3DReflect failed, got %x, expected %x\n", hr, E_NOINTERFACE); + ok(hr == expected, "D3DReflect failed, got %x, expected %x\n", hr, expected); hr = pD3DReflect(NULL, test_reflection_blob[6], &IID_ID3D10ShaderReflection1, (void **)&ref10_1); ok(hr == D3DERR_INVALIDCALL, "D3DReflect failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL); @@ -116,20 +121,25 @@ static void test_reflection_references(void) hr = pD3DReflect(test_reflection_blob, 31, &IID_ID3D10ShaderReflection1, (void **)&ref10_1); ok(hr == D3DERR_INVALIDCALL, "D3DReflect failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL); +#if D3D_COMPILER_VERSION >= 46 + expected = D3DERR_INVALIDCALL; +#else + expected = E_FAIL; +#endif hr = pD3DReflect(test_reflection_blob, 32, &IID_ID3D10ShaderReflection1, (void **)&ref10_1); - ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL); + ok(hr == expected, "Got %x, expected %x.\n", hr, expected); hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6]-1, &IID_ID3D10ShaderReflection1, (void **)&ref10_1); - ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL); + ok(hr == expected, "Got %x, expected %x.\n", hr, expected); hr = pD3DReflect(test_reflection_blob, 31, &IID_ID3D11ShaderReflection, (void **)&ref11); - ok(hr == D3DERR_INVALIDCALL, "D3DReflect failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got %x, expected %x.\n", hr, D3DERR_INVALIDCALL); hr = pD3DReflect(test_reflection_blob, 32, &IID_ID3D11ShaderReflection, (void **)&ref11); - ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL); + ok(hr == expected, "Got %x, expected %x.\n", hr, expected); hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6]-1, &IID_ID3D11ShaderReflection, (void **)&ref11); - ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL); + ok(hr == expected, "Got %x, expected %x.\n", hr, expected); } /* @@ -1509,11 +1519,17 @@ static void test_reflection_constant_buffer(void) ok(count == 0, "Release failed %u\n", count); } -static BOOL load_d3dcompiler(void) +static BOOL load_d3dreflect(void) { +#if D3D_COMPILER_VERSION == 47 + static const char filename[] = "d3dcompiler_47.dll"; +#else + static const char filename[] = "d3dcompiler_43.dll"; +#endif HMODULE module; - if (!(module = LoadLibraryA("d3dcompiler_43.dll"))) return FALSE; + if (!(module = LoadLibraryA(filename))) + return FALSE; pD3DReflect = (void*)GetProcAddress(module, "D3DReflect"); return TRUE; @@ -1521,9 +1537,9 @@ static BOOL load_d3dcompiler(void) START_TEST(reflection) { - if (!load_d3dcompiler()) + if (!load_d3dreflect()) { - win_skip("Could not load d3dcompiler_43.dll\n"); + win_skip("Could not load DLL.\n"); return; } diff --git a/dlls/d3dcompiler_47/tests/Makefile.in b/dlls/d3dcompiler_47/tests/Makefile.in new file mode 100644 index 0000000000..a4e3798bed --- /dev/null +++ b/dlls/d3dcompiler_47/tests/Makefile.in @@ -0,0 +1,10 @@ +TESTDLL = d3dcompiler_47.dll +IMPORTS = d3d9 d3dx9 user32 +EXTRADEFS = -DD3D_COMPILER_VERSION=47 +PARENTSRC = ../../d3dcompiler_43/tests + +C_SRCS = \ + asm.c \ + blob.c \ + hlsl.c \ + reflection.c
1
0
0
0
← Newer
1
...
59
60
61
62
63
64
65
...
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200