Compare commits

...

21 Commits

Author SHA1 Message Date
Sebastian Lackner
eb1820cd45 Release 1.8-rc2. 2015-11-29 21:23:59 +01:00
Sebastian Lackner
6655f3dc84 Added patch to ensure default route IP addresses are returned first in gethostbyname. 2015-11-29 18:54:40 +01:00
Sebastian Lackner
c28bcab311 Added patch to implement dinput device property DIPROP_USERNAME. 2015-11-29 18:33:00 +01:00
Sebastian Lackner
e60b8d144b Added patch to ignore socket type for protocol IPPROTO_IPV6 in getaddrinfo. 2015-11-29 18:10:07 +01:00
Sebastian Lackner
b14f029f04 Added patch to allow to set debug registers separately in NtSetContextThread. 2015-11-29 00:36:33 +01:00
Sebastian Lackner
cd0241f0e2 Added patch to start SERVICE_FILE_SYSTEM_DRIVER services with winedevice. 2015-11-28 23:31:47 +01:00
Sebastian Lackner
096164c275 Added patch to silence repeated FIXME message in surface_cpu_blt. 2015-11-28 23:23:06 +01:00
Sebastian Lackner
ef47e8db59 Added patch to send WM_CAPTURECHANGE also when capture has not changed. 2015-11-28 23:19:32 +01:00
Sebastian Lackner
632a8a163b Added patch to skip invalid entries in GetPrivateProfileString16. 2015-11-28 22:51:22 +01:00
Sebastian Lackner
8af8164874 Added patch for delayed end of DST in Europe/Istanbul. 2015-11-28 22:50:13 +01:00
Sebastian Lackner
69be96b093 ntdll-Stack_Fault: Updated patch to commit page when handling stack fault, and add tests. 2015-11-28 22:17:37 +01:00
Sebastian Lackner
d73096b63a Added patch to implement check for invalid handle type for HSPFILEQ handles. 2015-11-27 23:20:34 +01:00
Sebastian Lackner
d8b26a26c5 Rebase against e6c67c52757508ce92c3819bb14e87c2ab21fa20. 2015-11-27 23:06:06 +01:00
Sebastian Lackner
c873b7f422 libs-Unicode_Collation: Also enable sorting tests, they pass after this patch. 2015-11-27 10:52:08 +01:00
Sebastian Lackner
a85a3e8533 Rebase against 4a315cd78a3c97d76ae06e3185ab01a70eb9a1a2. 2015-11-26 19:30:18 +01:00
Sebastian Lackner
a7b8b87d73 gdi32-Symbol_Truetype_Font: Add a new reference to bug report. 2015-11-26 00:05:08 +01:00
Sebastian Lackner
208a1f6573 wined3d-Revert_PixelFormat: Remove reference to bugs marked as fixed. 2015-11-26 00:03:21 +01:00
Sebastian Lackner
6f9e2dae7d Rebase against 6790d825d1b2c41de73ffe5cb5df28c1d1cc8878. 2015-11-25 21:57:01 +01:00
Sebastian Lackner
67b1817720 Rebase against 3a6ac6055511b14a7e26ba0200f36da418f80723. 2015-11-25 20:59:04 +01:00
Sebastian Lackner
a990060062 Rebase against 1d19eb15d4abfdd14dccc5ac05b83c0ee1a1ace1. 2015-11-25 20:24:27 +01:00
Sebastian Lackner
be3e802c6f Rebase against a2c6a2beb68cae239d72e012aa8d4af113b8aaa7. 2015-11-23 18:22:33 +01:00
76 changed files with 2076 additions and 1994 deletions

View File

