"Reece Dunn" <msclrhd(a)googlemail.com> writes:
> +static WCHAR *get_button_text(HWND hwnd, int *len)
> +{
> + WCHAR *text;
> + *len = GetWindowTextLengthW(hwnd);
> + text = HeapAlloc(GetProcessHeap(), 0, (*len + 1) * sizeof(WCHAR));
> + if (text)
> + GetWindowTextW(hwnd, text, *len + 1);
> + return text;
> +}
You shouldn't return the length you got from GetWindowTextLength, it can
sometimes be larger than necessary. Use the actual length of the string
you fetched.
--
Alexandre Julliard
julliard(a)winehq.org
2008/11/4 Paul Vriens <paul.vriens.wine(a)gmail.com>:
> Hi,
>
> I upgraded to VMware 6.5.0 this morning and overlay tests are run now on my
> W2K3
> box. As the return value indicates E_NOTIMPL I decided to add a skip() for
> one particular test.
>
VMware is not a valid test platform for ddraw.
Paul Bryan Roberts <pbronline-wine(a)yahoo.co.uk> writes:
> The bit I take issue with is not cloning the "FIXME: get Unix uid and
> call fchown" in file_set_sd(), nor really the idea that this bit of
> code does nothing, not even return an error to indicate it has not
> succeeded but that it is always executed (as it were).
>
> This is because, as the code stands, the object's sd is not current.
> There should be a call to file_get_sd() to make it so, then
> file_set_sd() will only (not) try to change the file's ownership only
> if that is what the calling application wants. By putting the call to
> get_sd() in handle.c, the fix covers all implementations of
> get_sd()/set_sd(), which may not be what is wanted.
No, it's not what is wanted. If there's a need to retrieve some
information before setting that's the responsibility of the individual
object. Also returning an error on setting the owner can potentially
break some apps, for no good reason since we can't set the Unix owner
anyway.
--
Alexandre Julliard
julliard(a)winehq.org
Paul Bryan Roberts <pbronline-wine(a)yahoo.co.uk> writes:
> This patch adds a couple of conformance tests that check 'error'
> return codes. GetFileSecurity() is expected to be called twice - once
> to find out how much memory to allocate and again once the memory has
> been allocated. It seems the Windows implementation is a bit fussy
> and the implementation of GetFileSecurity() was changed to match.
That's not necessary, unless there's an application that depends on it.
Behavior on invalid parameters is usually inconsistent on Windows too,
so there's no need to write test cases for that sort of thing.
--
Alexandre Julliard
julliard(a)winehq.org
Nicolas Le Cam <niko.lecam(a)gmail.com> writes:
> @@ -614,7 +614,9 @@ static void test_enum_provider_types(void)
> DWORD dwTypeCount;
>
> /* actual values */
> - DWORD index = 0;
> + /* the first provider type registry key may not have a TypeName subkey
> + * we use the second one instead */
> + DWORD index = 1;
That's just moving the problem around, there's no reason that the second
one would always be guaranteed to have a typename.
--
Alexandre Julliard
julliard(a)winehq.org
Aric Stewart <aric(a)codeweavers.com> writes:
> diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c
> index fe70b80..1404436 100644
> --- a/dlls/user32/mdi.c
> +++ b/dlls/user32/mdi.c
> @@ -393,7 +393,8 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
> */
> static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
> {
> - UINT i, count, visible, id;
> + UINT i, visible, id;
> + INT count;
This shouldn't happen since the menu has just been validated. And if you
really want to handle that case you have to treat it as an error, not
just ignore it.
--
Alexandre Julliard
julliard(a)winehq.org
Hans Leidekker <hans(a)codeweavers.com> at Oct 31, 2008 5:32 AM wrote about Re: wininet: let automated testers force all DNS lookups to return localhost
>> Only include this in debugging builds.
>
>What happened to your /etc/hosts proposal? It has the
>advantage that we don't need changes to Wine source code.
>
This would not work on Macs as /etc/hosts is locked to admins only and would be a problem to implement.
James McKenzie