Compare commits

..

4 Commits

Author SHA1 Message Date
Sebastian Lackner
9d13bfd569 Release 1.8.3. 2016-07-10 07:01:18 +02:00
Sebastian Lackner
739a308958 Rebase against 205228eb80089c38b25e7249073021e7806d2bfa.
[dinput-DIPROP_USERNAME]
Removed patch to implement dinput device property DIPROP_USERNAME (accepted
upstream).

[kernel32-GetFinalPathNameByHandle]
Removed patch to add support for GetFinalPathNameByHandle (accepted upstream).

[ntoskrnl-Stubs]
Removed patches for KeDelayExecutionThread and PsRemoveLoadImageNotifyRoutine
stubs (accepted upstream).

[server-Parent_Process]
Removed patch to avoid holding reference on parent process in wineserver
(accepted upstream).

[wined3d-Geforce_425M]
Removed patch to add wined3d detection for GeForce GT 425M (accepted upstream).

[winscard-SCardListReaders]
Removed patch to add stub for winscard.SCardListReadersA/W (accepted upstream).
2016-06-25 19:50:04 +02:00
Sebastian Lackner
35b9051d1c Release 1.8.2. 2016-04-19 06:34:52 +02:00
Sebastian Lackner
7e776b7a90 Rebase against 24a730187e08699b51c698d4fed58ba2947f0c5d.
[kernel32-CompareString_Length]
Removed patch to make sure CompareString aborts on first non-matching character
(accepted upstream).

[kernel32-GetLogicalProcessorInformationEx]
Removed patch to return TRUE from GetLogicalProcessorInformationEx stub
(accepted upstream).

[user32-WM_CAPTURECHANGE]
Removed patch to send WM_CAPTURECHANGE also when capture has not changed
(accepted upstream).

[wined3d-Multisampling]
Removed patch to allow to override number of quality levels for
D3DMULTISAMPLE_NONMASKABLE (fixed upstream).
2016-04-13 18:08:17 +02:00
42 changed files with 444 additions and 1991 deletions

View File

@@ -1,12 +1,12 @@
From 7cb209e122fc503190dcad411483147ebc6d6cb4 Mon Sep 17 00:00:00 2001
From 940f22fae1e118faab3aa2926d050ad3c84a3e79 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 11 Nov 2014 03:11:33 +0100
Subject: ntdll: Implement emulation of SIDT instruction when using Exagear.
---
configure.ac | 8 ++
dlls/ntdll/signal_i386.c | 224 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 232 insertions(+)
dlls/ntdll/signal_i386.c | 223 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 231 insertions(+)
diff --git a/configure.ac b/configure.ac
index 92d78a2..c88a139 100644
@@ -20,7 +20,7 @@ index 92d78a2..c88a139 100644
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support]),
[if test "x$withval" = "xno"; then ac_cv_header_sys_asoundlib_h=no; ac_cv_header_alsa_asoundlib_h=no; fi])
@@ -367,6 +368,13 @@ fi
@@ -363,6 +364,13 @@ fi
WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false],
[gettext tools not found (or too old), translations won't be built.])
@@ -35,7 +35,7 @@ index 92d78a2..c88a139 100644
dnl Check for -li386 for NetBSD and OpenBSD
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 13df4bb..edf5ea8 100644
index 5708aae..f27ce56 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -96,6 +96,14 @@ typedef struct
@@ -53,11 +53,10 @@ index 13df4bb..edf5ea8 100644
/***********************************************************************
* signal context platform-specific definitions
*/
@@ -1573,6 +1581,214 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
}
@@ -1898,6 +1906,213 @@ static inline DWORD get_fpu_code( const CONTEXT *context )
}
+
+#ifdef EXAGEAR_COMPAT
+
+/***********************************************************************
@@ -265,10 +264,10 @@ index 13df4bb..edf5ea8 100644
+#endif /* EXAGEAR_COMPAT */
+
+
/***********************************************************************
* check_invalid_gs
*
@@ -1902,6 +2118,14 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context
/**********************************************************************
* raise_segv_exception
*/
@@ -1907,6 +2122,14 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context
switch(rec->ExceptionCode)
{
@@ -284,5 +283,5 @@ index 13df4bb..edf5ea8 100644
if (rec->NumberParameters == 2)
{
--
2.1.3
2.7.1

View File

@@ -1,177 +0,0 @@
From 4eb926239cec9c6dfa489056bb30d698039926a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= <bernhardu@vr-web.de>
Date: Tue, 24 Nov 2015 21:13:50 +0100
Subject: dinput: Implement device property DIPROP_USERNAME.
https://bugs.winehq.org/show_bug.cgi?id=39667
Probably same issue as in https://bugs.winehq.org/show_bug.cgi?id=12432 .
(Attached backtrace seems equal.)
Steps to reproduce:
- start launcher
- "Configure Controller"
- leave dialog with "Cancel"
- crash
MotoGP 3 demo launcher uses ConfigureDevices for the key mapping.
This seems because the result of a GetProperty(DIPROP_USERNAME) is used
without checking.
---
dlls/dinput/device.c | 39 +++++++++++++++++++++++++++++++++++++++
dlls/dinput/device_private.h | 1 +
dlls/dinput8/tests/device.c | 29 +++++++++++++++++++++++++++--
3 files changed, 67 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index e525f01..41fb2c4 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -778,11 +778,13 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, LPCDIDATAFORMAT df)
{
+ static const WCHAR emptyW[] = { 0 };
IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface);
DIDATAFORMAT data_format;
DIOBJECTDATAFORMAT *obj_df = NULL;
DIPROPDWORD dp;
DIPROPRANGE dpr;
+ DIPROPSTRING dps;
WCHAR username[MAX_PATH];
DWORD username_size = MAX_PATH;
int i, action = 0, num_actions = 0;
@@ -863,6 +865,13 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
else
lstrcpynW(username, lpszUserName, MAX_PATH);
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ lstrcpynW(dps.wsz, (dwFlags & DIDSAM_NOUSER) ? emptyW : username, sizeof(dps.wsz)/sizeof(WCHAR));
+ IDirectInputDevice8_SetProperty(iface, DIPROP_USERNAME, &dps.diph);
+
/* Save the settings to disk */
save_mapping_settings(iface, lpdiaf, username);
@@ -1100,6 +1109,9 @@ ULONG WINAPI IDirectInputDevice2WImpl_Release(LPDIRECTINPUTDEVICE8W iface)
/* Free action mapping */
HeapFree(GetProcessHeap(), 0, This->action_map);
+ /* Free username */
+ HeapFree(GetProcessHeap(), 0, This->username);
+
EnterCriticalSection( &This->dinput->crit );
list_remove( &This->entry );
LeaveCriticalSection( &This->dinput->crit );
@@ -1251,6 +1263,17 @@ HRESULT WINAPI IDirectInputDevice2WImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface,
TRACE("buffersize = %d\n", pd->dwData);
break;
}
+ case (DWORD_PTR) DIPROP_USERNAME:
+ {
+ LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph;
+
+ if (pdiph->dwSize != sizeof(DIPROPSTRING)) return DIERR_INVALIDPARAM;
+
+ ps->wsz[0] = 0;
+ if (This->username)
+ lstrcpynW(ps->wsz, This->username, sizeof(ps->wsz)/sizeof(WCHAR));
+ break;
+ }
case (DWORD_PTR) DIPROP_VIDPID:
FIXME("DIPROP_VIDPID not implemented\n");
return DIERR_UNSUPPORTED;
@@ -1324,6 +1347,22 @@ HRESULT WINAPI IDirectInputDevice2WImpl_SetProperty(
LeaveCriticalSection(&This->crit);
break;
}
+ case (DWORD_PTR) DIPROP_USERNAME:
+ {
+ LPCDIPROPSTRING ps = (LPCDIPROPSTRING)pdiph;
+
+ if (pdiph->dwSize != sizeof(DIPROPSTRING)) return DIERR_INVALIDPARAM;
+
+ if (!This->username)
+ This->username = HeapAlloc(GetProcessHeap(), 0, sizeof(ps->wsz));
+ if (!This->username)
+ return DIERR_OUTOFMEMORY;
+
+ This->username[0] = 0;
+ if (ps->wsz)
+ lstrcpynW(This->username, ps->wsz, sizeof(ps->wsz)/sizeof(WCHAR));
+ break;
+ }
default:
WARN("Unknown property %s\n", debugstr_guid(rguid));
return DIERR_UNSUPPORTED;
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index 52bbec4..44fa46a 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -81,6 +81,7 @@ struct IDirectInputDeviceImpl
/* Action mapping */
int num_actions; /* number of actions mapped */
ActionMap *action_map; /* array of mappings */
+ WCHAR *username; /* set by 'SetActionMap' */
};
extern BOOL get_app_key(HKEY*, HKEY*) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 6495559..b5e27ad 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -223,8 +223,8 @@ static BOOL CALLBACK enumeration_callback(const DIDEVICEINSTANCEA *lpddi, IDirec
dps.wsz[0] = '\0';
hr = IDirectInputDevice_GetProperty(lpdid, DIPROP_USERNAME, &dps.diph);
- todo_wine ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
- todo_wine ok (!lstrcmpW(usernameW, dps.wsz), "Username not set correctly expected=%s, got=%s\n", wine_dbgstr_wn(usernameW, -1), wine_dbgstr_wn(dps.wsz, -1));
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (!lstrcmpW(usernameW, dps.wsz), "Username not set correctly expected=%s, got=%s\n", wine_dbgstr_wn(usernameW, -1), wine_dbgstr_wn(dps.wsz, -1));
/* Test buffer size */
memset(&dp, 0, sizeof(dp));
@@ -275,6 +275,7 @@ static void test_action_mapping(void)
HINSTANCE hinst = GetModuleHandleA(NULL);
IDirectInput8A *pDI = NULL;
DIACTIONFORMATA af;
+ DIPROPSTRING dps;
struct enum_data data = {pDI, &af, NULL, NULL, NULL, 0};
HWND hwnd;
@@ -342,6 +343,30 @@ static void test_action_mapping(void)
af.dwDataSize = 4 * sizeof(actionMapping) / sizeof(actionMapping[0]);
af.dwNumActions = sizeof(actionMapping) / sizeof(actionMapping[0]);
+
+ /* test DIDSAM_NOUSER */
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ dps.wsz[0] = '\0';
+
+ hr = IDirectInputDevice_GetProperty(data.keyboard, DIPROP_USERNAME, &dps.diph);
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (dps.wsz[0] != 0, "Expected any username, got=%s\n", wine_dbgstr_wn(dps.wsz, -1));
+
+ hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, DIDSAM_NOUSER);
+ ok (SUCCEEDED(hr), "SetActionMap failed hr=%08x\n", hr);
+
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ dps.wsz[0] = '\0';
+
+ hr = IDirectInputDevice_GetProperty(data.keyboard, DIPROP_USERNAME, &dps.diph);
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (dps.wsz[0] == 0, "Expected empty username, got=%s\n", wine_dbgstr_wn(dps.wsz, -1));
}
if (data.mouse != NULL)
--
2.6.2

