winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
737 discussions
Start a n
N
ew thread
Jacek Caban : oleaut32: Added warn+heap support for cached BSTRs.
by Alexandre Julliard
02 May '12
02 May '12
Module: wine Branch: master Commit: 2217e42c9d351a250fb27550d2262218721ebac1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2217e42c9d351a250fb27550d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 2 16:25:11 2012 +0200 oleaut32: Added warn+heap support for cached BSTRs. --- dlls/oleaut32/oleaut.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c index b84fdc4..97d1b96 100644 --- a/dlls/oleaut32/oleaut.c +++ b/dlls/oleaut32/oleaut.c @@ -41,6 +41,7 @@ #include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); +WINE_DECLARE_DEBUG_CHANNEL(heap); /****************************************************************************** * BSTR {OLEAUT32} @@ -97,6 +98,10 @@ typedef struct { #define BUCKET_SIZE 16 +#define ARENA_INUSE_FILLER 0x55 +#define ARENA_TAIL_FILLER 0xab +#define ARENA_FREE_FILLER 0xfeeefeee + static bstr_cache_entry_t bstr_cache[0x10000/BUCKET_SIZE]; static inline size_t bstr_alloc_size(size_t size) @@ -140,6 +145,14 @@ static bstr_t *alloc_bstr(size_t size) LeaveCriticalSection(&cs_bstr_cache); if(cache_entry) { + if(WARN_ON(heap)) { + size_t tail; + + memset(ret, ARENA_INUSE_FILLER, FIELD_OFFSET(bstr_t, u.ptr[size+sizeof(WCHAR)])); + tail = bstr_alloc_size(size) - FIELD_OFFSET(bstr_t, u.ptr[size+sizeof(WCHAR)]); + if(tail) + memset(ret->u.ptr+size+sizeof(WCHAR), ARENA_TAIL_FILLER, tail); + } ret->size = size; return ret; } @@ -250,6 +263,13 @@ void WINAPI SysFreeString(BSTR str) cache_entry->buf[(cache_entry->head+cache_entry->cnt)%((sizeof(cache_entry->buf)/sizeof(*cache_entry->buf)))] = bstr; cache_entry->cnt++; + if(WARN_ON(heap)) { + unsigned i, n = bstr_alloc_size(bstr->size) / sizeof(DWORD) - 1; + bstr->size = ARENA_FREE_FILLER; + for(i=0; i<n; i++) + bstr->u.dwptr[i] = ARENA_FREE_FILLER; + } + LeaveCriticalSection(&cs_bstr_cache); return; }
1
0
0
0
Jacek Caban : oleaut32: Use a struct for internal BSTR representation to avoid pointer magic.
by Alexandre Julliard
02 May '12
02 May '12
Module: wine Branch: master Commit: 4eebe0bcf099c9b5a41104c531e6ef3d33045df9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4eebe0bcf099c9b5a41104c53…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 2 16:24:57 2012 +0200 oleaut32: Use a struct for internal BSTR representation to avoid pointer magic. --- dlls/oleaut32/oleaut.c | 96 ++++++++++++++++++++++++++++-------------------- 1 files changed, 56 insertions(+), 40 deletions(-) diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c index bb3bac6..b84fdc4 100644 --- a/dlls/oleaut32/oleaut.c +++ b/dlls/oleaut32/oleaut.c @@ -81,9 +81,18 @@ static CRITICAL_SECTION_DEBUG cs_bstr_cache_dbg = static CRITICAL_SECTION cs_bstr_cache = { &cs_bstr_cache_dbg, -1, 0, 0, 0, 0 }; typedef struct { + DWORD size; + union { + char ptr[1]; + WCHAR str[1]; + DWORD dwptr[1]; + } u; +} bstr_t; + +typedef struct { unsigned short head; unsigned short cnt; - DWORD *buf[6]; + bstr_t *buf[6]; } bstr_cache_entry_t; #define BUCKET_SIZE 16 @@ -92,28 +101,32 @@ static bstr_cache_entry_t bstr_cache[0x10000/BUCKET_SIZE]; static inline size_t bstr_alloc_size(size_t size) { - return (size+sizeof(DWORD)+BUCKET_SIZE) & ~(BUCKET_SIZE-1); + return (FIELD_OFFSET(bstr_t, u.ptr[size]) + sizeof(WCHAR) + BUCKET_SIZE-1) & ~(BUCKET_SIZE-1); +} + +static inline bstr_t *bstr_from_str(BSTR str) +{ + return CONTAINING_RECORD(str, bstr_t, u.str); } static inline bstr_cache_entry_t *get_cache_entry(size_t size) { - unsigned cache_idx = (size+sizeof(DWORD)-1)/BUCKET_SIZE; + unsigned cache_idx = FIELD_OFFSET(bstr_t, u.ptr[size-1])/BUCKET_SIZE; return bstr_cache_enabled && cache_idx < sizeof(bstr_cache)/sizeof(*bstr_cache) ? bstr_cache + cache_idx : NULL; } -static DWORD *alloc_bstr(size_t size) +static bstr_t *alloc_bstr(size_t size) { - bstr_cache_entry_t *cache_entry = get_cache_entry(size); + bstr_cache_entry_t *cache_entry = get_cache_entry(size+sizeof(WCHAR)); + bstr_t *ret; if(cache_entry) { - DWORD *ret = NULL; - EnterCriticalSection(&cs_bstr_cache); if(!cache_entry->cnt) { - cache_entry = get_cache_entry(size+BUCKET_SIZE); + cache_entry = get_cache_entry(size+sizeof(WCHAR)+BUCKET_SIZE); if(cache_entry && !cache_entry->cnt) cache_entry = NULL; } @@ -126,11 +139,16 @@ static DWORD *alloc_bstr(size_t size) LeaveCriticalSection(&cs_bstr_cache); - if(ret) + if(cache_entry) { + ret->size = size; return ret; + } } - return HeapAlloc(GetProcessHeap(), 0, bstr_alloc_size(size)); + ret = HeapAlloc(GetProcessHeap(), 0, bstr_alloc_size(size)); + if(ret) + ret->size = size; + return ret; } /****************************************************************************** @@ -152,7 +170,7 @@ static DWORD *alloc_bstr(size_t size) */ UINT WINAPI SysStringLen(BSTR str) { - return str ? *((DWORD*)str-1)/sizeof(WCHAR) : 0; + return str ? bstr_from_str(str)->size/sizeof(WCHAR) : 0; } /****************************************************************************** @@ -171,7 +189,7 @@ UINT WINAPI SysStringLen(BSTR str) */ UINT WINAPI SysStringByteLen(BSTR str) { - return str ? *((DWORD*)str-1) : 0; + return str ? bstr_from_str(str)->size : 0; } /****************************************************************************** @@ -218,19 +236,20 @@ BSTR WINAPI SysAllocString(LPCOLESTR str) void WINAPI SysFreeString(BSTR str) { bstr_cache_entry_t *cache_entry; - DWORD *ptr; + bstr_t *bstr; if(!str) return; - ptr = (DWORD*)str-1; - cache_entry = get_cache_entry(*ptr+sizeof(WCHAR)); + bstr = bstr_from_str(str); + cache_entry = get_cache_entry(bstr->size+sizeof(WCHAR)); if(cache_entry) { EnterCriticalSection(&cs_bstr_cache); if(cache_entry->cnt < sizeof(cache_entry->buf)/sizeof(*cache_entry->buf)) { - cache_entry->buf[(cache_entry->head+cache_entry->cnt)%((sizeof(cache_entry->buf)/sizeof(*cache_entry->buf)))] = ptr; + cache_entry->buf[(cache_entry->head+cache_entry->cnt)%((sizeof(cache_entry->buf)/sizeof(*cache_entry->buf)))] = bstr; cache_entry->cnt++; + LeaveCriticalSection(&cs_bstr_cache); return; } @@ -238,7 +257,7 @@ void WINAPI SysFreeString(BSTR str) LeaveCriticalSection(&cs_bstr_cache); } - HeapFree(GetProcessHeap(), 0, ptr); + HeapFree(GetProcessHeap(), 0, bstr); } /****************************************************************************** @@ -259,28 +278,28 @@ void WINAPI SysFreeString(BSTR str) */ BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len) { - DWORD size, *ptr; - BSTR ret; + bstr_t *bstr; + DWORD size; /* Detect integer overflow. */ if (len >= ((UINT_MAX-sizeof(WCHAR)-sizeof(DWORD))/sizeof(WCHAR))) return NULL; + TRACE("%s\n", debugstr_wn(str, len)); + size = len*sizeof(WCHAR); - ptr = alloc_bstr(size + sizeof(WCHAR)); - if(!ptr) + bstr = alloc_bstr(size); + if(!bstr) return NULL; - *ptr = size; - ret = (BSTR)(ptr+1); if(str) { - memcpy(ret, str, size); - ret[len] = 0; + memcpy(bstr->u.str, str, size); + bstr->u.str[len] = 0; }else { - memset(ret, 0, size+sizeof(WCHAR)); + memset(bstr->u.str, 0, size+sizeof(WCHAR)); } - return ret; + return bstr->u.str; } /****************************************************************************** @@ -310,9 +329,9 @@ int WINAPI SysReAllocStringLen(BSTR* old, const OLECHAR* str, unsigned int len) if (*old!=NULL) { BSTR old_copy = *old; DWORD newbytelen = len*sizeof(WCHAR); - DWORD *ptr = HeapReAlloc(GetProcessHeap(),0,((DWORD*)*old)-1,bstr_alloc_size(newbytelen+sizeof(WCHAR))); - *old = (BSTR)(ptr+1); - *ptr = newbytelen; + bstr_t *bstr = HeapReAlloc(GetProcessHeap(),0,((DWORD*)*old)-1,bstr_alloc_size(newbytelen)); + *old = bstr->u.str; + bstr->size = newbytelen; /* Subtle hidden feature: The old string data is still there * when 'in' is NULL! * Some Microsoft program needs it. @@ -352,27 +371,24 @@ int WINAPI SysReAllocStringLen(BSTR* old, const OLECHAR* str, unsigned int len) */ BSTR WINAPI SysAllocStringByteLen(LPCSTR str, UINT len) { - DWORD *ptr; - char *ret; + bstr_t *bstr; /* Detect integer overflow. */ if (len >= (UINT_MAX-sizeof(WCHAR)-sizeof(DWORD))) return NULL; - ptr = alloc_bstr(len + sizeof(WCHAR)); - if(!ptr) + bstr = alloc_bstr(len); + if(!bstr) return NULL; - *ptr = len; - ret = (char*)(ptr+1); if(str) { - memcpy(ret, str, len); - ret[len] = ret[len+1] = 0; + memcpy(bstr->u.ptr, str, len); + bstr->u.ptr[len] = bstr->u.ptr[len+1] = 0; }else { - memset(ret, 0, len+sizeof(WCHAR)); + memset(bstr->u.ptr, 0, len+sizeof(WCHAR)); } - return (BSTR)ret; + return bstr->u.str; } /******************************************************************************
1
0
0
0
Józef Kucia : ddraw: Correct wrong comment in ddraw.h.
by Alexandre Julliard
02 May '12
02 May '12
Module: wine Branch: master Commit: e0fab0d39ccd19ca5bc3499305b0927e6f350431 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e0fab0d39ccd19ca5bc349930…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Wed May 2 15:06:34 2012 +0200 ddraw: Correct wrong comment in ddraw.h. --- include/ddraw.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/ddraw.h b/include/ddraw.h index 5feddf4..1765b1e 100644 --- a/include/ddraw.h +++ b/include/ddraw.h @@ -885,7 +885,7 @@ typedef struct _DDPIXELFORMAT { #define DDOVER_OVERRIDEBOBWEAVE 0x00400000 #define DDOVER_INTERLEAVED 0x00800000 -/* DDCOLORKEY.dwFlags */ +/* DDPIXELFORMAT.dwFlags */ #define DDPF_ALPHAPIXELS 0x00000001 #define DDPF_ALPHA 0x00000002 #define DDPF_FOURCC 0x00000004
1
0
0
0
Austin English : kernel32: Add a stub for FlushProcessWriteBuffers.
by Alexandre Julliard
02 May '12
02 May '12
Module: wine Branch: master Commit: 80ef24b057374fa498b493ef66d55f9d52911caa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80ef24b057374fa498b493ef6…
Author: Austin English <austinenglish(a)gmail.com> Date: Tue May 1 15:26:24 2012 -0500 kernel32: Add a stub for FlushProcessWriteBuffers. --- dlls/kernel32/kernel32.spec | 1 + dlls/kernel32/process.c | 7 +++++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 10d6da5..9b786a9 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -409,6 +409,7 @@ @ stdcall FlushConsoleInputBuffer(long) @ stdcall FlushFileBuffers(long) @ stdcall FlushInstructionCache(long long long) +@ stdcall FlushProcessWriteBuffers() @ stdcall FlushViewOfFile(ptr long) @ stdcall FoldStringA(long str long ptr long) @ stdcall FoldStringW(long wstr long ptr long) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 21f0817..dca8561 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -3856,5 +3856,12 @@ BOOL WINAPI GetProcessDEPPolicy(HANDLE process, LPDWORD flags, PBOOL permanent) FIXME("(%p %p %p): stub\n", process, flags, permanent); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; +} +/********************************************************************** + * FlushProcessWriteBuffers (KERNEL32.@) + */ +VOID WINAPI FlushProcessWriteBuffers(void) +{ + FIXME(": stub\n"); }
1
0
0
0
Christian Costa : dmusic: Check errors in IDirectMusic8Impl_Activate and remove FIXME.
by Alexandre Julliard
02 May '12
02 May '12
Module: wine Branch: master Commit: 4c0f0281bd1d53461df43155032605cff5a5a01b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c0f0281bd1d53461df431550…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue May 1 10:07:23 2012 +0200 dmusic: Check errors in IDirectMusic8Impl_Activate and remove FIXME. --- dlls/dmusic/dmusic.c | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index 28c8d35..1a00236 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -285,17 +285,22 @@ static HRESULT WINAPI IDirectMusic8Impl_SetMasterClock(LPDIRECTMUSIC8 iface, REF return S_OK; } -static HRESULT WINAPI IDirectMusic8Impl_Activate(LPDIRECTMUSIC8 iface, BOOL fEnable) +static HRESULT WINAPI IDirectMusic8Impl_Activate(LPDIRECTMUSIC8 iface, BOOL enable) { - IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); - int i; - - FIXME("(%p, %d): stub\n", This, fEnable); - for (i = 0; i < This->nrofports; i++) { - IDirectMusicPort_Activate(This->ppPorts[i], fEnable); - } - - return S_OK; + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); + int i; + HRESULT hr; + + TRACE("(%p)->(%u)\n", This, enable); + + for (i = 0; i < This->nrofports; i++) + { + hr = IDirectMusicPort_Activate(This->ppPorts[i], enable); + if (FAILED(hr)) + return hr; + } + + return S_OK; } static HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort(LPDIRECTMUSIC8 iface, LPGUID pguidPort)
1
0
0
0
Christian Costa : dmusic: Implement IDirectMusic8Impl_EnumMasterClock.
by Alexandre Julliard
02 May '12
02 May '12
Module: wine Branch: master Commit: 5ae038b2e80dd057534d41fe81c56392b3fa76dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ae038b2e80dd057534d41fe8…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue May 1 10:07:09 2012 +0200 dmusic: Implement IDirectMusic8Impl_EnumMasterClock. --- dlls/dmusic/dmusic.c | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index f4b6c8c..28c8d35 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -233,11 +233,34 @@ static HRESULT WINAPI IDirectMusic8Impl_CreatePort(LPDIRECTMUSIC8 iface, REFCLSI static HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock(LPDIRECTMUSIC8 iface, DWORD index, LPDMUS_CLOCKINFO clock_info) { - IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); + TRACE("(%p)->(%d, %p)\n", iface, index, clock_info); - FIXME("(%p)->(%d, %p): stub\n", This, index, clock_info); + if (!clock_info) + return E_POINTER; - return S_FALSE; + if (index > 1) + return S_FALSE; + + if (!index) + { + static const GUID guid_system_clock = { 0x58d58419, 0x71b4, 0x11d1, { 0xa7, 0x4c, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12 } }; + static const WCHAR name_system_clock[] = { 'S','y','s','t','e','m',' ','C','l','o','c','k',0 }; + + clock_info->ctType = 0; + clock_info->guidClock = guid_system_clock; + strcpyW(clock_info->wszDescription, name_system_clock); + } + else + { + static const GUID guid_dsound_clock = { 0x58d58420, 0x71b4, 0x11d1, { 0xa7, 0x4c, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12 } }; + static const WCHAR name_dsound_clock[] = { 'D','i','r','e','c','t','S','o','u','n','d',' ','C','l','o','c','k',0 }; + + clock_info->ctType = 0; + clock_info->guidClock = guid_dsound_clock; + strcpyW(clock_info->wszDescription, name_dsound_clock); + } + + return S_OK; } static HRESULT WINAPI IDirectMusic8Impl_GetMasterClock(LPDIRECTMUSIC8 iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock)
1
0
0
0
Christian Costa : dmusic: COM cleanup of IDirectMusic8.
by Alexandre Julliard
02 May '12
02 May '12
Module: wine Branch: master Commit: 16071b244ac9ff08acf5890e97e66f754be1ff8d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=16071b244ac9ff08acf5890e9…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue May 1 10:06:58 2012 +0200 dmusic: COM cleanup of IDirectMusic8. --- dlls/dmusic/dmusic.c | 87 ++++++++++++++++++++++++++--------------- dlls/dmusic/dmusic_private.h | 16 ++++---- 2 files changed, 63 insertions(+), 40 deletions(-) diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index 3f22fe0..f4b6c8c 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -23,9 +23,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmusic); +static inline IDirectMusic8Impl *impl_from_IDirectMusic8(IDirectMusic8 *iface) +{ + return CONTAINING_RECORD(iface, IDirectMusic8Impl, IDirectMusic8_iface); +} + /* IDirectMusic8Impl IUnknown part: */ -static HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID riid, LPVOID *ppobj) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; +static HRESULT WINAPI IDirectMusic8Impl_QueryInterface(LPDIRECTMUSIC8 iface, REFIID riid, LPVOID *ppobj) +{ + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj); if (IsEqualIID (riid, &IID_IUnknown) || @@ -41,8 +47,9 @@ static HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, RE return E_NOINTERFACE; } -static ULONG WINAPI IDirectMusic8Impl_AddRef (LPDIRECTMUSIC8 iface) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; +static ULONG WINAPI IDirectMusic8Impl_AddRef(LPDIRECTMUSIC8 iface) +{ + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); ULONG refCount = InterlockedIncrement(&This->ref); TRACE("(%p)->(ref before=%u)\n", This, refCount - 1); @@ -52,8 +59,9 @@ static ULONG WINAPI IDirectMusic8Impl_AddRef (LPDIRECTMUSIC8 iface) { return refCount; } -static ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; +static ULONG WINAPI IDirectMusic8Impl_Release(LPDIRECTMUSIC8 iface) +{ + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); ULONG refCount = InterlockedDecrement(&This->ref); TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); @@ -71,7 +79,7 @@ static ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface) { /* IDirectMusic8Impl IDirectMusic part: */ static HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD index, LPDMUS_PORTCAPS port_caps) { - IDirectMusic8Impl *This = (IDirectMusic8Impl*)iface; + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); ULONG nb_midi_out; ULONG nb_midi_in; const WCHAR emulated[] = {' ','[','E','m','u','l','a','t','e','d',']',0}; @@ -155,7 +163,7 @@ static HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD ind static HRESULT WINAPI IDirectMusic8Impl_CreateMusicBuffer(LPDIRECTMUSIC8 iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER* ppBuffer, LPUNKNOWN pUnkOuter) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); TRACE("(%p, %p, %p, %p)\n", This, pBufferDesc, ppBuffer, pUnkOuter); @@ -170,7 +178,7 @@ static HRESULT WINAPI IDirectMusic8Impl_CreateMusicBuffer(LPDIRECTMUSIC8 iface, static HRESULT WINAPI IDirectMusic8Impl_CreatePort(LPDIRECTMUSIC8 iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); int i; DMUS_PORTCAPS PortCaps; IDirectMusicPort* pNewPort = NULL; @@ -223,14 +231,18 @@ static HRESULT WINAPI IDirectMusic8Impl_CreatePort(LPDIRECTMUSIC8 iface, REFCLSI return E_NOINTERFACE; } -static HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; - FIXME("(%p, %d, %p): stub\n", This, dwIndex, lpClockInfo); - return S_FALSE; +static HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock(LPDIRECTMUSIC8 iface, DWORD index, LPDMUS_CLOCKINFO clock_info) +{ + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); + + FIXME("(%p)->(%d, %p): stub\n", This, index, clock_info); + + return S_FALSE; } -static HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; +static HRESULT WINAPI IDirectMusic8Impl_GetMasterClock(LPDIRECTMUSIC8 iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock) +{ + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); TRACE("(%p, %p, %p)\n", This, pguidClock, ppReferenceClock); if (pguidClock) @@ -241,14 +253,18 @@ static HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LP return S_OK; } -static HRESULT WINAPI IDirectMusic8Impl_SetMasterClock (LPDIRECTMUSIC8 iface, REFGUID rguidClock) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; - FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidClock)); - return S_OK; +static HRESULT WINAPI IDirectMusic8Impl_SetMasterClock(LPDIRECTMUSIC8 iface, REFGUID rguidClock) +{ + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); + + FIXME("(%p)->(%s): stub\n", This, debugstr_dmguid(rguidClock)); + + return S_OK; } -static HRESULT WINAPI IDirectMusic8Impl_Activate (LPDIRECTMUSIC8 iface, BOOL fEnable) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; +static HRESULT WINAPI IDirectMusic8Impl_Activate(LPDIRECTMUSIC8 iface, BOOL fEnable) +{ + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); int i; FIXME("(%p, %d): stub\n", This, fEnable); @@ -259,8 +275,9 @@ static HRESULT WINAPI IDirectMusic8Impl_Activate (LPDIRECTMUSIC8 iface, BOOL fEn return S_OK; } -static HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pguidPort) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; +static HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort(LPDIRECTMUSIC8 iface, LPGUID pguidPort) +{ + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); HKEY hkGUID; DWORD returnTypeGUID, sizeOfReturnBuffer = 50; char returnBuffer[51]; @@ -283,16 +300,22 @@ static HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LP return S_OK; } -static HRESULT WINAPI IDirectMusic8Impl_SetDirectSound (LPDIRECTMUSIC8 iface, LPDIRECTSOUND pDirectSound, HWND hWnd) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; - FIXME("(%p, %p, %p): stub\n", This, pDirectSound, hWnd); - return S_OK; +static HRESULT WINAPI IDirectMusic8Impl_SetDirectSound(LPDIRECTMUSIC8 iface, LPDIRECTSOUND dsound, HWND wnd) +{ + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); + + FIXME("(%p)->(%p, %p): stub\n", This, dsound, wnd); + + return S_OK; } -static HRESULT WINAPI IDirectMusic8Impl_SetExternalMasterClock (LPDIRECTMUSIC8 iface, IReferenceClock* pClock) { - IDirectMusic8Impl *This = (IDirectMusic8Impl *)iface; - FIXME("(%p, %p): stub\n", This, pClock); - return S_OK; +static HRESULT WINAPI IDirectMusic8Impl_SetExternalMasterClock(LPDIRECTMUSIC8 iface, IReferenceClock* clock) +{ + IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface); + + FIXME("(%p)->(%p): stub\n", This, clock); + + return S_OK; } static const IDirectMusic8Vtbl DirectMusic8_Vtbl = { @@ -322,7 +345,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPU *ppobj = NULL; return E_OUTOFMEMORY; } - dmusic->lpVtbl = &DirectMusic8_Vtbl; + dmusic->IDirectMusic8_iface.lpVtbl = &DirectMusic8_Vtbl; dmusic->ref = 0; /* will be inited with QueryInterface */ dmusic->pMasterClock = NULL; dmusic->ppPorts = NULL; diff --git a/dlls/dmusic/dmusic_private.h b/dlls/dmusic/dmusic_private.h index 23d010d..896e207 100644 --- a/dlls/dmusic/dmusic_private.h +++ b/dlls/dmusic/dmusic_private.h @@ -91,14 +91,14 @@ extern HRESULT DMUSIC_CreateDirectMusicInstrumentImpl (LPCGUID lpcGUID, LPVOID* * IDirectMusic8Impl implementation structure */ struct IDirectMusic8Impl { - /* IUnknown fields */ - const IDirectMusic8Vtbl *lpVtbl; - LONG ref; + /* IUnknown fields */ + IDirectMusic8 IDirectMusic8_iface; + LONG ref; - /* IDirectMusicImpl fields */ - IReferenceClockImpl* pMasterClock; - IDirectMusicPort** ppPorts; - int nrofports; + /* IDirectMusicImpl fields */ + IReferenceClockImpl* pMasterClock; + IDirectMusicPort** ppPorts; + int nrofports; }; /*****************************************************************************
1
0
0
0
Christian Costa : dmusic: Add tests to enumerate master clocks.
by Alexandre Julliard
02 May '12
02 May '12
Module: wine Branch: master Commit: 0eaf5c156bd74607ba467c0f63d63572bc04c462 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0eaf5c156bd74607ba467c0f6…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue May 1 10:25:45 2012 +0200 dmusic: Add tests to enumerate master clocks. --- dlls/dmusic/tests/dmusic.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c index a05afcc..fb4b307 100644 --- a/dlls/dmusic/tests/dmusic.c +++ b/dlls/dmusic/tests/dmusic.c @@ -47,6 +47,7 @@ static void test_dmusic(void) DMUS_PORTCAPS port_caps; DMUS_PORTPARAMS port_params; IDirectMusicPort *port = NULL; + DMUS_CLOCKINFO clock_info; hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (LPVOID*)&dmusic); if (hr != S_OK) @@ -99,6 +100,18 @@ static void test_dmusic(void) index++; } + index = 0; + clock_info.dwSize = sizeof(clock_info); + while (IDirectMusic_EnumMasterClock(dmusic, index, &clock_info) == S_OK) + { + ok(clock_info.dwSize == sizeof(clock_info), "DMUS_CLOCKINFO dwSize member is wrong (%u)\n", clock_info.dwSize); + trace("Clock %u:\n", index); + trace(" ctType = %u\n", clock_info.ctType); + trace(" guidClock = %s\n", debugstr_guid(&clock_info.guidClock)); + trace(" wszDescription = %s\n", wine_dbgstr_w(clock_info.wszDescription)); + index++; + } + if (port) IDirectMusicPort_Release(port); IDirectMusic_Release(dmusic);
1
0
0
0
Alexandre Julliard : wininet/tests: Add some optional COOKIE_SENT messages in various places.
by Alexandre Julliard
02 May '12
02 May '12
Module: wine Branch: master Commit: 415d7a4401812681bc078f5c24c48dd9220dc220 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=415d7a4401812681bc078f5c2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 2 13:01:34 2012 +0200 wininet/tests: Add some optional COOKIE_SENT messages in various places. --- dlls/wininet/tests/http.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index eb7f868..fddef12 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -128,7 +128,7 @@ static const test_data_t test_data[] = { "
test.winehq.org
", "/tests/data.php", "", - TESTF_CHUNKED + TESTF_CHUNKED|TESTF_ALLOW_COOKIE }, { "
http://test.winehq.org/tests/redirect
", @@ -152,7 +152,7 @@ static const test_data_t test_data[] = { "
test.winehq.org
", "/tests/post.php", "Content-Type: application/x-www-form-urlencoded", - 0, + TESTF_ALLOW_COOKIE, "mode=Test", "mode => Test\n" } @@ -766,6 +766,7 @@ static void InternetReadFileExA_test(int flags) SET_EXPECT(INTERNET_STATUS_RESOLVING_NAME); SET_EXPECT(INTERNET_STATUS_NAME_RESOLVED); } + SET_OPTIONAL(INTERNET_STATUS_COOKIE_SENT); SET_EXPECT(INTERNET_STATUS_CONNECTING_TO_SERVER); SET_EXPECT(INTERNET_STATUS_CONNECTED_TO_SERVER); SET_EXPECT2(INTERNET_STATUS_SENDING_REQUEST, 2); @@ -819,6 +820,7 @@ static void InternetReadFileExA_test(int flags) CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_COMPLETE); else todo_wine CHECK_NOT_NOTIFIED(INTERNET_STATUS_REQUEST_COMPLETE); + CLEAR_NOTIFIED(INTERNET_STATUS_COOKIE_SENT); /* Sent on WinXP only if first_connection_to_test_url is TRUE, on Win98 always sent */ CLEAR_NOTIFIED(INTERNET_STATUS_CONNECTING_TO_SERVER); CLEAR_NOTIFIED(INTERNET_STATUS_CONNECTED_TO_SERVER); @@ -3318,6 +3320,7 @@ static const struct notification async_send_request_ex_test[] = { internet_connect, INTERNET_STATUS_HANDLE_CREATED, 0 }, { http_open_request, INTERNET_STATUS_HANDLE_CREATED, 0 }, { http_send_request_ex, INTERNET_STATUS_DETECTING_PROXY, 1, 0, 1 }, + { http_send_request_ex, INTERNET_STATUS_COOKIE_SENT, 1, 0, 1 }, { http_send_request_ex, INTERNET_STATUS_RESOLVING_NAME, 1, 0, 1 }, { http_send_request_ex, INTERNET_STATUS_NAME_RESOLVED, 1, 0, 1 }, { http_send_request_ex, INTERNET_STATUS_CONNECTING_TO_SERVER, 1 }, @@ -3341,6 +3344,7 @@ static const struct notification async_send_request_ex_test2[] = { internet_connect, INTERNET_STATUS_HANDLE_CREATED, 0 }, { http_open_request, INTERNET_STATUS_HANDLE_CREATED, 0 }, { http_send_request_ex, INTERNET_STATUS_DETECTING_PROXY, 1, 0, 1 }, + { http_send_request_ex, INTERNET_STATUS_COOKIE_SENT, 1, 0, 1 }, { http_send_request_ex, INTERNET_STATUS_RESOLVING_NAME, 1, 0, 1 }, { http_send_request_ex, INTERNET_STATUS_NAME_RESOLVED, 1, 0, 1 }, { http_send_request_ex, INTERNET_STATUS_CONNECTING_TO_SERVER, 1, 1 },
1
0
0
0
Alexandre Julliard : wing32: Use the correct constant names for CreateDIBSection.
by Alexandre Julliard
02 May '12
02 May '12
Module: wine Branch: master Commit: b7bb7861076d471baf483197f2d53ae1ea3f4ecb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7bb7861076d471baf483197f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 2 12:10:59 2012 +0200 wing32: Use the correct constant names for CreateDIBSection. --- dlls/wing.dll16/wing.c | 2 +- dlls/wing32/wing32.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wing.dll16/wing.c b/dlls/wing.dll16/wing.c index fb4aa56..e1f2c07 100644 --- a/dlls/wing.dll16/wing.c +++ b/dlls/wing.dll16/wing.c @@ -178,7 +178,7 @@ HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 hdc, BITMAPINFO *bmpi, SEGPTR *bits) TRACE("(%d,%p,%p): create %dx%dx%d bitmap\n", hdc, bmpi, bits, bmpi->bmiHeader.biWidth, bmpi->bmiHeader.biHeight, bmpi->bmiHeader.biPlanes); - hbitmap = CreateDIBSection( HDC_32(hdc), bmpi, BI_RGB, &bits32, 0, 0 ); + hbitmap = CreateDIBSection( HDC_32(hdc), bmpi, DIB_RGB_COLORS, &bits32, 0, 0 ); if (hbitmap) { SEGPTR segptr = alloc_segptr_bits( hbitmap, bits32 ); diff --git a/dlls/wing32/wing32.c b/dlls/wing32/wing32.c index ac74986..7ec5914 100644 --- a/dlls/wing32/wing32.c +++ b/dlls/wing32/wing32.c @@ -60,7 +60,7 @@ BOOL WINAPI WinGRecommendDIBFormat( BITMAPINFO *bmi ) */ HBITMAP WINAPI WinGCreateBitmap( HDC hdc, BITMAPINFO *bmi, void **bits ) { - return CreateDIBSection( hdc, bmi, 0, bits, 0, 0 ); + return CreateDIBSection( hdc, bmi, DIB_RGB_COLORS, bits, 0, 0 ); } /***********************************************************************
1
0
0
0
← Newer
1
...
66
67
68
69
70
71
72
73
74
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Results per page:
10
25
50
100
200