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
July 2006
----- 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
5 participants
857 discussions
Start a n
N
ew thread
Thomas Kho : notepad: Change window title to be like Windows' notepad.exe.
by Alexandre Julliard
13 Jul '06
13 Jul '06
Module: wine Branch: refs/heads/master Commit: 3ec165fd990d1d62bfa5dacb30d2592285c4917f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=3ec165fd990d1d62bfa5dac…
Author: Thomas Kho <tkho(a)ucla.edu> Date: Wed Jul 12 14:15:31 2006 -0700 notepad: Change window title to be like Windows' notepad.exe. --- programs/notepad/En.rc | 2 +- programs/notepad/dialog.c | 29 +++++++++++------------------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/programs/notepad/En.rc b/programs/notepad/En.rc index 3bf6475..af60994 100644 --- a/programs/notepad/En.rc +++ b/programs/notepad/En.rc @@ -108,7 +108,7 @@ STRING_ERROR, STRING_WARNING, "WARNING" STRING_INFO, "Information" -STRING_UNTITLED, "(untitled)" +STRING_UNTITLED, "Untitled" STRING_ALL_FILES, "All files (*.*)" STRING_TEXT_FILES_TXT, "Text files (*.txt)" diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c index c487164..1488af0 100644 --- a/programs/notepad/dialog.c +++ b/programs/notepad/dialog.c @@ -54,30 +54,23 @@ VOID ShowLastError(void) /** * Sets the caption of the main window according to Globals.szFileTitle: - * Notepad - (untitled) if no file is open - * Notepad - [filename] if a file is given + * Untitled - Notepad if no file is open + * filename - Notepad if a file is given */ static void UpdateWindowCaption(void) { WCHAR szCaption[MAX_STRING_LEN]; - WCHAR szUntitled[MAX_STRING_LEN]; + WCHAR szNotepad[MAX_STRING_LEN]; + static const WCHAR hyphenW[] = { ' ','-',' ',0 }; - LoadString(Globals.hInstance, STRING_NOTEPAD, szCaption, SIZEOF(szCaption)); - - if (Globals.szFileTitle[0] != '\0') { - static const WCHAR bracket_lW[] = { ' ','-',' ','[',0 }; - static const WCHAR bracket_rW[] = { ']',0 }; - lstrcat(szCaption, bracket_lW); - lstrcat(szCaption, Globals.szFileTitle); - lstrcat(szCaption, bracket_rW); - } + if (Globals.szFileTitle[0] != '\0') + lstrcpy(szCaption, Globals.szFileTitle); else - { - static const WCHAR hyphenW[] = { ' ','-',' ',0 }; - LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, SIZEOF(szUntitled)); - lstrcat(szCaption, hyphenW); - lstrcat(szCaption, szUntitled); - } + LoadString(Globals.hInstance, STRING_UNTITLED, szCaption, SIZEOF(szCaption)); + + LoadString(Globals.hInstance, STRING_NOTEPAD, szNotepad, SIZEOF(szNotepad)); + lstrcat(szCaption, hyphenW); + lstrcat(szCaption, szNotepad); SetWindowText(Globals.hMainWnd, szCaption); }
1
0
0
0
Andrew Talbot : winspool.drv/tests: Write-strings warnings fix.
by Alexandre Julliard
13 Jul '06
13 Jul '06
Module: wine Branch: refs/heads/master Commit: cc318be2098f674f641604abcb9e62b6568dc310 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=cc318be2098f674f641604a…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Wed Jul 12 22:31:46 2006 +0100 winspool.drv/tests: Write-strings warnings fix. --- dlls/winspool.drv/tests/info.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c index 2eff80e..0420464 100644 --- a/dlls/winspool.drv/tests/info.c +++ b/dlls/winspool.drv/tests/info.c @@ -176,6 +176,9 @@ static void test_AddMonitor(void) { MONITOR_INFO_2A mi2a; struct monitor_entry * entry = NULL; + static CHAR empty[] = "", + does_not_exist_dll[] = "does_not_exists.dll", + version_dll[] = "version.dll"; DWORD res; entry = find_installed_monitor(); @@ -238,7 +241,7 @@ #if 0 #endif mi2a.pEnvironment = entry->env; - mi2a.pName = ""; + mi2a.pName = empty; SetLastError(MAGIC_DEAD); res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a); /* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_PRIVILEGE_NOT_HELD */ @@ -260,15 +263,14 @@ #endif "ERROR_PRIVILEGE_NOT_HELD)\n", res, GetLastError()); - mi2a.pDLLName = ""; + mi2a.pDLLName = empty; SetLastError(MAGIC_DEAD); res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a); ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), "returned %ld with %ld (expected '0' with ERROR_INVALID_PARAMETER)\n", res, GetLastError()); - - mi2a.pDLLName = "does_not_exists.dll"; + mi2a.pDLLName = does_not_exist_dll; SetLastError(MAGIC_DEAD); res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a); /* NT: ERROR_MOD_NOT_FOUND, 9x: ERROR_INVALID_PARAMETER */ @@ -278,7 +280,7 @@ #endif "returned %ld with %ld (expected '0' with: ERROR_MOD_NOT_FOUND or " \ "ERROR_INVALID_PARAMETER)\n", res, GetLastError()); - mi2a.pDLLName = "version.dll"; + mi2a.pDLLName = version_dll; SetLastError(MAGIC_DEAD); res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a); /* NT: ERROR_PROC_NOT_FOUND, 9x: ERROR_INVALID_PARAMETER */ @@ -296,7 +298,7 @@ #endif SetLastError(MAGIC_DEAD); res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a); ok(res, "returned %ld with %ld (expected '!= 0')\n", res, GetLastError()); - + /* add a monitor twice */ SetLastError(MAGIC_DEAD); res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a); @@ -975,6 +977,7 @@ static void test_OpenPrinter(void) DWORD res; DWORD size; CHAR buffer[DEFAULT_PRINTER_SIZE]; + static CHAR empty[] = ""; LPSTR ptr; SetLastError(MAGIC_DEAD); @@ -1095,7 +1098,7 @@ static void test_OpenPrinter(void) "ERROR_ACCESS_DENIED)\n", res, GetLastError()); if(res) ClosePrinter(hprinter); - defaults.pDatatype=""; + defaults.pDatatype = empty; hprinter = (HANDLE) MAGIC_DEAD; SetLastError(MAGIC_DEAD);
1
0
0
0
Andrew Talbot : mshtml: Write-strings warnings fix.
by Alexandre Julliard
13 Jul '06
13 Jul '06
Module: wine Branch: refs/heads/master Commit: f7e38ac6ea597dc2045239f6f4bcb3bfcbd53a55 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=f7e38ac6ea597dc2045239f…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Wed Jul 12 21:26:49 2006 +0100 mshtml: Write-strings warnings fix. --- dlls/mshtml/main.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c index 58098d0..d4c4bf7 100644 --- a/dlls/mshtml/main.c +++ b/dlls/mshtml/main.c @@ -252,9 +252,14 @@ DEFINE_GUID(CLSID_MHTMLDocument, 0x3050F DEFINE_GUID(CLSID_Scriptlet, 0xAE24FDAE, 0x03C6, 0x11D1, 0x8B,0x76, 0x00,0x80,0xC7,0x44,0xF3,0x89); DEFINE_GUID(CLSID_TridentAPI, 0x429AF92C, 0xA51F, 0x11D2, 0x86,0x1E, 0x00,0xC0,0x4F,0xA3,0x5C,0x89); -#define INF_SET_ID(id) \ - pse[i].pszName = #id; \ - clsids[i++] = &id; +#define INF_SET_ID(id) \ + do \ + { \ + static CHAR name[] = #id; \ + \ + pse[i].pszName = name; \ + clsids[i++] = &id; \ + } while (0) #define INF_SET_CLSID(clsid) INF_SET_ID(CLSID_ ## clsid) @@ -267,11 +272,11 @@ static HRESULT register_server(BOOL do_r STRENTRYA pse[35]; static CLSID const *clsids[35]; int i = 0; - + static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0}; TRACE("(%x)\n", do_register); - + INF_SET_CLSID(AboutProtocol); INF_SET_CLSID(CAnchorBrowsePropertyPage); INF_SET_CLSID(CBackgroundPropertyPage); @@ -331,6 +336,7 @@ static HRESULT register_server(BOOL do_r } #undef INF_SET_CLSID +#undef INF_SET_ID /*********************************************************************** * DllRegisterServer (MSHTML.@)
1
0
0
0
James Hawkins : urlmon: Implement URLDownloadToCacheFileW.
by Alexandre Julliard
12 Jul '06
12 Jul '06
Module: wine Branch: refs/heads/master Commit: e2bf4ff16449d4c90d2a9fb662dc0f506d7bcbbc URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=e2bf4ff16449d4c90d2a9fb…
Author: James Hawkins <truiken(a)gmail.com> Date: Tue Jul 11 13:27:59 2006 -0700 urlmon: Implement URLDownloadToCacheFileW. --- dlls/urlmon/umon.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 40 insertions(+), 3 deletions(-) diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c index 88304ca..b1ca78e 100644 --- a/dlls/urlmon/umon.c +++ b/dlls/urlmon/umon.c @@ -1611,9 +1611,46 @@ HRESULT WINAPI URLDownloadToCacheFileA(L HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPWSTR szFileName, DWORD dwBufLength, DWORD dwReserved, LPBINDSTATUSCALLBACK pBSC) { - FIXME("(%p %s %p %ld %ld %p)\n", lpUnkCaller, debugstr_w(szURL), szFileName, - dwBufLength, dwReserved, pBSC); - return E_NOTIMPL; + WCHAR cache_path[MAX_PATH + 1]; + FILETIME expire, modified; + HRESULT hr; + LPWSTR ext; + + static const WCHAR header[] = { + 'H','T','T','P','/','1','.','0',' ','2','0','0',' ', + 'O','K','\\','r','\\','n','\\','r','\\','n',0 + }; + + TRACE("(%p, %s, %p, %ld, %ld, %p)\n", lpUnkCaller, debugstr_w(szURL), + szFileName, dwBufLength, dwReserved, pBSC); + + if (!szURL || !szFileName) + return E_INVALIDARG; + + ext = PathFindExtensionW(szURL); + + if (!CreateUrlCacheEntryW(szURL, 0, ext, cache_path, 0)) + return E_FAIL; + + hr = URLDownloadToFileW(lpUnkCaller, szURL, cache_path, 0, pBSC); + if (FAILED(hr)) + return hr; + + expire.dwHighDateTime = 0; + expire.dwLowDateTime = 0; + modified.dwHighDateTime = 0; + modified.dwLowDateTime = 0; + + if (!CommitUrlCacheEntryW(szURL, cache_path, expire, modified, NORMAL_CACHE_ENTRY, + (LPWSTR)header, sizeof(header), NULL, NULL)) + return E_FAIL; + + if (lstrlenW(cache_path) > dwBufLength) + return E_OUTOFMEMORY; + + lstrcpyW(szFileName, cache_path); + + return S_OK; } /***********************************************************************
1
0
0
0
Ge van Geldorp : user32: Implement Get/SetClassLongPtrA/W.
by Alexandre Julliard
12 Jul '06
12 Jul '06
Module: wine Branch: refs/heads/master Commit: 54afeb02de187d4187420adf24652df7330f4a21 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=54afeb02de187d4187420ad…
Author: Ge van Geldorp <ge(a)gse.nl> Date: Mon Jul 10 08:59:22 2006 +0200 user32: Implement Get/SetClassLongPtrA/W. --- dlls/user/class.c | 214 ++++++++++++++++++++++------------------ include/wine/server_protocol.h | 6 + server/protocol.def | 4 - server/trace.c | 4 - 4 files changed, 127 insertions(+), 101 deletions(-) Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=54afeb02de187d41874…
1
0
0
0
Andrew Ziem : user: Implement Ascii version of SPI_GETDESKWALLPAPER.
by Alexandre Julliard
12 Jul '06
12 Jul '06
Module: wine Branch: refs/heads/master Commit: c142bd91156082cf2efb413b347f356b1f287d1a URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=c142bd91156082cf2efb413…
Author: Andrew Ziem <ahziem1(a)mailbolt.com> Date: Tue Jul 11 20:22:38 2006 -0600 user: Implement Ascii version of SPI_GETDESKWALLPAPER. --- dlls/user/sysparams.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/user/sysparams.c b/dlls/user/sysparams.c index 5fed316..de0677f 100644 --- a/dlls/user/sysparams.c +++ b/dlls/user/sysparams.c @@ -2496,6 +2496,14 @@ BOOL WINAPI SystemParametersInfoA( UINT break; } + case SPI_GETDESKWALLPAPER: /* 115 */ + { + WCHAR buffer[MAX_PATH]; + ret = (SystemParametersInfoW( SPI_GETDESKWALLPAPER, uiParam, buffer, fuWinIni ) && + WideCharToMultiByte(CP_ACP, 0, buffer, -1, pvParam, uiParam, NULL, NULL)); + break; + } + default: ret = SystemParametersInfoW( uiAction, uiParam, pvParam, fuWinIni ); break;
1
0
0
0
Mike McCormack : ole32: Only return S_FALSE in IPropertyStorage:: ReadMultiple if a property was not found.
by Alexandre Julliard
12 Jul '06
12 Jul '06
Module: wine Branch: refs/heads/master Commit: 6a15ac7f0a505e74c5e7c2a6d84e4d08012650ce URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=6a15ac7f0a505e74c5e7c2a…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Wed Jul 12 18:24:10 2006 +0900 ole32: Only return S_FALSE in IPropertyStorage::ReadMultiple if a property was not found. --- dlls/ole32/stg_prop.c | 4 +- dlls/ole32/tests/stg_prop.c | 114 ++++++++++++++++++++++--------------------- 2 files changed, 60 insertions(+), 58 deletions(-) Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=6a15ac7f0a505e74c5e…
1
0
0
0
Mike McCormack : ole32: Small cleanups.
by Alexandre Julliard
12 Jul '06
12 Jul '06
Module: wine Branch: refs/heads/master Commit: 49ff182fc410ba333a5c61ff3cc0da61fc4d69da URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=49ff182fc410ba333a5c61f…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Wed Jul 12 18:25:16 2006 +0900 ole32: Small cleanups. --- dlls/ole32/clipboard.c | 21 ++++++++------------- 1 files changed, 8 insertions(+), 13 deletions(-) diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index 8445ed4..621bbe5 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -80,11 +80,6 @@ #include "storage32.h" #define HANDLE_ERROR(err) { hr = err; TRACE("(HRESULT=%lx)\n", (HRESULT)err); goto CLEANUP; } -/* For CoGetMalloc (MEMCTX_TASK is currently ignored) */ -#ifndef MEMCTX_TASK -# define MEMCTX_TASK -1 -#endif - WINE_DEFAULT_DEBUG_CHANNEL(ole); /**************************************************************************** @@ -178,7 +173,7 @@ static OLEClipbrd* OLEClipbrd_Construct( static void OLEClipbrd_Destroy(OLEClipbrd* ptrToDestroy); static HWND OLEClipbrd_CreateWindow(void); static void OLEClipbrd_DestroyWindow(HWND hwnd); -LRESULT CALLBACK OLEClipbrd_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +static LRESULT CALLBACK OLEClipbrd_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); static HRESULT OLEClipbrd_RenderFormat( IDataObject *pIDataObject, LPFORMATETC pFormatetc ); static HGLOBAL OLEClipbrd_GlobalDupMem( HGLOBAL hGlobalSrc ); @@ -283,7 +278,7 @@ static const IEnumFORMATETCVtbl efvt = /* * Name of our registered OLE clipboard window class */ -CHAR OLEClipbrd_WNDCLASS[] = "CLIPBRDWNDCLASS"; +static const CHAR OLEClipbrd_WNDCLASS[] = "CLIPBRDWNDCLASS"; /* * If we need to store state info we can store it here. @@ -487,7 +482,7 @@ HRESULT WINAPI OleGetClipboard(IDataObje * data object exposed through OleGetClipboard must convert this TYMED_HGLOBAL * back to TYMED_IStorage. */ -HRESULT WINAPI OleFlushClipboard() +HRESULT WINAPI OleFlushClipboard(void) { IEnumFORMATETC* penumFormatetc = NULL; FORMATETC rgelt; @@ -577,7 +572,7 @@ CLEANUP: /*********************************************************************** * OleIsCurrentClipboard [OLE32.@] */ -HRESULT WINAPI OleIsCurrentClipboard ( IDataObject *pDataObject) +HRESULT WINAPI OleIsCurrentClipboard(IDataObject *pDataObject) { TRACE("()\n"); /* @@ -638,7 +633,7 @@ void OLEClipbrd_UnInitialize(void) /********************************************************* * Construct the OLEClipbrd class. */ -static OLEClipbrd* OLEClipbrd_Construct() +static OLEClipbrd* OLEClipbrd_Construct(void) { OLEClipbrd* newObject = NULL; HGLOBAL hNewObject = 0; @@ -711,7 +706,7 @@ static void OLEClipbrd_Destroy(OLEClipbr * OLEClipbrd_CreateWindow() * Create the clipboard window */ -static HWND OLEClipbrd_CreateWindow() +static HWND OLEClipbrd_CreateWindow(void) { HWND hwnd = 0; WNDCLASSEXA wcex; @@ -776,7 +771,7 @@ static void OLEClipbrd_DestroyWindow(HWN * has been placed in the clipboard via OleSetClipboard(). * i.e. Only when OLE owns the windows clipboard. */ -LRESULT CALLBACK OLEClipbrd_WndProc +static LRESULT CALLBACK OLEClipbrd_WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) @@ -1559,7 +1554,7 @@ static HRESULT WINAPI OLEClipbrd_IDataOb * NOTE: this does not AddRef the interface. */ -LPENUMFORMATETC OLEClipbrd_IEnumFORMATETC_Construct(UINT cfmt, const FORMATETC afmt[], +static LPENUMFORMATETC OLEClipbrd_IEnumFORMATETC_Construct(UINT cfmt, const FORMATETC afmt[], LPUNKNOWN pUnkDataObj) { IEnumFORMATETCImpl* ef;
1
0
0
0
Mike McCormack : ole32: Remove unnecessary assert(This) calls.
by Alexandre Julliard
12 Jul '06
12 Jul '06
Module: wine Branch: refs/heads/master Commit: 1a80cb87cb0378fd5341c7db1a55b994df20b6d1 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1a80cb87cb0378fd5341c7d…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Wed Jul 12 18:24:52 2006 +0900 ole32: Remove unnecessary assert(This) calls. --- dlls/ole32/stg_prop.c | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index 64a825d..b8242ec 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -245,7 +245,6 @@ static PROPVARIANT *PropertyStorage_Find { PROPVARIANT *ret = NULL; - assert(This); dictionary_find(This->propid_to_prop, (void *)propid, (void **)&ret); TRACE("returning %p\n", ret); return ret; @@ -258,7 +257,6 @@ static PROPVARIANT *PropertyStorage_Find PROPVARIANT *ret = NULL; PROPID propid; - assert(This); if (!name) return NULL; if (This->codePage == CP_UNICODE) @@ -289,7 +287,6 @@ static LPWSTR PropertyStorage_FindProper { LPWSTR ret = NULL; - assert(This); dictionary_find(This->propid_to_name, (void *)propid, (void **)&ret); TRACE("returning %p\n", ret); return ret; @@ -468,7 +465,6 @@ static HRESULT PropertyStorage_StoreProp HRESULT hr = S_OK; PROPVARIANT *prop = PropertyStorage_FindProperty(This, propid); - assert(This); assert(propvar); if (propvar->vt & VT_BYREF || propvar->vt & VT_ARRAY) This->format = 1; @@ -1002,7 +998,6 @@ static HRESULT PropertyStorage_ReadDicti DWORD numEntries, i; HRESULT hr = S_OK; - assert(This); assert(This->name_to_propid); assert(This->propid_to_name); @@ -1272,7 +1267,6 @@ static HRESULT PropertyStorage_ReadFromS ULONG count = 0; DWORD dictOffset = 0; - assert(This); This->dirty = FALSE; This->highestProp = 0; hr = IStream_Stat(This->stm, &stat, STATFLAG_NONAME); @@ -1389,6 +1383,7 @@ static HRESULT PropertyStorage_ReadFromS { PROPVARIANT prop; + memset(&prop, 0, sizeof prop); if (SUCCEEDED(PropertyStorage_ReadProperty(This, &prop, buf + idOffset->dwOffset - sizeof(PROPERTYSECTIONHEADER)))) { @@ -1452,7 +1447,6 @@ end: static void PropertyStorage_MakeHeader(PropertyStorage_impl *This, PROPERTYSETHEADER *hdr) { - assert(This); assert(hdr); StorageUtl_WriteWord((BYTE *)&hdr->wByteOrder, 0, PROPSETHDR_BYTEORDER_MAGIC); @@ -1465,7 +1459,6 @@ static void PropertyStorage_MakeHeader(P static void PropertyStorage_MakeFmtIdOffset(PropertyStorage_impl *This, FORMATIDOFFSET *fmtOffset) { - assert(This); assert(fmtOffset); StorageUtl_WriteGUID((BYTE *)fmtOffset, 0, &This->fmtid); StorageUtl_WriteDWord((BYTE *)fmtOffset, offsetof(FORMATIDOFFSET, dwOffset), @@ -1505,7 +1498,6 @@ static BOOL PropertyStorage_DictionaryWr ULONG count; assert(key); - assert(This); assert(closure); StorageUtl_WriteDWord((LPBYTE)&propid, 0, (DWORD)value); c->hr = IStream_Write(This->stm, &propid, sizeof(propid), &count); @@ -1573,7 +1565,6 @@ static HRESULT PropertyStorage_WriteDict DWORD dwTemp; struct DictionaryClosure closure; - assert(This); assert(sectionOffset); /* The dictionary's always the first property written, so seek to its @@ -1628,7 +1619,6 @@ static HRESULT PropertyStorage_WriteProp ULONG count; DWORD dwType, bytesWritten; - assert(This); assert(var); assert(sectionOffset); @@ -1789,7 +1779,6 @@ static HRESULT PropertyStorage_WriteProp { struct PropertyClosure closure; - assert(This); assert(sectionOffset); closure.hr = S_OK; closure.propNum = startingPropNum; @@ -1807,7 +1796,6 @@ static HRESULT PropertyStorage_WriteHead PROPERTYSETHEADER hdr; FORMATIDOFFSET fmtOffset; - assert(This); hr = IStream_Seek(This->stm, seek, STREAM_SEEK_SET, NULL); if (FAILED(hr)) goto end; @@ -1845,8 +1833,6 @@ static HRESULT PropertyStorage_WriteToSt DWORD numProps, prop, sectionOffset, dwTemp; PROPVARIANT var; - assert(This); - PropertyStorage_WriteHeadersToStream(This); /* Count properties. Always at least one property, the code page */ @@ -1933,7 +1919,6 @@ end: */ static void PropertyStorage_DestroyDictionaries(PropertyStorage_impl *This) { - assert(This); dictionary_destroy(This->name_to_propid); This->name_to_propid = NULL; dictionary_destroy(This->propid_to_name); @@ -1946,7 +1931,6 @@ static HRESULT PropertyStorage_CreateDic { HRESULT hr = S_OK; - assert(This); This->name_to_propid = dictionary_create( PropertyStorage_PropNameCompare, PropertyStorage_PropNameDestroy, This);
1
0
0
0
Mike McCormack : ole32: Fix and test reading and writing of VT_CF properties.
by Alexandre Julliard
12 Jul '06
12 Jul '06
Module: wine Branch: refs/heads/master Commit: ac016925236cc731f0d9e7c5d0b0cc4e61e02801 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=ac016925236cc731f0d9e7c…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Wed Jul 12 18:23:30 2006 +0900 ole32: Fix and test reading and writing of VT_CF properties. --- dlls/ole32/stg_prop.c | 27 +++++++++++++++++++++------ dlls/ole32/tests/stg_prop.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index e0567c8..64a825d 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -1142,19 +1142,18 @@ static HRESULT PropertyStorage_ReadPrope break; case VT_CF: { - DWORD len = 0, type = 0, tag = 0; + DWORD len = 0, tag = 0; StorageUtl_ReadDWord(data, 0, &len); StorageUtl_ReadDWord(data, 4, &tag); - StorageUtl_ReadDWord(data, 8, &type); - if (tag == CFTAG_WINDOWS && len > 12) + if (len > 8) { + len -= 8; prop->u.pclipdata = CoTaskMemAlloc(sizeof (CLIPDATA)); prop->u.pclipdata->cbSize = len; - prop->u.pclipdata->ulClipFmt = type; + prop->u.pclipdata->ulClipFmt = tag; prop->u.pclipdata->pClipData = CoTaskMemAlloc(len); - memcpy(prop->u.pclipdata->pClipData, data+12, len - 12); - TRACE("returning %p, len %ld\n", prop->u.pclipdata->pClipData, len - 12); + memcpy(prop->u.pclipdata->pClipData, data+8, len); } else hr = STG_E_INVALIDPARAMETER; @@ -1727,6 +1726,22 @@ static HRESULT PropertyStorage_WriteProp bytesWritten = count; break; } + case VT_CF: + { + DWORD cf_hdr[2], len; + + len = var->u.pclipdata->cbSize; + StorageUtl_WriteDWord((LPBYTE)&cf_hdr[0], 0, len + 8); + StorageUtl_WriteDWord((LPBYTE)&cf_hdr[1], 0, var->u.pclipdata->ulClipFmt); + hr = IStream_Write(This->stm, &cf_hdr, sizeof(cf_hdr), &count); + if (FAILED(hr)) + goto end; + hr = IStream_Write(This->stm, &var->u.pclipdata->pClipData, len, &count); + if (FAILED(hr)) + goto end; + bytesWritten = count + sizeof cf_hdr; + break; + } default: FIXME("unsupported type: %d\n", var->vt); return STG_E_INVALIDPARAMETER; diff --git a/dlls/ole32/tests/stg_prop.c b/dlls/ole32/tests/stg_prop.c index 19fd593..169ee09 100644 --- a/dlls/ole32/tests/stg_prop.c +++ b/dlls/ole32/tests/stg_prop.c @@ -55,6 +55,8 @@ static void testProps(void) IPropertyStorage *propertyStorage = NULL; PROPSPEC spec; PROPVARIANT var; + CLIPDATA clipdata; + unsigned char clipcontent[] = "foobar"; if(!GetTempFileNameW(szDot, szPrefix, 0, filename)) return; @@ -134,6 +136,18 @@ static void testProps(void) hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); ok(SUCCEEDED(hr), "WriteMultiple failed: 0x%08lx\n", hr); + /* set a clipboard value */ + spec.ulKind = PRSPEC_PROPID; + U(spec).propid = PIDSI_THUMBNAIL; + var.vt = VT_CF; + clipdata.cbSize = sizeof clipcontent + sizeof (ULONG); + clipdata.ulClipFmt = CF_ENHMETAFILE; + clipdata.pClipData = clipcontent; + U(var).pclipdata = &clipdata; + hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); + ok(SUCCEEDED(hr), "WriteMultiple failed: 0x%08lx\n", hr); + + /* check reading */ hr = IPropertyStorage_ReadMultiple(propertyStorage, 0, NULL, NULL); ok(SUCCEEDED(hr), "ReadMultiple with 0 args failed: 0x%08lx\n", hr); @@ -164,6 +178,20 @@ static void testProps(void) "Didn't get expected type or value for property (got type %d, value %s)\n", var.vt, U(var).pszVal); + /* read clipboard format */ + spec.ulKind = PRSPEC_PROPID; + U(spec).propid = PIDSI_THUMBNAIL; + hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); + ok(var.vt == VT_CF, "variant type wrong\n"); + ok(U(var).pclipdata->ulClipFmt == CF_ENHMETAFILE, + "clipboard type wrong\n"); + ok(U(var).pclipdata->cbSize == sizeof clipcontent + sizeof (ULONG), + "clipboard size wrong\n"); + ok(!memcmp(U(var).pclipdata->pClipData, clipcontent, sizeof clipcontent), + "clipboard contents wrong\n"); + ok(S_OK == PropVariantClear(&var), "failed to clear variant\n"); + /* check deleting */ hr = IPropertyStorage_DeleteMultiple(propertyStorage, 0, NULL); ok(SUCCEEDED(hr), "DeleteMultiple with 0 args failed: 0x%08lx\n", hr);
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
86
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
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200