View File

@@ -1 +0,0 @@
Fixes: [39667] Implement dinput device property DIPROP_USERNAME

View File

@@ -1,92 +0,0 @@
From f8acf44d20407c213dd1f48691b432c2e9f555df Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 13 Nov 2015 20:36:54 +0800
Subject: kernel32: CompareStringW should abort on the first nonmatching
character to avoid invalid memory access. (v2)
For bug 37556.
Changes in v2 (by Sebastian Lackner):
* Use loop to handle strings ending with multiple \0 characters correctly.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
---
libs/wine/sortkey.c | 39 ++++++++++++++++++++++++++++++---------
1 file changed, 30 insertions(+), 9 deletions(-)
diff --git a/libs/wine/sortkey.c b/libs/wine/sortkey.c
index 17b5537..7280501 100644
--- a/libs/wine/sortkey.c
+++ b/libs/wine/sortkey.c
@@ -223,6 +223,16 @@ static inline int compare_unicode_weights(int flags, const WCHAR *str1, int len1
len1--;
len2--;
}
+ while (len1 && !*str1)
+ {
+ str1++;
+ len1--;
+ }
+ while (len2 && !*str2)
+ {
+ str2++;
+ len2--;
+ }
return len1 - len2;
}
@@ -272,6 +282,16 @@ static inline int compare_diacritic_weights(int flags, const WCHAR *str1, int le
len1--;
len2--;
}
+ while (len1 && !*str1)
+ {
+ str1++;
+ len1--;
+ }
+ while (len2 && !*str2)
+ {
+ str2++;
+ len2--;
+ }
return len1 - len2;
}
@@ -321,23 +341,24 @@ static inline int compare_case_weights(int flags, const WCHAR *str1, int len1,
len1--;
len2--;
}
+ while (len1 && !*str1)
+ {
+ str1++;
+ len1--;
+ }
+ while (len2 && !*str2)
+ {
+ str2++;
+ len2--;
+ }
return len1 - len2;
}
-static inline int real_length(const WCHAR *str, int len)
-{
- while (len && !str[len - 1]) len--;
- return len;
-}
-
int wine_compare_string(int flags, const WCHAR *str1, int len1,
const WCHAR *str2, int len2)
{
int ret;
- len1 = real_length(str1, len1);
- len2 = real_length(str2, len2);
-
ret = compare_unicode_weights(flags, str1, len1, str2, len2);
if (!ret)
{
--
2.6.4

View File

@@ -1,31 +0,0 @@
From 9261fada866235424392ac94d78e2d3a3a02ecc7 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Nov 2015 20:43:39 +0100
Subject: kernel32/tests: Add some more tests for NORM_IGNORESYMBOLS.
---
dlls/kernel32/tests/locale.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index 7b0212e..a70dc13 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -1634,7 +1634,13 @@ static const struct comparestringa_entry comparestringa_data[] = {
{ LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "'o", -1, "/m", -1, CSTR_LESS_THAN },
{ LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "/m", -1, "'o", -1, CSTR_GREATER_THAN },
{ LOCALE_SYSTEM_DEFAULT, 0, "aLuZkUtZ", 8, "aLuZkUtZ", 9, CSTR_EQUAL },
- { LOCALE_SYSTEM_DEFAULT, 0, "aLuZkUtZ", 7, "aLuZkUtZ\0A", 10, CSTR_LESS_THAN }
+ { LOCALE_SYSTEM_DEFAULT, 0, "aLuZkUtZ", 7, "aLuZkUtZ\0A", 10, CSTR_LESS_THAN },
+ { LOCALE_SYSTEM_DEFAULT, 0, "a-", 3, "a\0", 3, CSTR_GREATER_THAN },
+ { LOCALE_SYSTEM_DEFAULT, 0, "a'", 3, "a\0", 3, CSTR_GREATER_THAN },
+ { LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "a-", 3, "a\0", 3, CSTR_GREATER_THAN },
+ { LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "a'", 3, "a\0", 3, CSTR_GREATER_THAN },
+ { LOCALE_SYSTEM_DEFAULT, NORM_IGNORESYMBOLS, "a.", 3, "a\0", 3, CSTR_EQUAL },
+ { LOCALE_SYSTEM_DEFAULT, NORM_IGNORESYMBOLS, "a ", 3, "a\0", 3, CSTR_EQUAL },
};
static void test_CompareStringA(void)
--
2.6.2

View File

@@ -1,32 +0,0 @@
From c855cfddc7853fa8aed1ce4aac9a85c7ff7cb1f1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 22 Jan 2016 15:13:36 +0100
Subject: kenrel32/tests: Add further tests for comparing strings ending with
multiple \0 characters.
---
dlls/kernel32/tests/locale.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index d531272..4a9e540 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -1643,6 +1643,14 @@ static const struct comparestringa_entry comparestringa_data[] = {
{ LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "a'", 3, "a\0", 3, CSTR_GREATER_THAN },
{ LOCALE_SYSTEM_DEFAULT, NORM_IGNORESYMBOLS, "a.", 3, "a\0", 3, CSTR_EQUAL },
{ LOCALE_SYSTEM_DEFAULT, NORM_IGNORESYMBOLS, "a ", 3, "a\0", 3, CSTR_EQUAL },
+ { LOCALE_SYSTEM_DEFAULT, 0, "a", 1, "a\0\0", 4, CSTR_EQUAL },
+ { LOCALE_SYSTEM_DEFAULT, 0, "a", 2, "a\0\0", 4, CSTR_EQUAL },
+ { LOCALE_SYSTEM_DEFAULT, 0, "a\0\0", 4, "a", 1, CSTR_EQUAL },
+ { LOCALE_SYSTEM_DEFAULT, 0, "a\0\0", 4, "a", 2, CSTR_EQUAL },
+ { LOCALE_SYSTEM_DEFAULT, 0, "a", 1, "a\0x", 4, CSTR_LESS_THAN },
+ { LOCALE_SYSTEM_DEFAULT, 0, "a", 2, "a\0x", 4, CSTR_LESS_THAN },
+ { LOCALE_SYSTEM_DEFAULT, 0, "a\0x", 4, "a", 1, CSTR_GREATER_THAN },
+ { LOCALE_SYSTEM_DEFAULT, 0, "a\0x", 4, "a", 2, CSTR_GREATER_THAN },
};
static void test_CompareStringA(void)
--
2.6.4

View File

@@ -1 +0,0 @@
Fixes: [37556] CompareString should abort on first non-matching character

View File

@@ -1,251 +0,0 @@
From afd33fadd45f1073ac0b8734d7003ba46b5d1269 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 12 Aug 2014 20:24:14 +0200
Subject: kernel32: Implement GetFinalPathNameByHandle.
---
.../api-ms-win-core-file-l1-1-0.spec | 4 +-
.../api-ms-win-core-file-l1-2-0.spec | 4 +-
dlls/kernel32/file.c | 182 +++++++++++++++++++++
dlls/kernel32/kernel32.spec | 4 +-
4 files changed, 188 insertions(+), 6 deletions(-)
diff --git a/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec b/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec
index 9e5b809..61e8038 100644
--- a/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec
+++ b/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec
@@ -39,8 +39,8 @@
@ stdcall GetFileSizeEx(long ptr) kernel32.GetFileSizeEx
@ stdcall GetFileTime(long ptr ptr ptr) kernel32.GetFileTime
@ stdcall GetFileType(long) kernel32.GetFileType
-@ stub GetFinalPathNameByHandleA
-@ stub GetFinalPathNameByHandleW
+@ stdcall GetFinalPathNameByHandleA(long ptr long long) kernel32.GetFinalPathNameByHandleA
+@ stdcall GetFinalPathNameByHandleW(long ptr long long) kernel32.GetFinalPathNameByHandleW
@ stdcall GetFullPathNameA(str long ptr ptr) kernel32.GetFullPathNameA
@ stdcall GetFullPathNameW(wstr long ptr ptr) kernel32.GetFullPathNameW
@ stdcall GetLogicalDriveStringsW(long ptr) kernel32.GetLogicalDriveStringsW
diff --git a/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec b/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec
index ebfd52e..cddf112 100644
--- a/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec
+++ b/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec
@@ -39,8 +39,8 @@
@ stdcall GetFileSizeEx(long ptr) kernel32.GetFileSizeEx
@ stdcall GetFileTime(long ptr ptr ptr) kernel32.GetFileTime
@ stdcall GetFileType(long) kernel32.GetFileType
-@ stub GetFinalPathNameByHandleA
-@ stub GetFinalPathNameByHandleW
+@ stdcall GetFinalPathNameByHandleA(long ptr long long) kernel32.GetFinalPathNameByHandleA
+@ stdcall GetFinalPathNameByHandleW(long ptr long long) kernel32.GetFinalPathNameByHandleW
@ stdcall GetFullPathNameA(str long ptr ptr) kernel32.GetFullPathNameA
@ stdcall GetFullPathNameW(wstr long ptr ptr) kernel32.GetFullPathNameW
@ stdcall GetLogicalDriveStringsW(long ptr) kernel32.GetLogicalDriveStringsW
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
index 006db1c..b3cc8c3 100644
--- a/dlls/kernel32/file.c
+++ b/dlls/kernel32/file.c
@@ -2829,3 +2829,185 @@ DWORD WINAPI K32GetDeviceDriverFileNameW(void *image_base, LPWSTR file_name, DWO
return 0;
}
+
+/***********************************************************************
+ * GetFinalPathNameByHandleW (KERNEL32.@)
+ */
+DWORD WINAPI GetFinalPathNameByHandleW(HANDLE file, LPWSTR path, DWORD charcount, DWORD flags)
+{
+ WCHAR buffer[sizeof(OBJECT_NAME_INFORMATION) + MAX_PATH + 1];
+ OBJECT_NAME_INFORMATION *info = (OBJECT_NAME_INFORMATION*)&buffer;
+ WCHAR drive_part[MAX_PATH];
+ DWORD drive_part_len;
+ NTSTATUS status;
+ DWORD result = 0;
+ ULONG dummy;
+ WCHAR *ptr;
+
+ TRACE( "(%p,%p,%d,%x)\n", file, path, charcount, flags );
+
+ /* check for invalid arguments */
+ if (!path)
+ {
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return 0;
+ }
+ else if (file == INVALID_HANDLE_VALUE)
+ {
+ SetLastError( ERROR_INVALID_HANDLE );
+ return 0;
+ }
+ else if (flags & ~(FILE_NAME_OPENED | VOLUME_NAME_GUID | VOLUME_NAME_NONE | VOLUME_NAME_NT))
+ {
+ WARN("Invalid or unsupported flags: %x\n", flags);
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return 0;
+ }
+
+ /* get object name */
+ status = NtQueryObject( file, ObjectNameInformation, &buffer, sizeof(buffer) - sizeof(WCHAR), &dummy );
+ if (status != STATUS_SUCCESS)
+ {
+ SetLastError( RtlNtStatusToDosError( status ) );
+ return 0;
+ }
+ else if (info->Name.Length < 4 * sizeof(WCHAR) || info->Name.Buffer[0] != '\\' ||
+ info->Name.Buffer[1] != '?' || info->Name.Buffer[2] != '?' || info->Name.Buffer[3] != '\\' )
+ {
+ FIXME("Unexpected object name: %s\n", debugstr_wn(info->Name.Buffer, info->Name.Length / sizeof(WCHAR)));
+ SetLastError( ERROR_GEN_FAILURE );
+ return 0;
+ }
+
+ /* add terminating null character, remove "\\??\\" */
+ info->Name.Buffer[info->Name.Length / sizeof(WCHAR)] = 0;
+ info->Name.Length -= 4 * sizeof(WCHAR);
+ info->Name.Buffer += 4;
+
+ /* FILE_NAME_OPENED is not supported yet, and would require Wineserver changes */
+ if (flags & FILE_NAME_OPENED)
+ {
+ FIXME("FILE_NAME_OPENED not supported\n");
+ flags &= ~FILE_NAME_OPENED;
+ }
+
+ /* Get information required for VOLUME_NAME_NONE, VOLUME_NAME_GUID and VOLUME_NAME_NT */
+ if (flags == VOLUME_NAME_NONE || flags == VOLUME_NAME_GUID || flags == VOLUME_NAME_NT)
+ {
+ if (!GetVolumePathNameW( info->Name.Buffer, drive_part, MAX_PATH ))
+ return 0;
+
+ drive_part_len = strlenW(drive_part);
+ if (!drive_part_len || drive_part_len > strlenW(info->Name.Buffer) ||
+ drive_part[drive_part_len-1] != '\\' ||
+ strncmpiW( info->Name.Buffer, drive_part, drive_part_len ))
+ {
+ FIXME("Path %s returned by GetVolumePathNameW does not match file path %s\n",
+ debugstr_w(drive_part), debugstr_w(info->Name.Buffer));
+ SetLastError( ERROR_GEN_FAILURE );
+ return 0;
+ }
+ }
+
+ if (flags == VOLUME_NAME_NONE)
+ {
+ ptr = info->Name.Buffer + drive_part_len - 1;
+ result = strlenW(ptr);
+ if (result < charcount)
+ memcpy(path, ptr, (result + 1) * sizeof(WCHAR));
+ else result++;
+ }
+ else if (flags == VOLUME_NAME_GUID)
+ {
+ WCHAR volume_prefix[51];
+
+ /* GetVolumeNameForVolumeMountPointW sets error code on failure */
+ if (!GetVolumeNameForVolumeMountPointW( drive_part, volume_prefix, 50 ))
+ return 0;
+
+ ptr = info->Name.Buffer + drive_part_len;
+ result = strlenW(volume_prefix) + strlenW(ptr);
+ if (result < charcount)
+ {
+ path[0] = 0;
+ strcatW(path, volume_prefix);
+ strcatW(path, ptr);
+ }
+ else result++;
+ }
+ else if (flags == VOLUME_NAME_NT)
+ {
+ WCHAR nt_prefix[MAX_PATH];
+
+ /* QueryDosDeviceW sets error code on failure */
+ drive_part[drive_part_len - 1] = 0;
+ if (!QueryDosDeviceW( drive_part, nt_prefix, MAX_PATH ))
+ return 0;
+
+ ptr = info->Name.Buffer + drive_part_len - 1;
+ result = strlenW(nt_prefix) + strlenW(ptr);
+ if (result < charcount)
+ {
+ path[0] = 0;
+ strcatW(path, nt_prefix);
+ strcatW(path, ptr);
+ }
+ else result++;
+ }
+ else if (flags == VOLUME_NAME_DOS)
+ {
+ static const WCHAR dos_prefix[] = {'\\','\\','?','\\', '\0'};
+
+ result = strlenW(dos_prefix) + strlenW(info->Name.Buffer);
+ if (result < charcount)
+ {
+ path[0] = 0;
+ strcatW(path, dos_prefix);
+ strcatW(path, info->Name.Buffer);
+ }
+ else result++;
+ }
+ else
+ {
+ /* Windows crashes here, but we prefer returning ERROR_INVALID_PARAMETER */
+ WARN("Invalid combination of flags: %x\n", flags);
+ SetLastError( ERROR_INVALID_PARAMETER );
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ * GetFinalPathNameByHandleA (KERNEL32.@)
+ */
+DWORD WINAPI GetFinalPathNameByHandleA(HANDLE file, LPSTR path, DWORD charcount, DWORD flags)
+{
+ WCHAR *str;
+ DWORD result;
+
+ TRACE( "(%p,%p,%d,%x)\n", file, path, charcount, flags );
+
+ if (!path || !charcount)
+ return GetFinalPathNameByHandleW(file, (LPWSTR)path, charcount, flags);
+
+ str = HeapAlloc( GetProcessHeap(), 0, charcount * sizeof(WCHAR) );
+ if (!str)
+ {
+ SetLastError( ERROR_NOT_ENOUGH_MEMORY );
+ return 0;
+ }
+
+ result = GetFinalPathNameByHandleW(file, (LPWSTR)str, charcount, flags);
+ if (result)
+ {
+ if (result < charcount)
+ {
+ result = FILE_name_WtoA( str, result, path, charcount - 1 );
+ path[result] = 0;
+ }
+ else result--; /* Why does Windows do this? */
+ }
+
+ HeapFree( GetProcessHeap(), 0, str );
+ return result;
+}
\ No newline at end of file
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index bb72041..b7bead0 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -682,8 +682,8 @@
@ stdcall GetFileSizeEx(long ptr)
@ stdcall GetFileTime(long ptr ptr ptr)
@ stdcall GetFileType(long)
-# @ stub GetFinalPathNameByHandleA
-# @ stub GetFinalPathNameByHandleW
+@ stdcall GetFinalPathNameByHandleA(long ptr long long)
+@ stdcall GetFinalPathNameByHandleW(long ptr long long)
@ stdcall GetFirmwareEnvironmentVariableA(str str ptr long)
@ stdcall GetFirmwareEnvironmentVariableW(wstr wstr ptr long)
@ stdcall GetFullPathNameA(str long ptr ptr)
--
2.4.0

View File

@@ -1 +0,0 @@
Fixes: [34851] Support for GetFinalPathNameByHandle

View File

@@ -1,38 +0,0 @@
From f7ea420c1ca707503214eba3c9bfce6719e66fdc Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 20 Jun 2014 21:16:39 +0200
Subject: kernel32: Make GetLogicalProcessorInformationEx a stub which returns
TRUE.
---
dlls/kernel32/process.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index b371e73..24da577 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -3831,8 +3831,18 @@ BOOL WINAPI GetLogicalProcessorInformation(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION
BOOL WINAPI GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP relationship, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX buffer, PDWORD pBufLen)
{
FIXME("(%u,%p,%p): stub\n", relationship, buffer, pBufLen);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+
+ if (!pBufLen)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ /* MSDN says '[...] at least one SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
+ * structure is written to the output buffer.' - don't be surprised if this
+ * stub doesn't work always. */
+ *pBufLen = 0;
+ return TRUE;
}
/***********************************************************************
--
2.3.0

View File

@@ -1 +0,0 @@
Fixes: CPU-Z fails to start because GetLogicalProcessorInformationEx returns FALSE

View File

@@ -1,4 +1,4 @@
From 8ad4ff3e0ed7e3065a1f408873a69d51cb6b3b51 Mon Sep 17 00:00:00 2001
From 3963fc7dff07587084a7d91553727bba88871677 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 15 Aug 2014 22:23:08 +0200
Subject: ntdll: Unify similar code in NtReadFile and FILE_AsyncReadService.
@@ -15,14 +15,14 @@ Changes in FILE_AsyncReadService:
whereas NtReadFile uses different behaviour based on the fd type.
Now both implementations match, and behave the same way.
---
dlls/ntdll/file.c | 108 +++++++++++++++++++++++-------------------------------
1 file changed, 46 insertions(+), 62 deletions(-)
dlls/ntdll/file.c | 113 ++++++++++++++++++++++--------------------------------
1 file changed, 46 insertions(+), 67 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 79daec5..fd88777 100644
index 6531569..e42cf46 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -471,6 +471,45 @@ NTSTATUS FILE_GetNtStatus(void)
@@ -486,6 +486,45 @@ NTSTATUS FILE_GetNtStatus(void)
}
}
@@ -48,7 +48,7 @@ index 79daec5..fd88777 100644
+ case FD_TYPE_DEVICE:
+ return length ? STATUS_END_OF_FILE : STATUS_SUCCESS;
+ case FD_TYPE_SERIAL:
+ return STATUS_PENDING;
+ return length ? STATUS_PENDING : STATUS_SUCCESS;
+ default:
+ return STATUS_PIPE_BROKEN;
+ }
@@ -68,7 +68,7 @@ index 79daec5..fd88777 100644
/***********************************************************************
* FILE_AsyncReadService (INTERNAL)
*/
@@ -478,44 +517,19 @@ static NTSTATUS FILE_AsyncReadService( void *user, IO_STATUS_BLOCK *iosb,
@@ -493,44 +532,19 @@ static NTSTATUS FILE_AsyncReadService( void *user, IO_STATUS_BLOCK *iosb,
NTSTATUS status, void **apc, void **arg )
{
struct async_fileio_read *fileio = user;
@@ -118,7 +118,7 @@ index 79daec5..fd88777 100644
break;
case STATUS_TIMEOUT:
@@ -762,7 +776,6 @@ static NTSTATUS get_io_avail_mode( HANDLE handle, enum server_fd_type type, BOOL
@@ -777,7 +791,6 @@ static NTSTATUS get_io_avail_mode( HANDLE handle, enum server_fd_type type, BOOL
return status;
}
@@ -126,7 +126,7 @@ index 79daec5..fd88777 100644
/******************************************************************************
* NtReadFile [NTDLL.@]
* ZwReadFile [NTDLL.@]
@@ -858,38 +871,9 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
@@ -873,43 +886,9 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
for (;;)
{
@@ -148,6 +148,11 @@ index 79daec5..fd88777 100644
- status = length ? STATUS_END_OF_FILE : STATUS_SUCCESS;
- goto done;
- case FD_TYPE_SERIAL:
- if (!length)
- {
- status = STATUS_SUCCESS;
- goto done;
- }
- break;
- default:
- status = STATUS_PIPE_BROKEN;
@@ -168,5 +173,5 @@ index 79daec5..fd88777 100644
if (async_read)
{
--
2.4.0
2.7.1

View File

@@ -1,4 +1,4 @@
From cdb1ae761d777e7a1cf4c73edd946c94d1e73700 Mon Sep 17 00:00:00 2001
From 39c68a41a2f5f9bf8fd95c278786f70050ff765b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 05:01:11 +0200
Subject: ntdll: Add handling for partially received messages in NtReadFile.
@@ -248,7 +248,7 @@ index 5f5553b..3811ccd 100644
ok(overlapped.InternalHigh == 0, "expected 0, got %lu\n", overlapped.InternalHigh);
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index fd6c605..18ee740 100644
index 75ad1aa..da0948c 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -490,7 +490,7 @@ NTSTATUS FILE_GetNtStatus(void)
@@ -294,7 +294,7 @@ index fd6c605..18ee740 100644
@@ -577,11 +586,18 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
return length ? STATUS_END_OF_FILE : STATUS_SUCCESS;
case FD_TYPE_SERIAL:
return STATUS_PENDING;
return length ? STATUS_PENDING : STATUS_SUCCESS;
+ case FD_TYPE_PIPE:
+ {
+ NTSTATUS status = unix_fd_avail( fd, &result );
@@ -321,5 +321,5 @@ index fd6c605..18ee740 100644
io_status->u.Status = status;
io_status->Information = total;
--
2.6.2
2.7.1

View File

@@ -1,4 +1,4 @@
From 1d4383d08858f302927f08138bbe81093efbfd14 Mon Sep 17 00:00:00 2001
From 0cdb31619be9eda07a99f339e1072423b613bb5d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 28 Sep 2014 22:42:46 +0200
Subject: ntdll: Throw exception if invalid handle is passed to NtClose and
@@ -10,7 +10,7 @@ Subject: ntdll: Throw exception if invalid handle is passed to NtClose and
2 files changed, 92 insertions(+)
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
index 47a2614..bcc6d69 100644
index 3fadba7..6527501 100644
--- a/dlls/ntdll/om.c
+++ b/dlls/ntdll/om.c
@@ -38,6 +38,7 @@
@@ -21,7 +21,7 @@ index 47a2614..bcc6d69 100644
WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
@@ -343,6 +344,13 @@ NTSTATUS WINAPI NtDuplicateObject( HANDLE source_process, HANDLE source,
@@ -377,6 +378,13 @@ NTSTATUS WINAPI NtDuplicateObject( HANDLE source_process, HANDLE source,
return ret;
}
@@ -35,7 +35,7 @@ index 47a2614..bcc6d69 100644
/* Everquest 2 / Pirates of the Burning Sea hooks NtClose, so we need a wrapper */
NTSTATUS close_handle( HANDLE handle )
{
@@ -356,6 +364,25 @@ NTSTATUS close_handle( HANDLE handle )
@@ -390,6 +398,25 @@ NTSTATUS close_handle( HANDLE handle )
}
SERVER_END_REQ;
if (fd != -1) close( fd );
@@ -62,10 +62,10 @@ index 47a2614..bcc6d69 100644
}
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 5cbab71..7a97ae5 100644
index c62dcb3..440655c 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -53,6 +53,7 @@ static NTSTATUS (WINAPI *pNtTerminateProcess)(HANDLE handle, LONG exit_code);
@@ -52,6 +52,7 @@ static NTSTATUS (WINAPI *pNtTerminateProcess)(HANDLE handle, LONG exit_code);
static NTSTATUS (WINAPI *pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG);
static NTSTATUS (WINAPI *pNtSetInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG);
static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL);
@@ -73,11 +73,11 @@ index 5cbab71..7a97ae5 100644
#if defined(__x86_64__)
static BOOLEAN (CDECL *pRtlAddFunctionTable)(RUNTIME_FUNCTION*, DWORD, DWORD64);
@@ -938,6 +939,16 @@ static void test_debugger(void)
/* here we handle exception */
}
@@ -963,6 +964,16 @@ static void test_debugger(void)
if (stage == 10) continuestatus = DBG_EXCEPTION_NOT_HANDLED;
}
+ else if (stage == 7 || stage == 8)
+ else if (stage == 11 || stage == 12)
+ {
+ ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_INVALID_HANDLE,
+ "unexpected exception code %08x, expected %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode,
@@ -85,12 +85,12 @@ index 5cbab71..7a97ae5 100644
+ ok(de.u.Exception.ExceptionRecord.NumberParameters == 0,
+ "unexpected number of parameters %d, expected 0\n", de.u.Exception.ExceptionRecord.NumberParameters);
+
+ if (stage == 8) continuestatus = DBG_EXCEPTION_NOT_HANDLED;
+ if (stage == 12) continuestatus = DBG_EXCEPTION_NOT_HANDLED;
+ }
else
ok(FALSE, "unexpected stage %x\n", stage);
@@ -1791,6 +1802,53 @@ static void test_ripevent(DWORD numexc)
@@ -2078,6 +2089,53 @@ static void test_breakpoint(DWORD numexc)
pRtlRemoveVectoredExceptionHandler(vectored_handler);
}
@@ -144,7 +144,7 @@ index 5cbab71..7a97ae5 100644
static void test_vectored_continue_handler(void)
{
PVOID handler1, handler2;
@@ -1843,6 +1901,7 @@ START_TEST(exception)
@@ -2130,6 +2188,7 @@ START_TEST(exception)
pNtGetContextThread = (void *)GetProcAddress( hntdll, "NtGetContextThread" );
pNtSetContextThread = (void *)GetProcAddress( hntdll, "NtSetContextThread" );
pNtReadVirtualMemory = (void *)GetProcAddress( hntdll, "NtReadVirtualMemory" );
@@ -152,33 +152,33 @@ index 5cbab71..7a97ae5 100644
pRtlUnwind = (void *)GetProcAddress( hntdll, "RtlUnwind" );
pRtlRaiseException = (void *)GetProcAddress( hntdll, "RtlRaiseException" );
pNtTerminateProcess = (void *)GetProcAddress( hntdll, "NtTerminateProcess" );
@@ -1910,6 +1969,10 @@ START_TEST(exception)
test_ripevent(0);
test_stage = 6;
test_ripevent(1);
+ test_stage = 7;
@@ -2205,6 +2264,10 @@ START_TEST(exception)
test_breakpoint(0);
test_stage = 10;
test_breakpoint(1);
+ test_stage = 11;
+ test_closehandle(0);
+ test_stage = 8;
+ test_stage = 12;
+ test_closehandle(1);
}
else
skip( "RtlRaiseException not found\n" );
@@ -1923,6 +1986,7 @@ START_TEST(exception)
test_rtlraiseexception();
test_outputdebugstring(1, FALSE);
@@ -2220,6 +2283,7 @@ START_TEST(exception)
test_ripevent(1);
test_debug_service(1);
test_breakpoint(1);
+ test_closehandle(0);
test_vectored_continue_handler();
test_debugger();
test_simd_exceptions();
@@ -1942,6 +2006,7 @@ START_TEST(exception)
test_outputdebugstring(1, FALSE);
@@ -2241,6 +2305,7 @@ START_TEST(exception)
test_ripevent(1);
test_debug_service(1);
test_breakpoint(1);
+ test_closehandle(0);
test_vectored_continue_handler();
test_virtual_unwind();
--
2.1.3
2.7.1

View File

@@ -1,4 +1,4 @@
From 51935986a1e973ab26dc3035905a47e1f19c6062 Mon Sep 17 00:00:00 2001
From 21a4d707055fc3e7781fbefec814095cd109fcd2 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 28 Sep 2014 23:39:51 +0200
Subject: ntdll: OutputDebugString should throw the exception a second time, if
@@ -38,10 +38,10 @@ index d4d66b2..981661b 100644
if (!mutex_inited)
{
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 7a97ae5..b0f0fac 100644
index 440655c..70ccf82 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -1727,7 +1727,7 @@ static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *Exce
@@ -1780,7 +1780,7 @@ static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *Exce
return EXCEPTION_CONTINUE_SEARCH;
}
@@ -50,7 +50,7 @@ index 7a97ae5..b0f0fac 100644
{
PVOID vectored_handler;
@@ -1742,13 +1742,8 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo)
@@ -1795,13 +1795,8 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo)
outputdebugstring_exceptions = 0;
OutputDebugStringA("Hello World");
@@ -66,7 +66,7 @@ index 7a97ae5..b0f0fac 100644
pRtlRemoveVectoredExceptionHandler(vectored_handler);
}
@@ -1962,9 +1957,9 @@ START_TEST(exception)
@@ -2249,9 +2244,9 @@ START_TEST(exception)
run_rtlraiseexception_test(EXCEPTION_BREAKPOINT);
run_rtlraiseexception_test(EXCEPTION_INVALID_HANDLE);
test_stage = 3;
@@ -78,24 +78,24 @@ index 7a97ae5..b0f0fac 100644
test_stage = 5;
test_ripevent(0);
test_stage = 6;
@@ -1984,7 +1979,7 @@ START_TEST(exception)
@@ -2279,7 +2274,7 @@ START_TEST(exception)
test_unwind();
test_exceptions();
test_rtlraiseexception();
- test_outputdebugstring(1, FALSE);
+ test_outputdebugstring(1);
test_ripevent(1);
test_closehandle(0);
test_vectored_continue_handler();
@@ -2004,7 +1999,7 @@ START_TEST(exception)
test_debug_service(1);
test_breakpoint(1);
@@ -2301,7 +2296,7 @@ START_TEST(exception)
pRtlLookupFunctionEntry = (void *)GetProcAddress( hntdll,
"RtlLookupFunctionEntry" );
- test_outputdebugstring(1, FALSE);
+ test_outputdebugstring(1);
test_ripevent(1);
test_closehandle(0);
test_vectored_continue_handler();
test_debug_service(1);
test_breakpoint(1);
--
2.1.3
2.7.1