@@ -34,7 +34,7 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features in Wine Staging 1.8-rc1 [268]:**
**Bug fixes and features in Wine Staging 1.8-rc2 [270]:**
*Note: The following list only contains features and bug fixes which are not
yet available in vanilla Wine. They are removed from the list as soon as they
@@ -47,12 +47,12 @@ for more details.*
* Add IHTMLLocation::hash property's getter implementation ([Wine Bug #32967](https://bugs.winehq.org/show_bug.cgi?id=32967))
* Add a ProfileList\<UserSID> registry subkey ([Wine Bug #15670](https://bugs.winehq.org/show_bug.cgi?id=15670))
* Add a stub driver for tdi.sys ([Wine Bug #35693](https://bugs.winehq.org/show_bug.cgi?id=35693))
* Add implementation for IDXGIOutput::GetDesc ([Wine Bug #32006](https://bugs.winehq.org/show_bug.cgi?id=32006))
* Add implementation for comctl32.PROPSHEET_InsertPage. ([Wine Bug #25625](https://bugs.winehq.org/show_bug.cgi?id=25625))
* Add implementation for mfplat.MFTEnum ([Wine Bug #39309](https://bugs.winehq.org/show_bug.cgi?id=39309))
* Add implementation for mfplat.MFTRegister ([Wine Bug #37811](https://bugs.winehq.org/show_bug.cgi?id=37811))
* Add implementation for msidb commandline tool
* Add implementation for shlwapi.AssocGetPerceivedType
* Add information for delayed end of DST in Europe/Istanbul
* Add nvapi stubs required for GPU PhysX support
* Add partial implementation of ITfThreadMgrEx_ActivateEx ([Wine Bug #39564](https://bugs.winehq.org/show_bug.cgi?id=39564))
* Add performance library registry keys needed by MS SQL Server Management Studio Express 2008 R2 ([Wine Bug #33661](https://bugs.winehq.org/show_bug.cgi?id=33661))
@@ -93,8 +93,10 @@ for more details.*
* Allow to edit winecfg library override by double clicking
* Allow to open files/directories without any access rights in order to query attributes
* Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE. ([Wine Bug #12652](https://bugs.winehq.org/show_bug.cgi?id=12652))
* Allow to set debug registers separately in NtSetContextThread ([Wine Bug #39454](https://bugs.winehq.org/show_bug.cgi?id=39454))
* Allow to set pixel format for desktop window
* Allow to specify default display frequency in registry
* Also send WM_CAPTURECHANGE when capture has not changed ([Wine Bug #13683](https://bugs.winehq.org/show_bug.cgi?id=13683))
* Always use 64-bit registry view on WOW64 setups
* Anno 1602 installer depends on Windows 98 behavior of SHFileOperationW ([Wine Bug #37916](https://bugs.winehq.org/show_bug.cgi?id=37916))
* Assign a drive serial number during prefix creation/update ([Wine Bug #17823](https://bugs.winehq.org/show_bug.cgi?id=17823))
@@ -103,7 +105,6 @@ for more details.*
* Avoid race-conditions in NtReadFile() operations with write watches.
* Avoid race-conditions of async WSARecv() operations with write watches.
* Avoid race-conditions with write watches in WS2_async_accept.
* Avseq crashes when multisampling is enabled ([Wine Bug #31998](https://bugs.winehq.org/show_bug.cgi?id=31998))
* Basic handling of write watches triggered while we're on the signal stack.
* Basic support for CUDA
* Black & White needs DXTn software decoding support ([Wine Bug #14939](https://bugs.winehq.org/show_bug.cgi?id=14939))
@@ -111,6 +112,7 @@ for more details.*
* Calculate msvcrt exponential math operations with higher precision ([Wine Bug #37149](https://bugs.winehq.org/show_bug.cgi?id=37149))
* Catch invalid memory accesses in imagehlp.CheckSumMappedFile
* Check architecture before trying to load libraries ([Wine Bug #38021](https://bugs.winehq.org/show_bug.cgi?id=38021))
* Check handle type for HSPFILEQ handles ([Wine Bug #12332](https://bugs.winehq.org/show_bug.cgi?id=12332))
* Codepage conversion should fail when destination length is < 0
* CompareString should abort on first non-matching character ([Wine Bug #37556](https://bugs.winehq.org/show_bug.cgi?id=37556))
* Create Microsoft\Windows\Themes directory during Wineprefix creation ([Wine Bug #34910](https://bugs.winehq.org/show_bug.cgi?id=34910))
@@ -123,12 +125,11 @@ for more details.*
* Do not signal threads until they are really gone
* Do not use unixfs for devices without mountpoint
* Do not wait for hook thread startup in IDirectInput8::Initialize ([Wine Bug #21403](https://bugs.winehq.org/show_bug.cgi?id=21403))
* Enforce that surfaces are flushed after ReleaseDC ([Wine Bug #39465](https://bugs.winehq.org/show_bug.cgi?id=39465))
* Ensure NtProtectVirtualMemory and NtCreateSection are on separate pages ([Wine Bug #33162](https://bugs.winehq.org/show_bug.cgi?id=33162))
* Ensure default route IP addresses are returned first in gethostbyname ([Wine Bug #22819](https://bugs.winehq.org/show_bug.cgi?id=22819))
* Exception during start of fr-043 caused by missing DXTn support ([Wine Bug #37391](https://bugs.winehq.org/show_bug.cgi?id=37391))
* Export additional OpenAL32 functions ([Wine Bug #38972](https://bugs.winehq.org/show_bug.cgi?id=38972))
* Expose PKEY_AudioEndpoint_PhysicalSpeakers device property in PulseAudio driver
* FEAR 1 installer expects basic_string_wchar_dtor to return NULL ([Wine Bug #37358](https://bugs.winehq.org/show_bug.cgi?id=37358))
* Fake success in IViewObject::Draw stub ([Wine Bug #30611](https://bugs.winehq.org/show_bug.cgi?id=30611))
* Fake success in kernel32.SetFileCompletionNotificationModes ([Wine Bug #38960](https://bugs.winehq.org/show_bug.cgi?id=38960))
* Fallback to default comspec when %COMSPEC% is not set
@@ -143,19 +144,18 @@ for more details.*
* Fix crash of winedevice when relocation entry crosses page boundary ([Wine Bug #28254](https://bugs.winehq.org/show_bug.cgi?id=28254))
* Fix detection of case-insensitive systems in MSYS2
* Fix device paths in HKLM\SYSTEM\MountedDevices ([Wine Bug #38235](https://bugs.winehq.org/show_bug.cgi?id=38235))
* Fix endless loop in regedit when importing files with very long lines
* Fix error handling in DeferWindowPos when passing an invalid HWND ([Wine Bug #23187](https://bugs.winehq.org/show_bug.cgi?id=23187))
* Fix font loading in Capella ([Wine Bug #12377](https://bugs.winehq.org/show_bug.cgi?id=12377))
* Fix for ConnectNamedPort return value in overlapped mode ([Wine Bug #16550](https://bugs.winehq.org/show_bug.cgi?id=16550))
* Fix for programs leaking wndproc slots ([Wine Bug #32451](https://bugs.winehq.org/show_bug.cgi?id=32451))
* Fix graphical corruption in FarCry 3 with NVIDIA drivers ([Wine Bug #35062](https://bugs.winehq.org/show_bug.cgi?id=35062))
* Fix gray screen on startup introduced by pixelformat changes. ([Wine Bug #35975](https://bugs.winehq.org/show_bug.cgi?id=35975))
* Fix handling of ANSI NTLM credentials ([Wine Bug #37063](https://bugs.winehq.org/show_bug.cgi?id=37063))
* Fix handling of empty section and key name for profile files. ([Wine Bug #8036](https://bugs.winehq.org/show_bug.cgi?id=8036))
* Fix handling of invert_y in DrawTextExW ([Wine Bug #22109](https://bugs.winehq.org/show_bug.cgi?id=22109))
* Fix handling of window attributes for WS_EX_LAYERED | WS_EX_COMPOSITED ([Wine Bug #37876](https://bugs.winehq.org/show_bug.cgi?id=37876))
* Fix implementation of msvcrt.close when stdout == stderr
* Fix issue causing applications to report magic loopback address instead of real IP ([Wine Bug #37271](https://bugs.winehq.org/show_bug.cgi?id=37271))
* Fix issues with dragging layers between images in Adobe Photoshop 7.0 ([Wine Bug #12007](https://bugs.winehq.org/show_bug.cgi?id=12007))
* Fix missing video introduced by pixelformat changes. ([Wine Bug #36900](https://bugs.winehq.org/show_bug.cgi?id=36900))
* Fix multithreading issues with fullscreen clipping ([Wine Bug #38087](https://bugs.winehq.org/show_bug.cgi?id=38087))
* Fix possible segfault in pulse_rd_loop of PulseAudio backend
* Fix race-condition when threads are killed during shutdown
@@ -174,13 +174,13 @@ for more details.*
* GetSecurityInfo returns NULL DACL for process object ([Wine Bug #15980](https://bugs.winehq.org/show_bug.cgi?id=15980))
* Globally invalidate key state on changes in other threads ([Wine Bug #29871](https://bugs.winehq.org/show_bug.cgi?id=29871))
* Graphical issues in Inquisitor ([Wine Bug #32490](https://bugs.winehq.org/show_bug.cgi?id=32490))
* Ignore socket type for protocol IPPROTO_IPV6 in getaddrinfo
* Implement AMStream GetMultiMediaStream functions ([Wine Bug #37090](https://bugs.winehq.org/show_bug.cgi?id=37090))
* Implement D3DXGetShaderOutputSemantics
* Implement DDENUMSURFACES_CANBECREATED in IDirectDraw7::EnumSurfaces ([Wine Bug #17233](https://bugs.winehq.org/show_bug.cgi?id=17233))
* Implement FileNamesInformation class support for NtQueryDirectoryFile
* Implement FolderImpl_Items and stubbed FolderItems interface
* Implement ID3DXEffect::FindNextValidTechnique ([Wine Bug #34101](https://bugs.winehq.org/show_bug.cgi?id=34101))
* Implement IDXGIOutput::GetDesc
* Implement SystemHandleInformation info class
* Implement a Courier New replacement font ([Wine Bug #20456](https://bugs.winehq.org/show_bug.cgi?id=20456))
* Implement a Microsoft Yahei replacement font ([Wine Bug #13829](https://bugs.winehq.org/show_bug.cgi?id=13829))
@@ -188,6 +188,7 @@ for more details.*
* Implement additional stub functions in authz.dll
* Implement an Arial replacement font ([Wine Bug #32323](https://bugs.winehq.org/show_bug.cgi?id=32323))
* Implement default homepage button in inetcpl.cpl
* Implement dinput device property DIPROP_USERNAME ([Wine Bug #39667](https://bugs.winehq.org/show_bug.cgi?id=39667))
* Implement enumeration of sound devices and basic properties to dxdiagn ([Wine Bug #32613](https://bugs.winehq.org/show_bug.cgi?id=32613))
* Implement exclusive mode in PulseAudio backend ([Wine Bug #37042](https://bugs.winehq.org/show_bug.cgi?id=37042))
* Implement general tab for file property dialog
@@ -252,7 +253,6 @@ for more details.*
* Return dummy ID3DXSkinInfo interface when skinning info not present ([Wine Bug #33904](https://bugs.winehq.org/show_bug.cgi?id=33904))
* Return fake device type when systemroot is located on virtual disk ([Wine Bug #36546](https://bugs.winehq.org/show_bug.cgi?id=36546))
* Return proper status codes when NtReadFile/NtWriteFile is called on closed (but not disconnected) pipe
* Revert patch to prepare GL resources before calling context_apply_fbo_state ([Wine Bug #39536](https://bugs.winehq.org/show_bug.cgi?id=39536))
* SHFileOperation with FO_MOVE should create new directory on Vista+ ([Wine Bug #25207](https://bugs.winehq.org/show_bug.cgi?id=25207))
* SO_CONNECT_TIME returns the appropriate time
* Send WM_PAINT event during dialog creation ([Wine Bug #35652](https://bugs.winehq.org/show_bug.cgi?id=35652))
@@ -261,9 +261,12 @@ for more details.*
* Share source of d3dx9_36 with d3dx9_33 to avoid Wine DLL forwards ([Wine Bug #21817](https://bugs.winehq.org/show_bug.cgi?id=21817))
* Show unmounted devices in winecfg and allow changing the unix path
* Show windows version when collecting system info in winedbg
* Silence repeated FIXME message in surface_cpu_blt
* Silence repeated LocaleNameToLCID/LCIDToLocaleName unsupported flags FIXMEs ([Wine Bug #30076](https://bugs.winehq.org/show_bug.cgi?id=30076))
* Skip invalid entries in GetPrivateProfileString16 ([Wine Bug #9919](https://bugs.winehq.org/show_bug.cgi?id=9919))
* Skip unknown item when decoding a CMS certificate ([Wine Bug #34388](https://bugs.winehq.org/show_bug.cgi?id=34388))
* Software support for Environmental Audio Extensions (EAX)
* Start SERVICE_FILE_SYSTEM_DRIVER services with winedevice ([Wine Bug #35824](https://bugs.winehq.org/show_bug.cgi?id=35824))
* Super Mario 3: Mario Forever fails to load keyboard mapping from profile files. ([Wine Bug #18099](https://bugs.winehq.org/show_bug.cgi?id=18099))
* Support for AllocateAndGetTcpExTableFromStack ([Wine Bug #34372](https://bugs.winehq.org/show_bug.cgi?id=34372))
* Support for BindImageEx ([Wine Bug #3591](https://bugs.winehq.org/show_bug.cgi?id=3591))
@@ -310,5 +313,4 @@ for more details.*
* XEMBED support for embedding Wine windows inside Linux applications
* eRacer Demo doesn't correctly display text ([Wine Bug #29598](https://bugs.winehq.org/show_bug.cgi?id=29598))
* ntdll is missing WinSqm[Start|End]Session implementation ([Wine Bug #31971](https://bugs.winehq.org/show_bug.cgi?id=31971))
* wglDescribePixelFormat should return max index for NULL descriptor ([Wine Bug #6176](https://bugs.winehq.org/show_bug.cgi?id=6176))

View File

@@ -0,0 +1,177 @@
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

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

View File

@@ -1,53 +0,0 @@
From 297166d280007d0e4413ec5977497a848dda678b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 19 Dec 2014 21:20:21 +0100
Subject: dxgi: Implement IDXGIOutput::GetDesc.
---
dlls/dxgi/output.c | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/dlls/dxgi/output.c b/dlls/dxgi/output.c
index f4a5c29..158491e 100644
--- a/dlls/dxgi/output.c
+++ b/dlls/dxgi/output.c
@@ -114,9 +114,34 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetParent(IDXGIOutput *iface,
static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc(IDXGIOutput *iface, DXGI_OUTPUT_DESC *desc)
{
- FIXME("iface %p, desc %p stub!\n", iface, desc);
+ struct dxgi_output *This = impl_from_IDXGIOutput(iface);
+ struct wined3d *wined3d;
+ MONITORINFOEXW monitor_info;
- return E_NOTIMPL;
+ FIXME("iface %p, desc %p semi-stub!\n", iface, desc);
+
+ if (!desc)
+ return DXGI_ERROR_INVALID_CALL;
+
+ wined3d = This->adapter->parent->wined3d;
+
+ wined3d_mutex_lock();
+ desc->Monitor = wined3d_get_adapter_monitor(wined3d, This->adapter->ordinal);
+ wined3d_mutex_unlock();
+
+ if (!desc->Monitor)
+ return DXGI_ERROR_INVALID_CALL;
+
+ monitor_info.cbSize = sizeof(monitor_info);
+ if (!GetMonitorInfoW(desc->Monitor, (MONITORINFO *)&monitor_info))
+ return DXGI_ERROR_INVALID_CALL;
+
+ memcpy(&desc->DeviceName, &monitor_info.szDevice, sizeof(desc->DeviceName));
+ memcpy(&desc->DesktopCoordinates, &monitor_info.rcMonitor, sizeof(RECT));
+ desc->AttachedToDesktop = TRUE;
+ desc->Rotation = DXGI_MODE_ROTATION_IDENTITY;
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *iface,
--
1.9.1

View File

@@ -1,4 +0,0 @@
Fixes: Implement IDXGIOutput::GetDesc
Fixes: [31998] Avseq crashes when multisampling is enabled
Fixes: [32006] Add implementation for IDXGIOutput::GetDesc
Category: stable

View File

@@ -1,27 +0,0 @@
From 69bb805398645531fbc224319ab99dab29129c68 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 8 Nov 2014 11:32:11 +0100
Subject: gdi32: Return maximum number of pixel formats when NULL pointer is
passed to wglDescribePixelFormat.
---
dlls/gdi32/dibdrv/opengl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/dibdrv/opengl.c b/dlls/gdi32/dibdrv/opengl.c
index 28a03f4..edbd2e9 100644
--- a/dlls/gdi32/dibdrv/opengl.c
+++ b/dlls/gdi32/dibdrv/opengl.c
@@ -149,7 +149,8 @@ static int dibdrv_wglDescribePixelFormat( HDC hdc, int fmt, UINT size, PIXELFORM
{
int ret = sizeof(pixel_formats) / sizeof(pixel_formats[0]);
- if (fmt <= 0 || fmt > ret) return ret;
+ if (!descr) return ret;
+ if (fmt <= 0 || fmt > ret) return ret; /* FIXME: should this be 0? */
if (size < sizeof(*descr)) return 0;
memset( descr, 0, sizeof(*descr) );
--
2.1.3

View File

@@ -1,2 +0,0 @@
Fixes: [6176] wglDescribePixelFormat should return max index for NULL descriptor
Category: stable

View File

@@ -1 +1,2 @@
Fixes: [33117] Improve detection of symbol charset for old truetype fonts
Fixes: [12377] Fix font loading in Capella

View File

@@ -1,127 +0,0 @@
From ce6c2fe58743667cec2ce798bbcd938f44d71b80 Mon Sep 17 00:00:00 2001
From: Adam Martinson <adam.r.martinson@gmail.com>
Date: Tue, 18 Dec 2012 15:52:57 -0600
Subject: kernel32/tests: Add tests for closing named pipes.
Changes in v2:
* Add SetLastError().
---
dlls/kernel32/tests/pipe.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 246ee30..f42fe5c 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -923,6 +923,100 @@ static void test_CreateNamedPipe_instances_must_match(void)
ok(CloseHandle(hnp2), "CloseHandle\n");
}
+static void test_CloseNamedPipe(void)
+{
+ HANDLE hnp;
+ HANDLE hFile;
+ static const char obuf[] = "Bit Bucket";
+ char ibuf[32];
+ DWORD written;
+ DWORD readden;
+
+ hnp = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX,
+ PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
+ /* nMaxInstances */ 1,
+ /* nOutBufSize */ 1024,
+ /* nInBufSize */ 1024,
+ /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
+ /* lpSecurityAttrib */ NULL);
+ ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
+
+ hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+
+ /* don't try to do i/o if one side couldn't be opened, as it hangs */
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ /* Make sure we can read and write a few bytes in both directions */
+ memset(ibuf, 0, sizeof(ibuf));
+ ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile\n");
+ ok(written == sizeof(obuf), "write file len 1\n");
+ ok(PeekNamedPipe(hFile, NULL, 0, NULL, &readden, NULL), "Peek\n");
+ ok(readden == sizeof(obuf), "got %d bytes\n", readden);
+
+ /* close server end without disconnecting */
+ ok(CloseHandle(hnp), "CloseHandle() failed: %08x\n", GetLastError());
+
+ todo_wine
+ ok(ReadFile(hFile, ibuf, 0, &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == 0, "got %d bytes\n", readden);
+
+ memset(ibuf, 0, sizeof(ibuf));
+ ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == sizeof(obuf), "got %d bytes\n", readden);
+ /* pipe is empty now */
+
+ SetLastError(0xdeadbeef);
+ ok(!ReadFile(hFile, ibuf, 0, &readden, NULL), "ReadFile() succeeded\n");
+ ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
+ SetLastError(0);
+
+ CloseHandle(hFile);
+ }
+
+ hnp = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX,
+ PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
+ /* nMaxInstances */ 1,
+ /* nOutBufSize */ 1024,
+ /* nInBufSize */ 1024,
+ /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
+ /* lpSecurityAttrib */ NULL);
+ ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
+
+ hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ /* Make sure we can read and write a few bytes in both directions */
+ memset(ibuf, 0, sizeof(ibuf));
+ ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile\n");
+ ok(written == sizeof(obuf), "write file len 1\n");
+ ok(PeekNamedPipe(hnp, NULL, 0, NULL, &readden, NULL), "Peek\n");
+ ok(readden == sizeof(obuf), "got %d bytes\n", readden);
+
+ /* close client end without disconnecting */
+ ok(CloseHandle(hFile), "CloseHandle() failed: %08x\n", GetLastError());
+
+ /* you'd think ERROR_MORE_DATA, but no */
+ todo_wine
+ ok(ReadFile(hnp, ibuf, 0, &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == 0, "got %d bytes\n", readden);
+
+ memset(ibuf, 0, sizeof(ibuf));
+ ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == sizeof(obuf), "got %d bytes\n", readden);
+ /* pipe is empty now */
+
+ SetLastError(0xdeadbeef);
+ ok(!ReadFile(hnp, ibuf, 0, &readden, NULL), "ReadFile() succeeded\n");
+ ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
+ SetLastError(0);
+
+ CloseHandle(hnp);
+ }
+}
+
/** implementation of alarm() */
static DWORD CALLBACK alarmThreadMain(LPVOID arg)
{
@@ -2425,6 +2519,7 @@ START_TEST(pipe)
test_NamedPipe_2();
test_CreateNamedPipe(PIPE_TYPE_BYTE);
test_CreateNamedPipe(PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE);
+ test_CloseNamedPipe();
test_CreatePipe();
test_impersonation();
test_overlapped();
--
2.1.3

View File

@@ -1,6 +1,6 @@
From 24ad6b8855d6739be102ed3d1cd3d18b39e3fceb Mon Sep 17 00:00:00 2001
From cdb1ae761d777e7a1cf4c73edd946c94d1e73700 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 18:20:52 +0200
Date: Mon, 11 Aug 2014 05:01:11 +0200
Subject: ntdll: Add handling for partially received messages in NtReadFile.
Changes in v2:
@@ -13,12 +13,12 @@ Changes in v3:
Changes in v4:
* Include changes from later patch.
---
dlls/kernel32/tests/pipe.c | 53 +++++-----------------------------------------
dlls/ntdll/file.c | 28 ++++++++++++++++++------
2 files changed, 27 insertions(+), 54 deletions(-)
dlls/kernel32/tests/pipe.c | 57 +++++++---------------------------------------
dlls/ntdll/file.c | 28 ++++++++++++++++++-----
2 files changed, 30 insertions(+), 55 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index dff00c9..81b4581 100644
index 5f5553b..3811ccd 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -305,9 +305,7 @@ static void test_CreateNamedPipe(int pipemode)
@@ -207,23 +207,27 @@ index dff00c9..81b4581 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error\n");
}
ok(readden == 32, "read got %d bytes\n", readden);
@@ -949,7 +911,6 @@ static void test_CloseNamedPipe(void)
/* close server end without disconnecting */
ok(CloseHandle(hnp), "CloseHandle() failed: %08x\n", GetLastError());
@@ -1657,7 +1619,7 @@ static void test_CloseHandle(void)
numbytes = 0xdeadbeef;
memset(buffer, 0, sizeof(buffer));
ret = ReadFile(hfile, buffer, 0, &numbytes, NULL);
- todo_wine ok(ret, "ReadFile failed with %u\n", GetLastError());
+ ok(ret, "ReadFile failed with %u\n", GetLastError());
ok(numbytes == 0, "expected 0, got %u\n", numbytes);
- todo_wine
ok(ReadFile(hFile, ibuf, 0, &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
ok(readden == 0, "got %d bytes\n", readden);
numbytes = 0xdeadbeef;
@@ -1750,8 +1712,8 @@ static void test_CloseHandle(void)
numbytes = 0xdeadbeef;
memset(buffer, 0, sizeof(buffer));
ret = ReadFile(hpipe, buffer, 0, &numbytes, NULL);
- todo_wine ok(ret || broken(GetLastError() == ERROR_MORE_DATA) /* >= Win 8 */,
- "ReadFile failed with %u\n", GetLastError());
+ ok(ret || broken(GetLastError() == ERROR_MORE_DATA) /* >= Win 8 */,
+ "ReadFile failed with %u\n", GetLastError());
ok(numbytes == 0, "expected 0, got %u\n", numbytes);
@@ -991,7 +952,6 @@ static void test_CloseNamedPipe(void)
ok(CloseHandle(hFile), "CloseHandle() failed: %08x\n", GetLastError());
/* you'd think ERROR_MORE_DATA, but no */
- todo_wine
ok(ReadFile(hnp, ibuf, 0, &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
ok(readden == 0, "got %d bytes\n", readden);
@@ -2459,7 +2419,6 @@ static void test_readfileex_pending(void)
numbytes = 0xdeadbeef;
@@ -2559,7 +2521,6 @@ static void test_readfileex_pending(void)
SetLastError(0xdeadbeef);
ret = ReadFile(server, read_buf, 0, &num_bytes, &overlapped);
ok(!ret, "ReadFile should fail\n");
@@ -231,7 +235,7 @@ index dff00c9..81b4581 100644
ok(GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %d\n", GetLastError());
ok(num_bytes == 0, "bytes %u\n", num_bytes);
ok((NTSTATUS)overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %#lx\n", overlapped.Internal);
@@ -2475,11 +2434,9 @@ todo_wine
@@ -2575,11 +2536,9 @@ todo_wine
ok(num_bytes == 1, "bytes %u\n", num_bytes);
wait = WaitForSingleObject(event, 100);
@@ -244,10 +248,10 @@ index dff00c9..81b4581 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 d8579a9..2c8855c 100644
index fd6c605..18ee740 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -441,7 +441,7 @@ NTSTATUS FILE_GetNtStatus(void)
@@ -490,7 +490,7 @@ NTSTATUS FILE_GetNtStatus(void)
}
}
@@ -256,7 +260,7 @@ index d8579a9..2c8855c 100644
static NTSTATUS unix_fd_avail(int fd, int *avail)
{
struct pollfd pollfd;
@@ -470,7 +470,14 @@ static NTSTATUS unix_fd_avail(int fd, int *avail)
@@ -519,7 +519,14 @@ static NTSTATUS unix_fd_avail(int fd, int *avail)
static inline int get_pipe_flags(int fd)
{
#ifdef __linux__
@@ -272,7 +276,7 @@ index d8579a9..2c8855c 100644
#else
return 0;
#endif
@@ -516,10 +523,12 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
@@ -565,10 +572,12 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
if (result >= 0)
{
*total += result;
@@ -287,7 +291,7 @@ index d8579a9..2c8855c 100644
switch (type)
{
case FD_TYPE_FILE:
@@ -527,11 +536,18 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
@@ -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;
@@ -307,7 +311,7 @@ index d8579a9..2c8855c 100644
continue;
else if (type != FD_TYPE_FILE) /* no async I/O on regular files */
return STATUS_PENDING;
@@ -890,7 +906,7 @@ done:
@@ -1039,7 +1055,7 @@ done:
err:
if (needs_close) close( unix_handle );
@@ -317,5 +321,5 @@ index d8579a9..2c8855c 100644
io_status->u.Status = status;
io_status->Information = total;
--
2.3.0
2.6.2

View File

@@ -1,4 +1,4 @@
From 186746674015db7533c9b25c8b633c2e3881334e Mon Sep 17 00:00:00 2001
From 8208e3f7c671c71b3b7d25d854e860aad7c45697 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 00:56:46 +0200
Subject: kernel32/tests: Test sending, peeking and receiving an empty message.
@@ -8,14 +8,14 @@ Changes in v2:
We need a lot of ugly code to prevent the tests from deadlocking...
* Fix issue in broken pipe check, should be moved into an earlier patch.
---
dlls/kernel32/tests/pipe.c | 336 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 336 insertions(+)
dlls/kernel32/tests/pipe.c | 267 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 267 insertions(+)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 53f8f30..89a13f5 100644
index 5f2c4d7..76cf018 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -337,6 +337,146 @@ static void test_CreateNamedPipe(int pipemode)
@@ -338,6 +338,146 @@ static void test_CreateNamedPipe(int pipemode)
ok(readden == sizeof(obuf2) - 8, "read got %d bytes\n", readden);
ok(memcmp(obuf2, ibuf, written) == 0, "content check\n");
@@ -162,7 +162,7 @@ index 53f8f30..89a13f5 100644
/* Test reading of multiple writes */
memset(ibuf, 0, sizeof(ibuf));
ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile3a\n");
@@ -455,6 +595,133 @@ static void test_CreateNamedPipe(int pipemode)
@@ -456,6 +596,133 @@ static void test_CreateNamedPipe(int pipemode)
if (readden <= sizeof(obuf))
ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n");
@@ -296,89 +296,6 @@ index 53f8f30..89a13f5 100644
/* Test how ReadFile behaves when the buffer is not big enough for the whole message */
memset(ibuf, 0, sizeof(ibuf));
ok(WriteFile(hnp, obuf2, sizeof(obuf2), &written, NULL), "WriteFile 7\n");
@@ -938,6 +1205,41 @@ static void test_CloseNamedPipe(void)
hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+ /* don't try to do i/o if one side couldn't be opened, as it hangs */
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ ok(WriteFile(hnp, obuf, 0, &written, NULL), "WriteFile\n");
+ ok(written == 0, "write file len 1\n");
+
+ /* close server end without disconnecting */
+ ok(CloseHandle(hnp), "CloseHandle() failed: %08x\n", GetLastError());
+
+ todo_wine
+ ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == 0, "got %d bytes\n", readden);
+ /* pipe is empty now */
+
+ SetLastError(0xdeadbeef);
+ ok(!ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() succeeded\n");
+ todo_wine
+ ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
+ SetLastError(0);
+
+ CloseHandle(hFile);
+ }
+
+ hnp = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX,
+ PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
+ /* nMaxInstances */ 1,
+ /* nOutBufSize */ 1024,
+ /* nInBufSize */ 1024,
+ /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
+ /* lpSecurityAttrib */ NULL);
+ ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
+
+ hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+
if (hFile != INVALID_HANDLE_VALUE)
{
/* Make sure we can read and write a few bytes in both directions */
@@ -966,6 +1268,40 @@ static void test_CloseNamedPipe(void)
CloseHandle(hnp);
}
+
+ hnp = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX,
+ PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
+ /* nMaxInstances */ 1,
+ /* nOutBufSize */ 1024,
+ /* nInBufSize */ 1024,
+ /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
+ /* lpSecurityAttrib */ NULL);
+ ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
+
+ hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+
+ /* don't try to do i/o if one side couldn't be opened, as it hangs */
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ ok(WriteFile(hFile, obuf, 0, &written, NULL), "WriteFile\n");
+ ok(written == 0, "write file len 1\n");
+
+ /* close server end without disconnecting */
+ ok(CloseHandle(hFile), "CloseHandle() failed: %08x\n", GetLastError());
+
+ todo_wine
+ ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == 0, "got %d bytes\n", readden);
+ /* pipe is empty now */
+
+ SetLastError(0xdeadbeef);
+ ok(!ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() succeeded\n");
+ ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
+ SetLastError(0);
+
+ CloseHandle(hnp);
+ }
}
/** implementation of alarm() */
--
2.1.3
2.6.2

View File

@@ -1,4 +1,4 @@
From bd5a5c11c29a52bd7891e8c3da6ff77846085ecd Mon Sep 17 00:00:00 2001
From 18c1a541928b5ef39f647e18f37c7cfdeac1483c Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 04:19:49 +0200
Subject: kernel32/tests: Add tests for PIPE_NOWAIT in message mode.
@@ -8,10 +8,10 @@ Subject: kernel32/tests: Add tests for PIPE_NOWAIT in message mode.
1 file changed, 96 insertions(+)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 89a13f5..49a1017 100644
index 76cf018..35755b3 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -2527,6 +2527,101 @@ static void test_overlapped(void)
@@ -2561,6 +2561,101 @@ static void test_overlapped(void)
CloseHandle(thread);
}
@@ -113,8 +113,8 @@ index 89a13f5..49a1017 100644
static void test_NamedPipeHandleState(void)
{
HANDLE server, client;
@@ -2952,6 +3047,7 @@ START_TEST(pipe)
test_CreatePipe();
@@ -2984,6 +3079,7 @@ START_TEST(pipe)
test_CloseHandle();
test_impersonation();
test_overlapped();
+ test_nowait();
@@ -122,5 +122,5 @@ index 89a13f5..49a1017 100644
test_readfileex_pending();
}
--
2.1.3
2.6.2

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