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 2007
----- 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
3 participants
715 discussions
Start a n
N
ew thread
Andrew Talbot : mshtml: Constify some variables.
by Alexandre Julliard
31 May '07
31 May '07
Module: wine Branch: master Commit: 0608054a6de9bd790c1611fd52705406a8a30c0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0608054a6de9bd790c1611fd5…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Wed May 30 22:38:03 2007 +0100 mshtml: Constify some variables. --- dlls/mshtml/htmlwindow.c | 2 +- dlls/mshtml/mshtml_private.h | 4 ++-- dlls/mshtml/nsembed.c | 4 ++-- dlls/mshtml/task.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 6cd106f..4375901 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -743,7 +743,7 @@ HTMLWindow *HTMLWindow_Create(HTMLDocument *doc) return ret; } -HTMLWindow *nswindow_to_window(nsIDOMWindow *nswindow) +HTMLWindow *nswindow_to_window(const nsIDOMWindow *nswindow) { HTMLWindow *iter; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index b2a7c69..39e4533 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -295,7 +295,7 @@ HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**); HRESULT HTMLLoadOptions_Create(IUnknown*,REFIID,void**); HTMLWindow *HTMLWindow_Create(HTMLDocument*); -HTMLWindow *nswindow_to_window(nsIDOMWindow*); +HTMLWindow *nswindow_to_window(const nsIDOMWindow*); void HTMLDocument_HTMLDocument3_Init(HTMLDocument*); void HTMLDocument_Persist_Init(HTMLDocument*); @@ -406,7 +406,7 @@ typedef struct { thread_data_t *get_thread_data(BOOL); HWND get_thread_hwnd(void); void push_task(task_t*); -void remove_doc_tasks(HTMLDocument*); +void remove_doc_tasks(const HTMLDocument*); DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B); DEFINE_GUID(CLSID_JSProtocol, 0x3050F3B2, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B); diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 452be8b..9cebe47 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -119,7 +119,7 @@ static void register_nscontainer_class(void) nscontainer_class = RegisterClassExW(&wndclass); } -static BOOL load_xpcom(PRUnichar *gre_path) +static BOOL load_xpcom(const PRUnichar *gre_path) { WCHAR path_env[MAX_PATH]; int len; @@ -247,7 +247,7 @@ static void set_profile(void) nsIProfile_Release(profile); } -static BOOL init_xpcom(PRUnichar *gre_path) +static BOOL init_xpcom(const PRUnichar *gre_path) { nsresult nsres; nsIObserver *pStartNotif; diff --git a/dlls/mshtml/task.c b/dlls/mshtml/task.c index d01c17d..8949cdf 100644 --- a/dlls/mshtml/task.c +++ b/dlls/mshtml/task.c @@ -66,7 +66,7 @@ static task_t *pop_task(void) return task; } -void remove_doc_tasks(HTMLDocument *doc) +void remove_doc_tasks(const HTMLDocument *doc) { thread_data_t *thread_data = get_thread_data(FALSE); task_t *iter, *tmp;
1
0
0
0
James Hawkins : wintrust: Add stub implementations for CryptCATAdminAddCatalog and CryptCATAdminReleaseCatalogContext .
by Alexandre Julliard
31 May '07
31 May '07
Module: wine Branch: master Commit: 98350044d5c184445430700c0f916142b693883c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=98350044d5c184445430700c0…
Author: James Hawkins <truiken(a)gmail.com> Date: Wed May 30 15:44:43 2007 -0700 wintrust: Add stub implementations for CryptCATAdminAddCatalog and CryptCATAdminReleaseCatalogContext. --- dlls/wintrust/crypt.c | 34 ++++++++++++++++++++++++++++++++++ dlls/wintrust/wintrust.spec | 4 ++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/dlls/wintrust/crypt.c b/dlls/wintrust/crypt.c index 3dd127c..9a1ecdb 100644 --- a/dlls/wintrust/crypt.c +++ b/dlls/wintrust/crypt.c @@ -55,6 +55,17 @@ BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN* catAdmin, } /*********************************************************************** + * CryptCATAdminAddCatalog (WINTRUST.@) + */ +BOOL WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, WCHAR *catalogFile, + WCHAR *selectBaseName, DWORD flags) +{ + FIXME("%p %s %s %d\n", catAdmin, debugstr_w(catalogFile), + debugstr_w(selectBaseName), flags); + return TRUE; +} + +/*********************************************************************** * CryptCATAdminCalcHashFromFileHandle (WINTRUST.@) */ BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE hFile, DWORD* pcbHash, @@ -80,6 +91,29 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, } /*********************************************************************** + * CryptCATAdminReleaseCatalogContext (WINTRUST.@) + * + * Release a catalog context handle. + * + * PARAMS + * hCatAdmin [I] Context handle. + * hCatInfo [I] Catalog handle. + * dwFlags [I] Reserved. + * + * RETURNS + * Success: TRUE. + * Failure: FAIL. + * + */ +BOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN hCatAdmin, + HCATADMIN hCatInfo, + DWORD dwFlags) +{ + FIXME("%p %p %x\n", hCatAdmin, hCatInfo, dwFlags); + return TRUE; +} + +/*********************************************************************** * CryptCATAdminReleaseContext (WINTRUST.@) * * Release a catalog administrator context handle. diff --git a/dlls/wintrust/wintrust.spec b/dlls/wintrust/wintrust.spec index e44e6cc..ba02687 100644 --- a/dlls/wintrust/wintrust.spec +++ b/dlls/wintrust/wintrust.spec @@ -1,11 +1,11 @@ @ stub AddPersonalTrustDBPages @ stub CatalogCompactHashDatabase @ stdcall CryptCATAdminAcquireContext(long ptr long) -@ stub CryptCATAdminAddCatalog +@ stdcall CryptCATAdminAddCatalog(long wstr wstr long) @ stdcall CryptCATAdminCalcHashFromFileHandle(long ptr ptr long) @ stdcall CryptCATAdminEnumCatalogFromHash(long ptr long long ptr) @ stub CryptCATAdminPauseServiceForBackup -@ stub CryptCATAdminReleaseCatalogContext +@ stdcall CryptCATAdminReleaseCatalogContext(long long long) @ stdcall CryptCATAdminReleaseContext(long long) @ stdcall CryptCATAdminRemoveCatalog(ptr wstr long) @ stub CryptCATAdminResolveCatalogPath
1
0
0
0
James Hawkins : msi: Implement the WriteEnvironmentStrings standard action.
by Alexandre Julliard
31 May '07
31 May '07
Module: wine Branch: master Commit: 5b8641a5a43d53f225d6e4c6b1d4ceda90183f3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5b8641a5a43d53f225d6e4c6b…
Author: James Hawkins <truiken(a)gmail.com> Date: Wed May 30 10:57:31 2007 -0700 msi: Implement the WriteEnvironmentStrings standard action. --- dlls/msi/action.c | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 125 insertions(+), 7 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 41c474f..d6f53d7 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -4567,6 +4567,131 @@ static UINT ACTION_InstallODBC( MSIPACKAGE *package ) return rc; } +#define ENV_ACT_SETALWAYS 0x1 +#define ENV_ACT_SETABSENT 0x2 +#define ENV_ACT_REMOVE 0x4 + +#define ENV_MOD_MACHINE 0x20000000 +#define ENV_MOD_APPEND 0x40000000 +#define ENV_MOD_PREFIX 0x80000000 + +static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param ) +{ + LPCWSTR var, value; + LPWSTR val = NULL, ptr; + DWORD flags, type, size; + LONG res; + HKEY env, root = HKEY_CURRENT_USER; + + static const WCHAR environment[] = + {'S','y','s','t','e','m','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'C','o','n','t','r','o','l','\\', + 'S','e','s','s','i','o','n',' ','M','a','n','a','g','e','r','\\', + 'E','n','v','i','r','o','n','m','e','n','t',0}; + static const WCHAR semicolon[] = {';',0}; + + var = MSI_RecordGetString(rec, 1); + value = MSI_RecordGetString(rec, 2); + flags = MSI_RecordGetInteger(rec, 3); + + TRACE("(%s, %s, %08x)\n", debugstr_w(var), debugstr_w(value), flags); + + if (flags & ENV_MOD_MACHINE) + root = HKEY_LOCAL_MACHINE; + + res = RegOpenKeyExW(root, environment, 0, KEY_ALL_ACCESS, &env); + if (res != ERROR_SUCCESS) + return res; + + if (flags & ENV_ACT_REMOVE) + { + res = RegDeleteKeyW(env, var); + RegCloseKey(env); + return res; + } + + size = 0; + res = RegQueryValueExW(env, var, NULL, &type, NULL, &size); + if ((res != ERROR_MORE_DATA && res != ERROR_FILE_NOT_FOUND) || type != REG_SZ) + { + RegCloseKey(env); + return res; + } + + if (res != ERROR_FILE_NOT_FOUND) + { + if (flags & ENV_ACT_SETABSENT) + { + res = ERROR_SUCCESS; + goto done; + } + + /* oldvals;newval */ + size = (lstrlenW(value) + 1 + size) * sizeof(WCHAR); + val = msi_alloc(size); + ptr = val; + if (!val) + { + res = ERROR_OUTOFMEMORY; + goto done; + } + + if (flags & ENV_MOD_PREFIX) + { + lstrcpyW(val, value); + lstrcatW(val, semicolon); + ptr = val + lstrlenW(value) + 1; + } + + res = RegQueryValueExW(env, var, NULL, &type, (LPVOID)ptr, &size); + if (res != ERROR_SUCCESS) + goto done; + + if (!flags || flags & ENV_MOD_APPEND) + { + lstrcatW(val, semicolon); + lstrcatW(val, value); + } + } + else + { + size = (lstrlenW(value) + 1) * sizeof(WCHAR); + val = msi_alloc(size); + if (!val) + { + res = ERROR_OUTOFMEMORY; + goto done; + } + + lstrcpyW(val, value); + } + + res = RegSetValueExW(env, var, 0, type, (LPVOID)val, size); + +done: + RegCloseKey(env); + msi_free(val); + return res; +} + +static UINT ACTION_WriteEnvironmentStrings( MSIPACKAGE *package ) +{ + UINT rc; + MSIQUERY * view; + static const WCHAR ExecSeqQuery[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', + '`','E','n','v','i','r','o','n','m','e','n','t','`',0}; + rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view); + if (rc != ERROR_SUCCESS) + return ERROR_SUCCESS; + + rc = MSI_IterateRecords(view, NULL, ITERATE_WriteEnvironmentString, package); + msiobj_release(&view->hdr); + + return rc; +} + static UINT msi_unimplemented_action_stub( MSIPACKAGE *package, LPCSTR action, LPCWSTR table ) { @@ -4661,13 +4786,6 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package ) return msi_unimplemented_action_stub( package, "ValidateProductID", table ); } -static UINT ACTION_WriteEnvironmentStrings( MSIPACKAGE *package ) -{ - static const WCHAR table[] = { - 'E','n','v','i','r','o','n','m','e','n','t',0 }; - return msi_unimplemented_action_stub( package, "WriteEnvironmentStrings", table ); -} - static UINT ACTION_RemoveEnvironmentStrings( MSIPACKAGE *package ) { static const WCHAR table[] = {
1
0
0
0
Stefan Dösinger : wined3d: Keep GL_TEXTURE_2D enabled when using dummy textures.
by Alexandre Julliard
31 May '07
31 May '07
Module: wine Branch: master Commit: 2854c5420186f3f4f2b824f8c81a57614b62f384 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2854c5420186f3f4f2b824f8c…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Fri May 25 14:14:28 2007 +0200 wined3d: Keep GL_TEXTURE_2D enabled when using dummy textures. --- dlls/wined3d/state.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 2392a94..6676cf3 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1610,8 +1610,8 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, if(GL_SUPPORT(NV_TEXTURE_SHADER2)) { glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE); } else { - glDisable(GL_TEXTURE_2D); - checkGLcall("glDisable(GL_TEXTURE_2D)"); + glEnable(GL_TEXTURE_2D); + checkGLcall("glEnable(GL_TEXTURE_2D)"); glDisable(GL_TEXTURE_3D); checkGLcall("glDisable(GL_TEXTURE_3D)"); if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
1
0
0
0
Stefan Dösinger : wined3d: Don' t mess with nv texture shaders if its not supported.
by Alexandre Julliard
31 May '07
31 May '07
Module: wine Branch: master Commit: b6e87d47d590cd58a9792a3806e2c383ccc439af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b6e87d47d590cd58a9792a380…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Fri May 25 00:29:27 2007 +0200 wined3d: Don't mess with nv texture shaders if its not supported. --- dlls/wined3d/state.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index ba25501..2392a94 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1591,7 +1591,6 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, checkGLcall("glDisable(GL_TEXTURE_2D)"); glEnable(GL_TEXTURE_3D); checkGLcall("glEnable(GL_TEXTURE_3D)"); - glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_3D); } break; case GL_TEXTURE_CUBE_MAP_ARB: @@ -1604,7 +1603,6 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, checkGLcall("glDisable(GL_TEXTURE_3D)"); glEnable(GL_TEXTURE_CUBE_MAP_ARB); checkGLcall("glEnable(GL_TEXTURE_CUBE_MAP_ARB)"); - glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_CUBE_MAP_ARB); } break; }
1
0
0
0
Stefan Dösinger : ddraw: Hold the lock in IDirect3DX methods.
by Alexandre Julliard
31 May '07
31 May '07
Module: wine Branch: master Commit: ed3f6e8d32bb4141af67be1898b14239a3d98291 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed3f6e8d32bb4141af67be189…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Wed May 30 15:38:58 2007 +0200 ddraw: Hold the lock in IDirect3DX methods. --- dlls/ddraw/direct3d.c | 39 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 36 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/direct3d.c b/dlls/ddraw/direct3d.c index e147094..f0c3516 100644 --- a/dlls/ddraw/direct3d.c +++ b/dlls/ddraw/direct3d.c @@ -253,13 +253,19 @@ IDirect3DImpl_7_EnumDevices(IDirect3D7 *iface, HRESULT hr; TRACE("(%p)->(%p,%p)\n", This, Callback, Context); + EnterCriticalSection(&ddraw_cs); TRACE("(%p) Enumerating WineD3D D3Device7 interface\n", This); hr = IDirect3DImpl_GetCaps(This->wineD3D, &oldDesc, &ddesc); - if(hr != D3D_OK) return hr; + if(hr != D3D_OK) + { + LeaveCriticalSection(&ddraw_cs); + return hr; + } Callback(interface_name, device_name, &ddesc, Context); TRACE("(%p) End of enumeration\n", This); + LeaveCriticalSection(&ddraw_cs); return D3D_OK; } @@ -297,9 +303,14 @@ IDirect3DImpl_3_EnumDevices(IDirect3D3 *iface, strcpy(device_name,"direct3d"); TRACE("(%p)->(%p,%p)\n", This, Callback, Context); + EnterCriticalSection(&ddraw_cs); hr = IDirect3DImpl_GetCaps(This->wineD3D, &dref, &newDesc); - if(hr != D3D_OK) return hr; + if(hr != D3D_OK) + { + LeaveCriticalSection(&ddraw_cs); + return hr; + } /* Do I have to enumerate the reference id? Note from old d3d7: * "It seems that enumerating the reference IID on Direct3D 1 games @@ -333,6 +344,7 @@ IDirect3DImpl_3_EnumDevices(IDirect3D3 *iface, if(hr != D3DENUMRET_OK) { TRACE("Application cancelled the enumeration\n"); + LeaveCriticalSection(&ddraw_cs); return D3D_OK; } } @@ -347,10 +359,12 @@ IDirect3DImpl_3_EnumDevices(IDirect3D3 *iface, if(hr != D3DENUMRET_OK) { TRACE("Application cancelled the enumeration\n"); + LeaveCriticalSection(&ddraw_cs); return D3D_OK; } TRACE("(%p) End of enumeration\n", This); + LeaveCriticalSection(&ddraw_cs); return D3D_OK; } @@ -748,6 +762,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface, IDirectDrawSurfaceImpl *target = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, Surface); TRACE("(%p)->(%s,%p,%p)\n", iface, debugstr_guid(refiid), Surface, Device); + EnterCriticalSection(&ddraw_cs); *Device = NULL; /* Fail device creation if non-opengl surfaces are used */ @@ -758,6 +773,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface, /* We only hit this path if a default surface is set in the registry. Incorrect autodetection * is caught in CreateSurface or QueryInterface */ + LeaveCriticalSection(&ddraw_cs); return DDERR_NO3D; } @@ -765,6 +781,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface, if(This->d3ddevice) { FIXME("(%p): Only one Direct3D device per DirectDraw object supported\n", This); + LeaveCriticalSection(&ddraw_cs); return DDERR_INVALIDPARAMS; } @@ -772,6 +789,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface, if(!object) { ERR("Out of memory when allocating a IDirect3DDevice implementation\n"); + LeaveCriticalSection(&ddraw_cs); return DDERR_OUTOFMEMORY; } @@ -799,6 +817,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface, { ERR("Allocating memory for an index buffer parent failed\n"); HeapFree(GetProcessHeap(), 0, object); + LeaveCriticalSection(&ddraw_cs); return DDERR_OUTOFMEMORY; } ICOM_INIT_INTERFACE(IndexBufferParent, IParent, IParent_Vtbl); @@ -822,6 +841,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface, { ERR("Failed to create an index buffer\n"); HeapFree(GetProcessHeap(), 0, object); + LeaveCriticalSection(&ddraw_cs); return hr; } IndexBufferParent->child = (IUnknown *) object->indexbuffer; @@ -898,6 +918,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface, IWineD3DDevice_SetRenderState(This->wineD3DDevice, WINED3DRS_ZENABLE, IDirect3DDeviceImpl_UpdateDepthStencil(object)); + LeaveCriticalSection(&ddraw_cs); return D3D_OK; } @@ -1010,6 +1031,7 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface, object->Caps = Desc->dwCaps; object->ddraw = This; + EnterCriticalSection(&ddraw_cs); hr = IWineD3DDevice_CreateVertexBuffer(This->wineD3DDevice, get_flexible_vertex_size(Desc->dwFVF) * Desc->dwNumVertices, Desc->dwCaps & D3DVBCAPS_WRITEONLY ? WINED3DUSAGE_WRITEONLY : 0, @@ -1022,6 +1044,7 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface, { ERR("(%p) IWineD3DDevice::CreateVertexBuffer failed with hr=%08x\n", This, hr); HeapFree(GetProcessHeap(), 0, object); + LeaveCriticalSection(&ddraw_cs); if (hr == WINED3DERR_INVALIDCALL) return DDERR_INVALIDPARAMS; else @@ -1035,6 +1058,7 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface, ERR("Cannot find the vertex declaration for fvf %08x\n", Desc->dwFVF); IWineD3DVertexBuffer_Release(object->wineD3DVertexBuffer); HeapFree(GetProcessHeap(), 0, object); + LeaveCriticalSection(&ddraw_cs); return DDERR_INVALIDPARAMS; } IWineD3DVertexDeclaration_AddRef(object->wineD3DVertexDeclaration); @@ -1043,6 +1067,7 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface, *VertexBuffer = ICOM_INTERFACE(object, IDirect3DVertexBuffer7); TRACE("(%p) Created new vertex buffer implementation at %p, returning interface at %p\n", This, object, *VertexBuffer); + LeaveCriticalSection(&ddraw_cs); return D3D_OK; } @@ -1113,6 +1138,7 @@ IDirect3DImpl_7_EnumZBufferFormats(IDirect3D7 *iface, if(!Callback) return DDERR_INVALIDPARAMS; + EnterCriticalSection(&ddraw_cs); for(i = 0; i < sizeof(FormatList) / sizeof(WINED3DFORMAT); i++) { hr = IWineD3D_CheckDeviceFormat(This->wineD3D, @@ -1135,11 +1161,13 @@ IDirect3DImpl_7_EnumZBufferFormats(IDirect3D7 *iface, if(hr != DDENUMRET_OK) { TRACE("Format enumeration cancelled by application\n"); + LeaveCriticalSection(&ddraw_cs); return D3D_OK; } } } TRACE("End of enumeration\n"); + LeaveCriticalSection(&ddraw_cs); return D3D_OK; } @@ -1312,8 +1340,13 @@ IDirect3DImpl_GetCaps(IWineD3D *WineD3D, WCaps.Reserved3 = NULL; /* Now get the caps */ + EnterCriticalSection(&ddraw_cs); hr = IWineD3D_GetDeviceCaps(WineD3D, 0, WINED3DDEVTYPE_HAL, &WCaps); - if(hr != D3D_OK) return hr; + LeaveCriticalSection(&ddraw_cs); + if(hr != D3D_OK) + { + return hr; + } /* Remove all non-d3d7 caps */ Desc7->dwDevCaps &= (
1
0
0
0
Stefan Dösinger : ddraw: Check the validy of IDirectDrawSurface::BltFast parameters.
by Alexandre Julliard
31 May '07
31 May '07
Module: wine Branch: master Commit: 94127492f2d2a75f60dd041776ce7ca69055fd9e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=94127492f2d2a75f60dd04177…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Thu May 24 22:24:00 2007 +0200 ddraw: Check the validy of IDirectDrawSurface::BltFast parameters. --- dlls/ddraw/surface.c | 29 ++++++++++++++++++++++ dlls/ddraw/tests/dsurface.c | 57 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 0 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 62e4550..2baac81 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -2027,6 +2027,35 @@ IDirectDrawSurfaceImpl_BltFast(IDirectDrawSurface7 *iface, IDirectDrawSurfaceImpl *src = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, Source); TRACE("(%p)->(%d,%d,%p,%p,%d): Relay\n", This, dstx, dsty, Source, rsrc, trans); + /* Source must be != NULL, This is not checked by windows. Windows happily throws a 0xc0000005 + * in that case + */ + if(rsrc) + { + if(rsrc->top > rsrc->bottom || rsrc->left > rsrc->right || + rsrc->right > src->surface_desc.dwWidth || + rsrc->bottom > src->surface_desc.dwHeight) + { + WARN("Source rectangle is invalid, returning DDERR_INVALIDRECT\n"); + return DDERR_INVALIDRECT; + } + if(dstx + rsrc->right - rsrc->left > This->surface_desc.dwWidth || + dsty + rsrc->bottom - rsrc->top > This->surface_desc.dwHeight) + { + WARN("Destination area out of bounds, returning DDERR_INVALIDRECT\n"); + return DDERR_INVALIDRECT; + } + } + else + { + if(dstx + src->surface_desc.dwWidth > This->surface_desc.dwWidth || + dsty + src->surface_desc.dwHeight > This->surface_desc.dwHeight) + { + WARN("Destination area out of bounds, returning DDERR_INVALIDRECT\n"); + return DDERR_INVALIDRECT; + } + } + EnterCriticalSection(&ddraw_cs); hr = IWineD3DSurface_BltFast(This->WineD3DSurface, dstx, dsty, diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index adafb87..449e49f 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -2203,6 +2203,62 @@ static void PrivateDataTest(void) ok(ref2 == ref, "Object reference is %d, expected %d\n", ref2, ref); } +static void BltParamTest(void) +{ + IDirectDrawSurface *surface1 = NULL, *surface2 = NULL; + DDSURFACEDESC desc; + HRESULT hr; + RECT valid = {10, 10, 20, 20}; + RECT invalid1 = {20, 10, 10, 20}; + RECT invalid2 = {20, 20, 20, 20}; + RECT invalid3 = {-1, -1, 20, 20}; + RECT invalid4 = {60, 60, 70, 70}; + + memset(&desc, 0, sizeof(desc)); + desc.dwSize = sizeof(desc); + desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; + desc.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; + desc.dwHeight = 128; + desc.dwWidth = 128; + hr = IDirectDraw_CreateSurface(lpDD, &desc, &surface1, NULL); + ok(hr == DD_OK, "Creating an offscreen plain surface failed with %08x\n", hr); + + desc.dwHeight = 64; + desc.dwWidth = 64; + hr = IDirectDraw_CreateSurface(lpDD, &desc, &surface2, NULL); + ok(hr == DD_OK, "Creating an offscreen plain surface failed with %08x\n", hr); + + if(0) + { + /* This crashes */ + hr = IDirectDrawSurface_BltFast(surface1, 0, 0, NULL, NULL, 0); + ok(hr == DD_OK, "BltFast from NULL surface returned %08x\n", hr); + } + hr = IDirectDrawSurface_BltFast(surface1, 0, 0, surface2, NULL, 0); + ok(hr == DD_OK, "BltFast from smaller to bigger surface returned %08x\n", hr); + hr = IDirectDrawSurface_BltFast(surface2, 0, 0, surface1, NULL, 0); + ok(hr == DDERR_INVALIDRECT, "BltFast from bigger to smaller surface returned %08x\n", hr); + hr = IDirectDrawSurface_BltFast(surface2, 0, 0, surface1, &valid, 0); + ok(hr == DD_OK, "BltFast from bigger to smaller surface using a valid rectangle returned %08x\n", hr); + hr = IDirectDrawSurface_BltFast(surface2, 60, 60, surface1, &valid, 0); + ok(hr == DDERR_INVALIDRECT, "BltFast with a rectangle resulting in an off-surface write returned %08x\n", hr); + hr = IDirectDrawSurface_BltFast(surface1, 90, 90, surface2, NULL, 0); + ok(hr == DDERR_INVALIDRECT, "BltFast with a rectangle resulting in an off-surface write returned %08x\n", hr); + hr = IDirectDrawSurface_BltFast(surface2, 0, 0, surface1, &invalid1, 0); + ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 1 returned %08x\n", hr); + hr = IDirectDrawSurface_BltFast(surface2, 0, 0, surface1, &invalid2, 0); + ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 2 returned %08x\n", hr); + hr = IDirectDrawSurface_BltFast(surface2, 0, 0, surface1, &invalid3, 0); + ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 3 returned %08x\n", hr); + hr = IDirectDrawSurface_BltFast(surface1, 0, 0, surface2, &invalid4, 0); + ok(hr == DDERR_INVALIDRECT, "BltFast with invalid rectangle 3 returned %08x\n", hr); + hr = IDirectDrawSurface_BltFast(surface1, 0, 0, surface1, NULL, 0); + ok(hr == DD_OK, "BltFast blitting a surface onto itself returned %08x\n", hr); + + IDirectDrawSurface_Release(surface1); + IDirectDrawSurface_Release(surface2); +} + START_TEST(dsurface) { if (!CreateDirectDraw()) @@ -2222,5 +2278,6 @@ START_TEST(dsurface) CompressedTest(); SizeTest(); PrivateDataTest(); + BltParamTest(); ReleaseDirectDraw(); }
1
0
0
0
Stefan Dösinger : ddraw: Hold the lock in IDirectDrawSurface methods.
by Alexandre Julliard
31 May '07
31 May '07
Module: wine Branch: master Commit: 8b6a3610bb2eb98201cf77f48532c49b98a77ae4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b6a3610bb2eb98201cf77f48…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Wed May 30 15:25:34 2007 +0200 ddraw: Hold the lock in IDirectDrawSurface methods. --- dlls/ddraw/surface.c | 243 +++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 203 insertions(+), 40 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8b6a3610bb2eb98201cf7…
1
0
0
0
Louis Lenders : comctl32: Add stub for DrawShadowText.
by Alexandre Julliard
31 May '07
31 May '07
Module: wine Branch: master Commit: b7a5985bca1f9f36cc4d0dbf4d976d8ba95b661d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7a5985bca1f9f36cc4d0dbf4…
Author: Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> Date: Wed May 30 21:19:52 2007 +0100 comctl32: Add stub for DrawShadowText. --- dlls/comctl32/comctl32.spec | 1 + dlls/comctl32/commctrl.c | 13 +++++++++++++ include/commctrl.h | 2 +- 3 files changed, 15 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/comctl32.spec b/dlls/comctl32/comctl32.spec index 7f9c06f..6b8f662 100644 --- a/dlls/comctl32/comctl32.spec +++ b/dlls/comctl32/comctl32.spec @@ -125,6 +125,7 @@ @ stdcall DestroyPropertySheetPage(long) @ stdcall -private DllGetVersion(ptr) @ stdcall -private DllInstall(long wstr) +@ stdcall DrawShadowText(long wstr long ptr long long long long long) @ stdcall DrawStatusText(long ptr ptr long) DrawStatusTextA @ stdcall DrawStatusTextW(long ptr wstr long) @ stdcall FlatSB_EnableScrollBar (long long long) diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index f7f7ecc..c239718 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -1522,3 +1522,16 @@ LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet) return SendMessageW(hwnd, EM_SETWORDBREAKPROC, 0, (LPARAM)(bSet ? PathWordBreakProc : NULL)); } + +/*********************************************************************** + * DrawShadowText [COMCTL32.@] + * + * Draw text with shadow. + */ +int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, const RECT *pRect, DWORD dwFlags, + COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset) +{ + FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, pRect, dwFlags, + crText, crShadow, ixOffset, iyOffset); + return DrawTextW(hdc, pszText, cch, (LPRECT)pRect, DT_LEFT); +} diff --git a/include/commctrl.h b/include/commctrl.h index 2a49e00..a1e82a9 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -713,7 +713,7 @@ BOOL WINAPI GetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR*); BOOL WINAPI RemoveWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR); LRESULT WINAPI DefSubclassProc(HWND, UINT, WPARAM, LPARAM); -int WINAPI DrawShadowText(HDC, LPCWSTR, UINT, RECT*, DWORD, COLORREF, COLORREF, int, int); +int WINAPI DrawShadowText(HDC, LPCWSTR, UINT, const RECT*, DWORD, COLORREF, COLORREF, int, int); /* Header control */
1
0
0
0
Dan Hipschman : rpcrt4: Fix build of test on Solaris by renaming a variable .
by Alexandre Julliard
31 May '07
31 May '07
Module: wine Branch: master Commit: e5c8a6eb5d5e278f5997d7082f2f4223fc1d6807 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5c8a6eb5d5e278f5997d7082…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Wed May 30 18:00:45 2007 -0700 rpcrt4: Fix build of test on Solaris by renaming a variable. --- dlls/rpcrt4/tests/server.c | 36 ++++++++++++++++++------------------ dlls/rpcrt4/tests/server.idl | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index 9bbe853..0e30082 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -141,14 +141,14 @@ s_sum_sp(sp_t *sp) } double -s_square_sun(sun_t *sun) +s_square_sun(sun_t *su) { - switch (sun->s) + switch (su->s) { - case SUN_I: return sun->u.i * sun->u.i; + case SUN_I: return su->u.i * su->u.i; case SUN_F1: - case SUN_F2: return sun->u.f * sun->u.f; - case SUN_PI: return (*sun->u.pi) * (*sun->u.pi); + case SUN_F2: return su->u.f * su->u.f; + case SUN_PI: return (*su->u.pi) * (*su->u.pi); default: return 0.0; } @@ -279,25 +279,25 @@ basic_tests(void) static void union_tests(void) { - sun_t sun; + sun_t su; int i; - sun.s = SUN_I; - sun.u.i = 9; - ok(square_sun(&sun) == 81.0, "RPC square_sun\n"); + su.s = SUN_I; + su.u.i = 9; + ok(square_sun(&su) == 81.0, "RPC square_sun\n"); - sun.s = SUN_F1; - sun.u.f = 5.0; - ok(square_sun(&sun) == 25.0, "RPC square_sun\n"); + su.s = SUN_F1; + su.u.f = 5.0; + ok(square_sun(&su) == 25.0, "RPC square_sun\n"); - sun.s = SUN_F2; - sun.u.f = -2.0; - ok(square_sun(&sun) == 4.0, "RPC square_sun\n"); + su.s = SUN_F2; + su.u.f = -2.0; + ok(square_sun(&su) == 4.0, "RPC square_sun\n"); - sun.s = SUN_PI; - sun.u.pi = &i; + su.s = SUN_PI; + su.u.pi = &i; i = 11; - ok(square_sun(&sun) == 121.0, "RPC square_sun\n"); + ok(square_sun(&su) == 121.0, "RPC square_sun\n"); } static test_list_t * diff --git a/dlls/rpcrt4/tests/server.idl b/dlls/rpcrt4/tests/server.idl index b0ac434..d5bca21 100644 --- a/dlls/rpcrt4/tests/server.idl +++ b/dlls/rpcrt4/tests/server.idl @@ -95,7 +95,7 @@ interface IServer } sp_t; int sum_sp(sp_t *sp); - double square_sun(sun_t *sun); + double square_sun(sun_t *su); typedef struct test_list {
1
0
0
0
← Newer
1
2
3
4
5
...
72
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
Results per page:
10
25
50
100
200