View File

@@ -1,4 +1,4 @@
From a01523c116eb0fa430e618683bea55f1e3b6b0d5 Mon Sep 17 00:00:00 2001
From 70913f6c98d75d46e542ccb0cde9bdaf9e819b85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 18 Jul 2015 04:52:55 +0200
Subject: ntdll: Check architecture before loading module.
@@ -8,7 +8,7 @@ Subject: ntdll: Check architecture before loading module.
1 file changed, 131 insertions(+), 8 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 74feb97..ee1e5e2 100644
index cb9a4e2..06c0475 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2078,6 +2078,108 @@ done:
@@ -153,7 +153,7 @@ index 74feb97..ee1e5e2 100644
@@ -2150,7 +2256,23 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname,
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
if (NtOpenFile( handle, GENERIC_READ, &attr, &io, FILE_SHARE_READ|FILE_SHARE_DELETE, FILE_SYNCHRONOUS_IO_NONALERT|FILE_NON_DIRECTORY_FILE )) *handle = 0;
if (NtOpenFile( handle, GENERIC_READ|SYNCHRONIZE, &attr, &io, FILE_SHARE_READ|FILE_SHARE_DELETE, FILE_SYNCHRONOUS_IO_NONALERT|FILE_NON_DIRECTORY_FILE )) *handle = 0;
- goto found;
+ #ifdef CURRENT_ARCH
+ if (*handle && check_arch)
@@ -202,5 +202,5 @@ index 74feb97..ee1e5e2 100644
if (status != STATUS_BUFFER_TOO_SMALL) break;
/* grow the buffer and retry */
--
2.6.2
2.7.1

