Piotr Caban <piotr(a)codeweavers.com> wrote:
> + sprintf(cmd, "\"\"%c\"\"\"%s\" \t \"misc\" cmd", name[0], name+1);
> + memset(&startup, 0, sizeof(startup));
> + startup.cb = sizeof(startup);
> + CreateProcessA(path, cmd, NULL, NULL, TRUE,
> + CREATE_DEFAULT_ERROR_MODE|NORMAL_PRIORITY_CLASS,
> + NULL, NULL, &startup, &proc);
> + winetest_wait_child_process(proc.hProcess);
Thanks for adding the tests. It shouldn't be too hard to also test other
white space characters, at least testing '\r' and '\n' would be nice to
have.
--
Dmitry.
On 26 July 2016 at 19:09, Patrick Rudolph <siro(a)das-labor.org> wrote:
> #define WINED3D_MAP_READONLY 0x0010
> +#define WINED3D_MAP_WRITEONLY 0x0020
But now the API is weird. What happens when both READONLY and
WRITEONLY are set? I think the d3d11 model makes more sense.
On 27.07.2016 16:16, Pierre Schweitzer wrote:
>
> DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce )
> {
> - FIXME( "(%s, %08X, %d), stub\n", debugstr_w(lpName), dwFlags, fForce );
I think it's better to keep this as TRACE, also maybe change lpName ->
name, dwFlags -> flags, fForce -> force. Flags are unused, so maybe some
fixme message for them is appropriate.
> + DWORD ret = WN_NO_NETWORK;
> + DWORD index;
>
> - return WN_SUCCESS;
> + if (providerTable != NULL)
> + {
> + for (index = 0; index < providerTable->numProviders; index++)
> + {
> + if(providerTable->table[index].getCaps(WNNC_CONNECTION) &
> + WNNC_CON_GETCONNECTIONS)
Shouldn't this be WNNC_CON_CANCELCONNECTION?
> + {
> + if (providerTable->table[index].cancelConnection)
> + ret = providerTable->table[index].cancelConnection((LPWSTR)lpName, fForce);
> + else
> + ret = WN_NO_NETWORK;
> + if (ret == WN_SUCCESS || ret == WN_OPEN_FILES)
> + break;
> + }
According to docs, WN_OPEN_FILES happens when force == FALSE, does it
make sense to handle it only in this case? Of course we have no easy way
to test any of that.
> + }
> + }
> + return ret;
> }
> +#if _MSVCP_VER >= 140
> +int __cdecl sprintf(char *buf, const char *fmt, ...)
> +{
> + int ret;
> + __ms_va_list valist;
> + __ms_va_start(valist, fmt);
> + ret = __stdio_common_vsprintf(2, buf, -1, fmt, NULL, valist);
> + __ms_va_end(valist);
> + return ret;
> +}
> +#endif
Are we missing patch 1/2 that adds msvcp140? Also won't it work the same
if you forward it to MSVCRT_sprintf? If _common_ functions should
actually be used, options should use existing private defines.
On 27.07.2016 17:42, Ken Thomases wrote:
> 64-bit Windows apps have hard-coded accesses to %gs:0x58 baked into them. They
> need to find the ThreadLocalStoragePointer there.
>
> Technically, the gsbase register and the memory it points to belong to the
> pthread implementation on macOS. It's used for the pthread TLS implementation.
> Slot 11 (offset 0x58) is currently used for the implementation of the ttyname()
> system library function. We do not anticipate that Wine or any of the system
> libraries or frameworks it uses will call ttyname(). Furthermore, Apple has
> made it so that future releases of macOS will no longer use that slot. So, we
> hijack it for our purposes.
>
> Signed-off-by: Ken Thomases <ken(a)codeweavers.com>
> ---
> dlls/ntdll/loader.c | 11 +++++++-
> dlls/ntdll/signal_x86_64.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 72 insertions(+), 1 deletion(-)
I'm not sure if I correctly understand the purpose of this patch. If you have to
set %gs:0x58 to some specific value, why not just use an assembly instruction for that?
On 2016-07-19 19:08, Aaryaman Vasishta wrote:
> + if (FAILED(hr = IDirect3DRMDevice_QueryInterface(device, &IID_IDirect3DRMDevice3, (void **)&device3)))
> + return hr;
> +
> + if (FAILED(hr = IDirect3DRMFrame_QueryInterface(camera, &IID_IDirect3DRMFrame3, (void **)&camera3)))
> + {
> + IDirect3DRMDevice3_Release(device3);
> + return hr;
> + }
> + IDirect3DRMDevice_Release(device);
> + IDirect3DRMFrame_Release(camera);
This releases references you don't own. Same in the V2 -> V3 thunk.
> + if (!device || !camera)
> + return D3DRMERR_BADOBJECT;
> + if (!viewport)
> + return D3DRMERR_BADVALUE;
These checks are redundant, Init() does that as well.
> + ok(ref4 == frame_ref, "Expected ref4 == frame_ref, got frame_ref = %u, ref4 = %u.\n", frame_ref, ref4);
> +
> + device_ref = get_refcount((IUnknown *)device1);
> + frame_ref = get_refcount((IUnknown *)frame);
The get_refcount here seems redundant because you've just shown that it is back to where it used to be.