Re: shlwapi: stub implementation for SHSetTimerQueueTimer

2007-05-18 Thread Dmitry Timoshkov
"Nigel Liang" <[EMAIL PROTECTED]> wrote: +CreateTimerQueueTimer(phNewTimer, hQueue, pfnCallback, pContext, +dwDueTime, dwPeriod, dwFlags); + +return *phNewTimer; You have to check the return value of CreateTimerQueueTimer before returning a possible garbage. -- Dmitry.

Re: RegDeleteTree [6]

2007-05-18 Thread Juan Lang
Hi Stefan, +if (!lpszName) { +ret = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; +} Now you're mixing tabs and spaces (here and elsewhere.) Please honor the existing formatting. --Juan ___

Re: [PATCH 3/4] msi: automation: Generalize list implementation.

2007-05-18 Thread Andrew Talbot
Misha Koshelev wrote: > So is the general recommendation for wine that we not use Hungarian > notation then? > > Misha IMHO, a prefix is of little value if it merely echos the declared type of the variable it represents, especially in a small-scope situation. To be of value, a prefix needs to co

Re: [PATCH 3/4] msi: automation: Generalize list implementation.

2007-05-18 Thread Stefan Dösinger
Am Freitag 18 Mai 2007 23:17 schrieb Misha Koshelev: > On Fri, 2007-05-18 at 20:15 +0200, Alexandre Julliard wrote: > > Misha Koshelev <[EMAIL PROTECTED]> writes: > > > if (wFlags & DISPATCH_PROPERTYGET) { > > > V_VT(pVarResult) = VT_I4; > > > -V_I4(pVa

RE: advapi32: Route all 4 EnumServicesStatus[Ex] calls to a single stubto avoid code duplication

2007-05-18 Thread Rolf Kalbermatter
Paul Chitescu wrote: >Changelog: advapi32: Route all 4 EnumServicesStatus[Ex] calls to a single >stub to avoid code duplication > >Most of the actual enumeration is common code so it makes sense to implement it only once. This is a possible approach. I had intended to just make use of EnumService

Re: [PATCH 3/4] msi: automation: Generalize list implementation.

2007-05-18 Thread Misha Koshelev
On Fri, 2007-05-18 at 20:15 +0200, Alexandre Julliard wrote: > Misha Koshelev <[EMAIL PROTECTED]> writes: > > > if (wFlags & DISPATCH_PROPERTYGET) { > > V_VT(pVarResult) = VT_I4; > > -V_I4(pVarResult) = data->iCount; > > +V_I4(pVarResul

ADVAPI32: service tests

2007-05-18 Thread Rolf Kalbermatter
While working on some advapi32.service functions I found that having some tests for those APIs could be very useful. However nbot having added completely new tests so far there are a few issues I feel intimidated about. The actual task of adding a new test file service.c does seem fairly straightf

Re: [PATCH 3/4] msi: automation: Generalize list implementation.

2007-05-18 Thread Alexandre Julliard
Misha Koshelev <[EMAIL PROTECTED]> writes: > if (wFlags & DISPATCH_PROPERTYGET) { > V_VT(pVarResult) = VT_I4; > -V_I4(pVarResult) = data->iCount; > +V_I4(pVarResult) = data->ulCount; I committed this patch, but I can't resist pointing

Re: RegDeleteTree [5]

2007-05-18 Thread Juan Lang
Hi Stefan, +if (ret) return ret; + +ret = RegDeleteTreeW(hSubKey, lpszName); +if (ret) return ret; you've followed James's advice, but now you leak hSubKey (when it isn't hKey) and lpszName (when it isn't szNameBuf.) A goto would be better. --Juan _

Direct3D thread safety review

2007-05-18 Thread Stefan Dösinger
Hi, After writing some tests for synchronisation in ddraw, I have new versions of my thread safety patches for ddraw. I want to show them for some ideas / comments before sending them in. Basically windows ddraw seems to hold a DLL global lock whenever some code of the DLL is executed even in

Re: ntdll: Protect RtlAllocateHeap and RtlReAllocateHeap against integer overflows with large values of size.

2007-05-18 Thread Robert Shearman
Chris Robinson wrote: On Friday 18 May 2007 05:12:30 am you wrote: An example that would break using your logic: 2 + (-1) SIZE_T (if it follows standard size_t) is unsigned, though. Adding a negative wouldn't be possible. Yes, you're right. The second parameter should probably be SS

Re: ntdll: Protect RtlAllocateHeap and RtlReAllocateHeap against integer overflows with large values of size.

2007-05-18 Thread Chris Robinson
On Friday 18 May 2007 05:12:30 am you wrote: > An example that would break using your logic: > 2 + (-1) SIZE_T (if it follows standard size_t) is unsigned, though. Adding a negative wouldn't be possible.

Re: ntdll: Protect RtlAllocateHeap and RtlReAllocateHeap against integer overflows with large values of size.

2007-05-18 Thread Robert Shearman
Chris Robinson wrote: On Friday 18 May 2007 04:01:19 am Robert Shearman wrote: +ULONGLONG llret = (ULONGLONG)a + b; +if ((sizeof(SIZE_T) < sizeof(ULONGLONG)) && (llret > 0x)) +return FALSE; WOuldn't this be more correct (as well as function when sizeof(SIZE_T) >

Re: ntdll: Protect RtlAllocateHeap and RtlReAllocateHeap against integer overflows with large values of size.

2007-05-18 Thread Chris Robinson
On Friday 18 May 2007 04:01:19 am Robert Shearman wrote: > +    ULONGLONG llret = (ULONGLONG)a + b; > +    if ((sizeof(SIZE_T) < sizeof(ULONGLONG)) && (llret > 0x)) > +        return FALSE; WOuldn't this be more correct (as well as function when sizeof(SIZE_T) >= sizeof(ULONGLONG)): SIZE

Re: msxml3 [1/4]: Add initial implementations of IXMLElement and IXMLElementCollection

2007-05-18 Thread Huw Davies
On Thu, May 17, 2007 at 04:40:06PM -0500, James Hawkins wrote: > > Changelog: > * Add initial implementations of IXMLElement and IXMLElementCollection. I can't help thinking that it would have been cleaner to implement the IXML stuff using the IXMLDOM interfaces rather than straight on top of li

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-18 Thread Alexandre Julliard
Robert Shearman <[EMAIL PROTECTED]> writes: > In this case, it is. The "Basic" string should be followed by some > additional data which is parsed later. Yes, but AFAICS it's still supposed to be a separate token, so you'd need to check for a token separator. I don't think "Basically" should be c

Re: 3/4 setupapi: Correctly handle an empty filename in SetupGetSourceFileLocationA.

2007-05-18 Thread Hans Leidekker
On Friday 18 May 2007 11:43:29 James Hawkins wrote: > > Correctly handle an empty filename in SetupGetSourceFileLocationA. > > Please add a test case. The BITS installer was enough of a test case for me here, but since you ask, I'll see what I can do. -Hans

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-18 Thread Robert Shearman
Alexandre Julliard wrote: Robert Shearman <[EMAIL PROTECTED]> writes: Hmm, it seems strncmpiW already does that for me so I'm a little confused: int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n ) { int ret = 0; for ( ; n > 0; n--, str1++, str2++) if ((ret = to

Re: 3/4 setupapi: Correctly handle an empty filename in SetupGetSourceFileLocationA.

2007-05-18 Thread James Hawkins
On 5/18/07, Hans Leidekker <[EMAIL PROTECTED]> wrote: -Hans Changelog Correctly handle an empty filename in SetupGetSourceFileLocationA. Please add a test case. -- James Hawkins

Re: 2/4 setupapi: Don't return ERROR_WRONG_INF_STYLE when there is no version section.

2007-05-18 Thread James Hawkins
On 5/18/07, Hans Leidekker <[EMAIL PROTECTED]> wrote: -Hans Changelog Don't return ERROR_WRONG_INF_STYLE when there is no version section. This is a change that is begging for a test case. -- James Hawkins

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-18 Thread Alexandre Julliard
Robert Shearman <[EMAIL PROTECTED]> writes: > Hmm, it seems strncmpiW already does that for me so I'm a little confused: >> int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n ) >> { >> int ret = 0; >> for ( ; n > 0; n--, str1++, str2++) >> if ((ret = tolowerW(*str1) - tolow

Re: hhctrl.ocx: Parse HTML entities in the table of contents.

2007-05-18 Thread Robert Shearman
Alexandre Julliard wrote: Robert Shearman <[EMAIL PROTECTED]> writes: +/* hexadecimal entity */ +while ((*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f') || + (*p >= 'A' && *p <= 'F') || (*p == ';')) +p++; Yo

Re: mshtml: Change the binding flags when silent operation is requested by the DISPID_AMBIENT_SILENT property.

2007-05-18 Thread Robert Shearman
Alexandre Julliard wrote: Robert Shearman <[EMAIL PROTECTED]> writes: The binding flags should be have BINDF_SILENTOPERATION and BIND_NO_UI added. This breaks the tests: ../../../tools/runtest -q -P wine -M shdocvw.dll -T ../../.. -p shdocvw_test.exe.so webbrowser.c && touch webbrow

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-18 Thread Robert Shearman
Juan Lang wrote: Hi Rob, +static UINT HTTP_DecodeBase64(LPCWSTR base64, LPSTR bin); Do we really have to keep proliferating base64 implementations? Could you not implement CryptStringToBinaryW instead? Should be mostly a copy-paste job.. CryptStringToBinaryW is a lot more complicated t

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-18 Thread Robert Shearman
Alexandre Julliard wrote: Robert Shearman <[EMAIL PROTECTED]> writes: +if (strncmpiW(pszAuthValue, szBasic, sizeof(szBasic)/sizeof(szBasic[0])-1)) +{ When using strncmp you need to also check that you reached the end of the first string. Hmm, it seems strncmpiW a