View File

@@ -1,4 +1,4 @@
From ff1be4d15b2114de6b785c164ddc27fd6993c6f8 Mon Sep 17 00:00:00 2001
From 6318565d6da5c76eabe006a5c6b25fee7532f445 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 25 Dec 2014 12:36:28 -0700
Subject: ntdll: Add stubs for WinSqmStartSession / WinSqmEndSession.
@@ -11,7 +11,7 @@ Based on a patch by Detlef Riekenberg.
3 files changed, 76 insertions(+)
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
index 2cfa900..7832d37 100644
index 0f6c5df..bd8b358d 100644
--- a/dlls/ntdll/misc.c
+++ b/dlls/ntdll/misc.c
@@ -27,6 +27,8 @@
@@ -23,7 +23,7 @@ index 2cfa900..7832d37 100644
#include "wine/library.h"
#include "wine/debug.h"
#include "ntdll_misc.h"
@@ -328,6 +330,15 @@ void * __cdecl _lfind( const void *key, const void *base, unsigned int *nmemb,
@@ -330,6 +332,15 @@ void * __cdecl _lfind( const void *key, const void *base, unsigned int *nmemb,
}
/*********************************************************************
@@ -39,11 +39,10 @@ index 2cfa900..7832d37 100644
* WinSqmIsOptedIn (NTDLL.@)
*/
BOOL WINAPI WinSqmIsOptedIn(void)
@@ -335,3 +346,12 @@ BOOL WINAPI WinSqmIsOptedIn(void)
FIXME("() stub\n");
@@ -338,6 +349,15 @@ BOOL WINAPI WinSqmIsOptedIn(void)
return FALSE;
}
+
+/*********************************************************************
+ * WinSqmStartSession (NTDLL.@)
+ */
@@ -52,18 +51,26 @@ index 2cfa900..7832d37 100644
+ FIXME("(%p, 0x%x, 0x%x) stub!\n", unknown1, unknown2, unknown3);
+ return NULL;
+}
+
/******************************************************************************
* EtwRegisterTraceGuidsW (NTDLL.@)
*
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 28165ef..9225898 100644
index 04e9548..f5e9275 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -971,3 +971,5 @@
@@ -1010,7 +1010,9 @@
@ stdcall TpWaitForWait(ptr long)
@ stdcall TpWaitForWork(ptr long)
@ stdcall -ret64 VerSetConditionMask(int64 long long)
+@ stdcall WinSqmEndSession(ptr)
@ stdcall WinSqmIsOptedIn()
+@ stdcall WinSqmStartSession(ptr long long)
@ stdcall ZwAcceptConnectPort(ptr long ptr long long ptr) NtAcceptConnectPort
@ stdcall ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck
@ stdcall ZwAccessCheckAndAuditAlarm(ptr long ptr ptr ptr long ptr long ptr ptr ptr) NtAccessCheckAndAuditAlarm
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index e8eb04a..7b5f07d 100644
index 94a22ac..d382691 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -62,6 +62,9 @@ static inline USHORT __my_ushort_swap(USHORT s)
@@ -76,7 +83,7 @@ index e8eb04a..7b5f07d 100644
static SIZE_T (WINAPI *pRtlCompareMemory)(LPCVOID,LPCVOID,SIZE_T);
static SIZE_T (WINAPI *pRtlCompareMemoryUlong)(PULONG, SIZE_T, ULONG);
static NTSTATUS (WINAPI *pRtlDeleteTimer)(HANDLE, HANDLE, HANDLE);
@@ -109,6 +112,9 @@ static void InitFunctionPtrs(void)
@@ -115,6 +118,9 @@ static void InitFunctionPtrs(void)
hntdll = LoadLibraryA("ntdll.dll");
ok(hntdll != 0, "LoadLibrary failed\n");
if (hntdll) {
@@ -86,7 +93,7 @@ index e8eb04a..7b5f07d 100644
pRtlCompareMemory = (void *)GetProcAddress(hntdll, "RtlCompareMemory");
pRtlCompareMemoryUlong = (void *)GetProcAddress(hntdll, "RtlCompareMemoryUlong");
pRtlDeleteTimer = (void *)GetProcAddress(hntdll, "RtlDeleteTimer");
@@ -149,6 +155,48 @@ static void InitFunctionPtrs(void)
@@ -161,6 +167,48 @@ static void InitFunctionPtrs(void)
ok(strlen(src) == 15, "Source must be 16 bytes long!\n");
}
@@ -135,7 +142,7 @@ index e8eb04a..7b5f07d 100644
#define COMP(str1,str2,cmplen,len) size = pRtlCompareMemory(str1, str2, cmplen); \
ok(size == len, "Expected %ld, got %ld\n", size, (SIZE_T)len)
@@ -1603,6 +1651,12 @@ START_TEST(rtl)
@@ -2060,6 +2108,12 @@ START_TEST(rtl)
{
InitFunctionPtrs();
@@ -149,5 +156,5 @@ index e8eb04a..7b5f07d 100644
test_RtlCompareMemoryUlong();
test_RtlMoveMemory();
--
2.3.5
2.7.1

View File

@@ -1,4 +1,4 @@
From 56879d100853d341a322ab082dbbd91e50ec72cd Mon Sep 17 00:00:00 2001
From 0f6bbb3432a99f86bc15fa865452f4e18ef989fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 20 Jan 2015 18:39:36 +0100
Subject: ntoskrnl.exe/tests: Add kernel compliant test functions.
@@ -19,7 +19,7 @@ Subject: ntoskrnl.exe/tests: Add kernel compliant test functions.
create mode 100644 dlls/ntoskrnl.exe/tests/driver.sys/util.h
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index b824250..c104002 100644
index db15265..5645b20 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -1423,7 +1423,7 @@
@@ -43,7 +43,7 @@ index bc040e4..b3a6839 100644
+ driver.c \
+ test.c
diff --git a/dlls/ntoskrnl.exe/tests/driver.sys/driver.c b/dlls/ntoskrnl.exe/tests/driver.sys/driver.c
index 5756090..3da7ba1 100644
index 35f78d1..f39aa37 100644
--- a/dlls/ntoskrnl.exe/tests/driver.sys/driver.c
+++ b/dlls/ntoskrnl.exe/tests/driver.sys/driver.c
@@ -30,6 +30,9 @@
@@ -90,7 +90,7 @@ index 5756090..3da7ba1 100644
return STATUS_SUCCESS;
}
@@ -70,16 +66,20 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp)
@@ -72,16 +68,20 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp)
NTSTATUS status = STATUS_NOT_SUPPORTED;
ULONG_PTR information = 0;
@@ -672,11 +672,11 @@ index 9b8a6a7..64e9d97 100644
unload_driver(service, filename);
}
diff --git a/include/wine/test.h b/include/wine/test.h
index f8b608f..b7ef81a 100644
index 862d553..de21413 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -61,7 +61,13 @@ extern int winetest_loop_todo(void);
extern void winetest_end_todo( const char* platform );
extern void winetest_end_todo(void);
extern int winetest_get_mainargs( char*** pargv );
extern LONG winetest_get_failures(void);
+extern int winetest_get_report_success(void);
@@ -689,7 +689,7 @@ index f8b608f..b7ef81a 100644
extern void winetest_wait_child_process( HANDLE process );
extern const char *wine_dbgstr_wn( const WCHAR *str, int n );
@@ -436,10 +442,39 @@ LONG winetest_get_failures(void)
@@ -433,10 +439,39 @@ LONG winetest_get_failures(void)
return failures;
}
@@ -732,5 +732,5 @@ index f8b608f..b7ef81a 100644
void winetest_wait_child_process( HANDLE process )
--
2.2.1
2.7.1

View File

@@ -1,63 +0,0 @@
From ce5aa07ac893aa38e72bb82c3e6dd2496ef4e1f5 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov@etersoft.ru>
Date: Sat, 31 Jan 2015 12:17:54 +0100
Subject: ntoskrnl.exe: Add stub for KeDelayExecutionThread.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 13 +++++++++++++
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
include/ddk/wdm.h | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 0d6f730..c90b351 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1308,6 +1308,19 @@ PRKTHREAD WINAPI KeGetCurrentThread(void)
return NULL;
}
+
+/***********************************************************************
+ * KeDelayExecutionThread (NTOSKRNL.EXE.@)
+ */
+NTSTATUS WINAPI KeDelayExecutionThread(KPROCESSOR_MODE WaitMode, BOOLEAN Alertable,
+ PLARGE_INTEGER Interval)
+{
+ FIXME("(%d, %d, %p): stub\n", WaitMode, Alertable, Interval);
+
+ return STATUS_SUCCESS;
+}
+
+
/***********************************************************************
* KeInitializeEvent (NTOSKRNL.EXE.@)
*/
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 25624a6..bae3678 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -518,7 +518,7 @@
@ stub KeClearEvent
@ stub KeConnectInterrupt
@ stub KeDcacheFlushCount
-@ stub KeDelayExecutionThread
+@ stdcall KeDelayExecutionThread(long long ptr)
@ stub KeDeregisterBugCheckCallback
@ stub KeDeregisterBugCheckReasonCallback
@ stub KeDetachProcess
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index f2eb6a5..0d13337 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1219,6 +1219,7 @@ void WINAPI IoInitializeIrp(IRP*,USHORT,CCHAR);
VOID WINAPI IoInitializeRemoveLockEx(PIO_REMOVE_LOCK,ULONG,ULONG,ULONG,ULONG);
NTSTATUS WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT,ULONG);
+NTSTATUS WINAPI KeDelayExecutionThread(KPROCESSOR_MODE,BOOLEAN,PLARGE_INTEGER);
PKTHREAD WINAPI KeGetCurrentThread(void);
void WINAPI KeQuerySystemTime(LARGE_INTEGER*);
void WINAPI KeQueryTickCount(LARGE_INTEGER*);
--
2.2.2

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