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
January 2009
----- 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
1348 discussions
Start a n
N
ew thread
Hervé Chanal : shell32: A new icon for mycomputer.
by Alexandre Julliard
28 Jan '09
28 Jan '09
Module: wine Branch: master Commit: 46d2a670d2fb508418e897c4b3045f8f34f6a7c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=46d2a670d2fb508418e897c4b…
Author: Hervé Chanal <chanal_herve(a)yahoo.fr> Date: Tue Jan 27 16:41:21 2009 +0100 shell32: A new icon for mycomputer. --- dlls/shell32/Makefile.in | 3 +- dlls/shell32/mycomputer.ico | Bin 2998 -> 15086 bytes dlls/shell32/mycomputer.svg | 1127 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1129 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=46d2a670d2fb508418e89…
1
0
0
0
Paul Vriens : kernel32/tests: Don't crash when run as a normal user.
by Alexandre Julliard
28 Jan '09
28 Jan '09
Module: wine Branch: master Commit: cca75cc147cbca74003ab78dde41441c070417e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cca75cc147cbca74003ab78dd…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Wed Jan 28 11:43:30 2009 +0100 kernel32/tests: Don't crash when run as a normal user. --- dlls/kernel32/tests/profile.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index e07ece3..59f9c2b 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -681,7 +681,14 @@ static void test_GetPrivateProfileString(const char *content, const char *descri ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); GetWindowsDirectoryA(windir, MAX_PATH); - GetTempFileNameA(windir, "pre", 0, path); + SetLastError(0xdeadbeef); + ret = GetTempFileNameA(windir, "pre", 0, path); + if (!ret && GetLastError() == ERROR_ACCESS_DENIED) + { + skip("Not allowed to create a file in the Windows directory\n"); + DeleteFileA(filename); + return; + } tempfile = strrchr(path, '\\') + 1; create_test_file(path, content, lstrlenA(content));
1
0
0
0
Paul Vriens : kernel32/tests: Fill the buffer to show a bug in Wine.
by Alexandre Julliard
28 Jan '09
28 Jan '09
Module: wine Branch: master Commit: dda0fe451d66b396226014b53f6cb837c37cadd4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dda0fe451d66b396226014b53…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Wed Jan 28 09:00:26 2009 +0100 kernel32/tests: Fill the buffer to show a bug in Wine. --- dlls/kernel32/tests/profile.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index b07bfc8..e07ece3 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -215,22 +215,27 @@ static void test_profile_sections_names(void) CloseHandle( h); /* Test with sufficiently large buffer */ + memset(buf, 0xc, sizeof(buf)); ret = GetPrivateProfileSectionNamesA( buf, 29, testfile3 ); ok( ret == 27, "expected return size 27, got %d\n", ret ); ok( buf[ret-1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); /* Test with exactly fitting buffer */ + memset(buf, 0xc, sizeof(buf)); ret = GetPrivateProfileSectionNamesA( buf, 28, testfile3 ); ok( ret == 26, "expected return size 26, got %d\n", ret ); + todo_wine ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); /* Test with a buffer too small */ + memset(buf, 0xc, sizeof(buf)); ret = GetPrivateProfileSectionNamesA( buf, 27, testfile3 ); ok( ret == 25, "expected return size 25, got %d\n", ret ); + todo_wine ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); /* Tests on nonexistent file */ - memset(buf, 0xcc, sizeof(buf)); + memset(buf, 0xc, sizeof(buf)); ret = GetPrivateProfileSectionNamesA( buf, 10, ".\\not_here.ini" ); ok( ret == 0, "expected return size 0, got %d\n", ret ); ok( buf[0] == 0, "returned buffer not terminated with null\n" ); @@ -238,6 +243,7 @@ static void test_profile_sections_names(void) /* Test with sufficiently large buffer */ SetLastError(0xdeadbeef); + memset(bufW, 0xcc, sizeof(bufW)); ret = GetPrivateProfileSectionNamesW( bufW, 29, testfile3W ); if (ret == 0 && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) { @@ -249,11 +255,13 @@ static void test_profile_sections_names(void) ok( bufW[ret-1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" ); /* Test with exactly fitting buffer */ + memset(bufW, 0xcc, sizeof(bufW)); ret = GetPrivateProfileSectionNamesW( bufW, 28, testfile3W ); ok( ret == 26, "expected return size 26, got %d\n", ret ); ok( bufW[ret+1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" ); /* Test with a buffer too small */ + memset(bufW, 0xcc, sizeof(bufW)); ret = GetPrivateProfileSectionNamesW( bufW, 27, testfile3W ); ok( ret == 25, "expected return size 25, got %d\n", ret ); ok( bufW[ret+1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" );
1
0
0
0
Huw Davies : ole32: The bigblockfile on ILockBytes implementation should work on any ILockBytes not just those based on HGLOBAL .
by Alexandre Julliard
28 Jan '09
28 Jan '09
Module: wine Branch: master Commit: bc93467f5d3cfe55ab27608984bd753daab97197 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc93467f5d3cfe55ab2760898…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jan 27 17:35:18 2009 +0000 ole32: The bigblockfile on ILockBytes implementation should work on any ILockBytes not just those based on HGLOBAL. --- dlls/ole32/stg_bigblockfile.c | 144 +++++++++++++++-------------------------- 1 files changed, 53 insertions(+), 91 deletions(-) diff --git a/dlls/ole32/stg_bigblockfile.c b/dlls/ole32/stg_bigblockfile.c index 1ab3369..19151b9 100644 --- a/dlls/ole32/stg_bigblockfile.c +++ b/dlls/ole32/stg_bigblockfile.c @@ -113,8 +113,6 @@ struct BigBlockFile MappedPage *victimhead, *victimtail; ULONG num_victim_pages; ILockBytes *pLkbyt; - HGLOBAL hbytearray; - LPVOID pbytearray; }; /*********************************************************** @@ -165,10 +163,7 @@ static inline void BIGBLOCKFILE_Zero(BlockBits *bb) */ static BOOL BIGBLOCKFILE_FileInit(LPBIGBLOCKFILE This, HANDLE hFile) { - This->pLkbyt = NULL; - This->hbytearray = 0; - This->pbytearray = NULL; - + This->pLkbyt = NULL; This->hfile = hFile; if (This->hfile == INVALID_HANDLE_VALUE) @@ -204,40 +199,22 @@ static BOOL BIGBLOCKFILE_FileInit(LPBIGBLOCKFILE This, HANDLE hFile) } /****************************************************************************** - * BIGBLOCKFILE_MemInit + * BIGBLOCKFILE_LockBytesInit * - * Initialize a big block object supported by an ILockBytes on HGLOABL. + * Initialize a big block object supported by an ILockBytes. */ -static BOOL BIGBLOCKFILE_MemInit(LPBIGBLOCKFILE This, ILockBytes* plkbyt) +static BOOL BIGBLOCKFILE_LockBytesInit(LPBIGBLOCKFILE This, ILockBytes* plkbyt) { - This->hfile = 0; - This->hfilemap = 0; - - /* - * Retrieve the handle to the byte array from the LockByte object. - */ - if (GetHGlobalFromILockBytes(plkbyt, &(This->hbytearray)) != S_OK) - { - FIXME("May not be an ILockBytes on HGLOBAL\n"); - return FALSE; - } - - This->pLkbyt = plkbyt; - - /* - * Increment the reference count of the ILockByte object since - * we're keeping a reference to it. - */ - ILockBytes_AddRef(This->pLkbyt); - - This->filesize.u.LowPart = GlobalSize(This->hbytearray); - This->filesize.u.HighPart = 0; - - This->pbytearray = GlobalLock(This->hbytearray); + This->hfile = 0; + This->hfilemap = 0; + This->pLkbyt = plkbyt; + ILockBytes_AddRef(This->pLkbyt); - TRACE("mem on %p len %u\n", This->pbytearray, This->filesize.u.LowPart); + /* We'll get the size directly with ILockBytes_Stat */ + This->filesize.QuadPart = 0; - return TRUE; + TRACE("ILockBytes %p\n", This->pLkbyt); + return TRUE; } /****************************************************************************** @@ -277,34 +254,27 @@ static void BIGBLOCKFILE_LinkHeadPage(MappedPage **head, MappedPage *page) static BOOL BIGBLOCKFILE_MapPage(BigBlockFile *This, MappedPage *page) { DWORD lowoffset = PAGE_SIZE * page->page_index; + DWORD numBytesToMap; + DWORD desired_access; - if (This->fileBased) - { - DWORD numBytesToMap; - DWORD desired_access; - - if( !This->hfilemap ) - return FALSE; + assert(This->fileBased); - if (lowoffset + PAGE_SIZE > This->filesize.u.LowPart) - numBytesToMap = This->filesize.u.LowPart - lowoffset; - else - numBytesToMap = PAGE_SIZE; + if( !This->hfilemap ) + return FALSE; - if (This->flProtect == PAGE_READONLY) - desired_access = FILE_MAP_READ; - else - desired_access = FILE_MAP_WRITE; + if (lowoffset + PAGE_SIZE > This->filesize.u.LowPart) + numBytesToMap = This->filesize.u.LowPart - lowoffset; + else + numBytesToMap = PAGE_SIZE; - page->lpBytes = MapViewOfFile(This->hfilemap, desired_access, 0, - lowoffset, numBytesToMap); - page->mapped_bytes = numBytesToMap; - } + if (This->flProtect == PAGE_READONLY) + desired_access = FILE_MAP_READ; else - { - page->lpBytes = (LPBYTE)This->pbytearray + lowoffset; - page->mapped_bytes = PAGE_SIZE; - } + desired_access = FILE_MAP_WRITE; + + page->lpBytes = MapViewOfFile(This->hfilemap, desired_access, 0, + lowoffset, numBytesToMap); + page->mapped_bytes = numBytesToMap; TRACE("mapped page %u to %p\n", page->page_index, page->lpBytes); @@ -392,10 +362,13 @@ static void * BIGBLOCKFILE_GetMappedView( static void BIGBLOCKFILE_UnmapPage(LPBIGBLOCKFILE This, MappedPage *page) { TRACE("%d at %p\n", page->page_index, page->lpBytes); + + assert(This->fileBased); + if (page->refcnt > 0) ERR("unmapping inuse page %p\n", page->lpBytes); - if (This->fileBased && page->lpBytes) + if (page->lpBytes) UnmapViewOfFile(page->lpBytes); page->lpBytes = NULL; @@ -764,7 +737,7 @@ BigBlockFile *BIGBLOCKFILE_Construct(HANDLE hFile, ILockBytes* pLkByt, DWORD ope } else { - if (!BIGBLOCKFILE_MemInit(This, pLkByt)) + if (!BIGBLOCKFILE_LockBytesInit(This, pLkByt)) { HeapFree(GetProcessHeap(), 0, This); return NULL; @@ -790,7 +763,6 @@ void BIGBLOCKFILE_Destructor(BigBlockFile *This) } else { - GlobalUnlock(This->hbytearray); ILockBytes_Release(This->pLkbyt); } @@ -830,6 +802,10 @@ HRESULT BIGBLOCKFILE_WriteAt(BigBlockFile *This, ULARGE_INTEGER offset, HRESULT BIGBLOCKFILE_SetSize(BigBlockFile *This, ULARGE_INTEGER newSize) { HRESULT hr = S_OK; + LARGE_INTEGER newpos; + + if (!This->fileBased) + return ILockBytes_SetSize(This->pLkbyt, newSize); if (This->filesize.u.LowPart == newSize.u.LowPart) return hr; @@ -849,40 +825,19 @@ HRESULT BIGBLOCKFILE_SetSize(BigBlockFile *This, ULARGE_INTEGER newSize) BIGBLOCKFILE_UnmapAllMappedPages(This); - if (This->fileBased) + newpos.QuadPart = newSize.QuadPart; + if (SetFilePointerEx(This->hfile, newpos, NULL, FILE_BEGIN)) { - LARGE_INTEGER newpos; + if( This->hfilemap ) CloseHandle(This->hfilemap); - newpos.QuadPart = newSize.QuadPart; - if (SetFilePointerEx(This->hfile, newpos, NULL, FILE_BEGIN)) - { - if( This->hfilemap ) CloseHandle(This->hfilemap); - - SetEndOfFile(This->hfile); + SetEndOfFile(This->hfile); - /* re-create the file mapping object */ - This->hfilemap = CreateFileMappingA(This->hfile, - NULL, - This->flProtect, - 0, 0, - NULL); - } - } - else - { - GlobalUnlock(This->hbytearray); - - /* Resize the byte array object. */ - ILockBytes_SetSize(This->pLkbyt, newSize); - - /* Re-acquire the handle, it may have changed */ - GetHGlobalFromILockBytes(This->pLkbyt, &This->hbytearray); - This->pbytearray = GlobalLock(This->hbytearray); + /* re-create the file mapping object */ + This->hfilemap = CreateFileMappingA(This->hfile, NULL, This->flProtect, + 0, 0, NULL); } - This->filesize.u.LowPart = newSize.u.LowPart; - This->filesize.u.HighPart = newSize.u.HighPart; - + This->filesize = newSize; BIGBLOCKFILE_RemapAllMappedPages(This); return hr; } @@ -896,7 +851,14 @@ HRESULT BIGBLOCKFILE_SetSize(BigBlockFile *This, ULARGE_INTEGER newSize) static HRESULT BIGBLOCKFILE_GetSize(BigBlockFile *This, ULARGE_INTEGER *size) { HRESULT hr = S_OK; - *size = This->filesize; + if(This->fileBased) + *size = This->filesize; + else + { + STATSTG stat; + hr = ILockBytes_Stat(This->pLkbyt, &stat, STATFLAG_NONAME); + if(SUCCEEDED(hr)) *size = stat.cbSize; + } return hr; }
1
0
0
0
Huw Davies : ole32: Add a helper function to return the file size and modify EnsureExists to use it .
by Alexandre Julliard
28 Jan '09
28 Jan '09
Module: wine Branch: master Commit: bfc32ae0c615b12dd61fe7c2b444f1b4ff5e2dda URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bfc32ae0c615b12dd61fe7c2b…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jan 27 17:13:28 2009 +0000 ole32: Add a helper function to return the file size and modify EnsureExists to use it. --- dlls/ole32/stg_bigblockfile.c | 37 +++++++++++++++++++++++++++++-------- dlls/ole32/storage32.h | 4 ++-- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/dlls/ole32/stg_bigblockfile.c b/dlls/ole32/stg_bigblockfile.c index 24d8d95..1ab3369 100644 --- a/dlls/ole32/stg_bigblockfile.c +++ b/dlls/ole32/stg_bigblockfile.c @@ -827,10 +827,12 @@ HRESULT BIGBLOCKFILE_WriteAt(BigBlockFile *This, ULARGE_INTEGER offset, * Sets the size of the file. * */ -void BIGBLOCKFILE_SetSize(BigBlockFile *This, ULARGE_INTEGER newSize) +HRESULT BIGBLOCKFILE_SetSize(BigBlockFile *This, ULARGE_INTEGER newSize) { + HRESULT hr = S_OK; + if (This->filesize.u.LowPart == newSize.u.LowPart) - return; + return hr; TRACE("from %u to %u\n", This->filesize.u.LowPart, newSize.u.LowPart); @@ -882,6 +884,20 @@ void BIGBLOCKFILE_SetSize(BigBlockFile *This, ULARGE_INTEGER newSize) This->filesize.u.HighPart = newSize.u.HighPart; BIGBLOCKFILE_RemapAllMappedPages(This); + return hr; +} + +/****************************************************************************** + * BIGBLOCKFILE_GetSize + * + * Gets the size of the file. + * + */ +static HRESULT BIGBLOCKFILE_GetSize(BigBlockFile *This, ULARGE_INTEGER *size) +{ + HRESULT hr = S_OK; + *size = This->filesize; + return hr; } /****************************************************************************** @@ -889,22 +905,27 @@ void BIGBLOCKFILE_SetSize(BigBlockFile *This, ULARGE_INTEGER newSize) * * Grows the file if necessary to make sure the block is valid. */ -void BIGBLOCKFILE_EnsureExists(BigBlockFile *This, ULONG index) +HRESULT BIGBLOCKFILE_EnsureExists(BigBlockFile *This, ULONG index) { + ULARGE_INTEGER size; + HRESULT hr; + /* Block index starts at -1 translate to zero based index */ if (index == 0xffffffff) index = 0; else index++; + hr = BIGBLOCKFILE_GetSize(This, &size); + if(FAILED(hr)) return hr; + /* make sure that the block physically exists */ - if ((This->blocksize * (index + 1)) > This->filesize.u.LowPart) + if ((This->blocksize * (index + 1)) > size.QuadPart) { ULARGE_INTEGER newSize; - newSize.u.HighPart = 0; - newSize.u.LowPart = This->blocksize * (index + 1); - - BIGBLOCKFILE_SetSize(This, newSize); + newSize.QuadPart = This->blocksize * (index + 1); + hr = BIGBLOCKFILE_SetSize(This, newSize); } + return hr; } diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index 639ec6a..1e40b3a 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -164,8 +164,8 @@ BigBlockFile* BIGBLOCKFILE_Construct(HANDLE hFile, ULONG blocksize, BOOL fileBased); void BIGBLOCKFILE_Destructor(LPBIGBLOCKFILE This); -void BIGBLOCKFILE_EnsureExists(LPBIGBLOCKFILE This, ULONG index); -void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize); +HRESULT BIGBLOCKFILE_EnsureExists(LPBIGBLOCKFILE This, ULONG index); +HRESULT BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize); HRESULT BIGBLOCKFILE_ReadAt(LPBIGBLOCKFILE This, ULARGE_INTEGER offset, void* buffer, ULONG size, ULONG* bytesRead); HRESULT BIGBLOCKFILE_WriteAt(LPBIGBLOCKFILE This, ULARGE_INTEGER offset,
1
0
0
0
Huw Davies : ole32: Move functions around in file to avoid forward declarations.
by Alexandre Julliard
28 Jan '09
28 Jan '09
Module: wine Branch: master Commit: cc7edbe3b590e62361d0f5648ab6a26b044f1216 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cc7edbe3b590e62361d0f5648…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jan 27 17:03:55 2009 +0000 ole32: Move functions around in file to avoid forward declarations. --- dlls/ole32/stg_bigblockfile.c | 488 +++++++++++++++++++---------------------- 1 files changed, 231 insertions(+), 257 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=cc7edbe3b590e62361d0f…
1
0
0
0
Huw Davies : ole32: Move private data structure out of header file.
by Alexandre Julliard
28 Jan '09
28 Jan '09
Module: wine Branch: master Commit: 70ee1123376cfd137ea778fbea225c780588765f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70ee1123376cfd137ea778fbe…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jan 27 15:27:08 2009 +0000 ole32: Move private data structure out of header file. --- dlls/ole32/stg_bigblockfile.c | 18 ++++++++++++++++++ dlls/ole32/storage32.h | 20 -------------------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/dlls/ole32/stg_bigblockfile.c b/dlls/ole32/stg_bigblockfile.c index a2ee1de..0d7b366 100644 --- a/dlls/ole32/stg_bigblockfile.c +++ b/dlls/ole32/stg_bigblockfile.c @@ -85,6 +85,8 @@ typedef struct * file this mapping represents. (The mappings are always * PAGE_SIZE-aligned.) */ + +typedef struct MappedPage MappedPage; struct MappedPage { MappedPage *next; @@ -99,6 +101,22 @@ struct MappedPage BlockBits writable_blocks; }; +struct BigBlockFile +{ + BOOL fileBased; + ULARGE_INTEGER filesize; + ULONG blocksize; + HANDLE hfile; + HANDLE hfilemap; + DWORD flProtect; + MappedPage *maplist; + MappedPage *victimhead, *victimtail; + ULONG num_victim_pages; + ILockBytes *pLkbyt; + HGLOBAL hbytearray; + LPVOID pbytearray; +}; + /*********************************************************** * Prototypes for private methods */ diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index b358ed2..639ec6a 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -152,27 +152,7 @@ struct StgProperty * this section appear in stg_bigblockfile.c */ -/* - * Declaration of the data structures - */ typedef struct BigBlockFile BigBlockFile,*LPBIGBLOCKFILE; -typedef struct MappedPage MappedPage,*LPMAPPEDPAGE; - -struct BigBlockFile -{ - BOOL fileBased; - ULARGE_INTEGER filesize; - ULONG blocksize; - HANDLE hfile; - HANDLE hfilemap; - DWORD flProtect; - MappedPage *maplist; - MappedPage *victimhead, *victimtail; - ULONG num_victim_pages; - ILockBytes *pLkbyt; - HGLOBAL hbytearray; - LPVOID pbytearray; -}; /* * Declaration of the functions used to manipulate the BigBlockFile
1
0
0
0
Michael Stefaniuc : setupapi: Remove superfluous pointer casts.
by Alexandre Julliard
28 Jan '09
28 Jan '09
Module: wine Branch: master Commit: ffae0123ac46ba6dfac74d7c84422073fd53b580 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ffae0123ac46ba6dfac74d7c8…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jan 28 10:24:55 2009 +0100 setupapi: Remove superfluous pointer casts. --- dlls/setupapi/devinst.c | 44 ++++++++++++++++++++++---------------------- dlls/setupapi/diskspace.c | 4 ++-- dlls/setupapi/fakedll.c | 2 +- dlls/setupapi/parser.c | 2 +- dlls/setupapi/queue.c | 4 ++-- dlls/setupapi/setupcab.c | 4 ++-- 6 files changed, 30 insertions(+), 30 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ffae0123ac46ba6dfac74…
1
0
0
0
Michael Stefaniuc : crypt32: Remove remaining superfluous pointer casts.
by Alexandre Julliard
28 Jan '09
28 Jan '09
Module: wine Branch: master Commit: 903585162daaf3d1a20a89ebb3fe605156bf2b52 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=903585162daaf3d1a20a89ebb…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jan 28 10:25:22 2009 +0100 crypt32: Remove remaining superfluous pointer casts. --- dlls/crypt32/filestore.c | 26 ++++++++-------- dlls/crypt32/msg.c | 73 +++++++++++++++++++++------------------------ dlls/crypt32/object.c | 26 ++++++++-------- dlls/crypt32/oid.c | 22 +++++++------- dlls/crypt32/provstore.c | 10 +++--- dlls/crypt32/regstore.c | 16 +++++----- dlls/crypt32/serialize.c | 10 +++--- dlls/crypt32/store.c | 56 +++++++++++++++++------------------ 8 files changed, 116 insertions(+), 123 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=903585162daaf3d1a20a8…
1
0
0
0
Michael Stefaniuc : dinput: Remove superfluous pointer casts.
by Alexandre Julliard
28 Jan '09
28 Jan '09
Module: wine Branch: master Commit: c0d2a21dd14163eb49629e36a385f04c3a286969 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c0d2a21dd14163eb49629e36a…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jan 28 10:24:42 2009 +0100 dinput: Remove superfluous pointer casts. --- dlls/dinput/device.c | 2 +- dlls/dinput/dinput_main.c | 2 +- dlls/dinput/effect_linuxinput.c | 20 ++++++++++---------- dlls/dinput/tests/device.c | 2 +- dlls/dinput/tests/joystick.c | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 8e226cc..941206c 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -269,7 +269,7 @@ void fill_DataFormat(void *out, DWORD size, const void *in, const DataFormat *df { int i; const char *in_c = in; - char *out_c = (char *) out; + char *out_c = out; memset(out, 0, size); if (df->dt == NULL) { diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 6c2a9ed..46e4e28 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -869,7 +869,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); if ( IsEqualCLSID( &IID_IClassFactory, riid ) ) { - *ppv = (LPVOID)&DINPUT_CF; + *ppv = &DINPUT_CF; IClassFactory_AddRef((IClassFactory*)*ppv); return S_OK; } diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index 2854b34..155d800 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -423,19 +423,19 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters( return diErr; else { if (This->effect.type == FF_PERIODIC) { - LPDIPERIODIC tsp = (LPDIPERIODIC)(peff->lpvTypeSpecificParams); + LPDIPERIODIC tsp = peff->lpvTypeSpecificParams; tsp->dwMagnitude = (This->effect.u.periodic.magnitude / 33) * 10; tsp->lOffset = (This->effect.u.periodic.offset / 33) * 10; tsp->dwPhase = (This->effect.u.periodic.phase / 33) * 36; tsp->dwPeriod = (This->effect.u.periodic.period * 1000); } else if (This->effect.type == FF_CONSTANT) { - LPDICONSTANTFORCE tsp = (LPDICONSTANTFORCE)(peff->lpvTypeSpecificParams); + LPDICONSTANTFORCE tsp = peff->lpvTypeSpecificParams; tsp->lMagnitude = (This->effect.u.constant.level / 33) * 10; } else if (This->effect.type == FF_SPRING || This->effect.type == FF_FRICTION || This->effect.type == FF_INERTIA || This->effect.type == FF_DAMPER) { - LPDICONDITION tsp = (LPDICONDITION)(peff->lpvTypeSpecificParams); + LPDICONDITION tsp = peff->lpvTypeSpecificParams; int i; for (i = 0; i < 2; ++i) { tsp[i].lOffset = (This->effect.u.condition[i].center / 33) * 10; @@ -446,7 +446,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters( tsp[i].lDeadBand = (This->effect.u.condition[i].deadband / 33) * 10; } } else if (This->effect.type == FF_RAMP) { - LPDIRAMPFORCE tsp = (LPDIRAMPFORCE)(peff->lpvTypeSpecificParams); + LPDIRAMPFORCE tsp = peff->lpvTypeSpecificParams; tsp->lStart = (This->effect.u.ramp.start_level / 33) * 10; tsp->lEnd = (This->effect.u.ramp.end_level / 33) * 10; } @@ -654,7 +654,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters( LPCDIPERIODIC tsp; if (peff->cbTypeSpecificParams != sizeof(DIPERIODIC)) return DIERR_INVALIDPARAM; - tsp = (LPCDIPERIODIC)(peff->lpvTypeSpecificParams); + tsp = peff->lpvTypeSpecificParams; This->effect.u.periodic.magnitude = (tsp->dwMagnitude / 10) * 32; This->effect.u.periodic.offset = (tsp->lOffset / 10) * 32; This->effect.u.periodic.phase = (tsp->dwPhase / 9) * 8; /* == (/ 36 * 32) */ @@ -663,17 +663,17 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters( LPCDICONSTANTFORCE tsp; if (peff->cbTypeSpecificParams != sizeof(DICONSTANTFORCE)) return DIERR_INVALIDPARAM; - tsp = (LPCDICONSTANTFORCE)(peff->lpvTypeSpecificParams); + tsp = peff->lpvTypeSpecificParams; This->effect.u.constant.level = (max(min(tsp->lMagnitude, 10000), -10000) / 10) * 32; } else if (type == DIEFT_RAMPFORCE) { LPCDIRAMPFORCE tsp; if (peff->cbTypeSpecificParams != sizeof(DIRAMPFORCE)) return DIERR_INVALIDPARAM; - tsp = (LPCDIRAMPFORCE)(peff->lpvTypeSpecificParams); + tsp = peff->lpvTypeSpecificParams; This->effect.u.ramp.start_level = (tsp->lStart / 10) * 32; This->effect.u.ramp.end_level = (tsp->lStart / 10) * 32; } else if (type == DIEFT_CONDITION) { - LPCDICONDITION tsp = (LPCDICONDITION)(peff->lpvTypeSpecificParams); + LPCDICONDITION tsp = peff->lpvTypeSpecificParams; if (peff->cbTypeSpecificParams == sizeof(DICONDITION)) { /* One condition block. This needs to be rotated to direction, * and expanded to separate x and y conditions. */ @@ -879,7 +879,7 @@ HRESULT linuxinput_get_info_A( info->dwDynamicParams = info->dwStaticParams; /* yes, this is windows behavior (print the GUID_Name for name) */ - strcpy((char*)info->tszName, _dump_dinput_GUID(rguid)); + strcpy(info->tszName, _dump_dinput_GUID(rguid)); return DI_OK; } @@ -914,7 +914,7 @@ HRESULT linuxinput_get_info_W( /* yes, this is windows behavior (print the GUID_Name for name) */ MultiByteToWideChar(CP_ACP, 0, _dump_dinput_GUID(rguid), -1, - (WCHAR*)info->tszName, MAX_PATH); + info->tszName, MAX_PATH); return DI_OK; } diff --git a/dlls/dinput/tests/device.c b/dlls/dinput/tests/device.c index e59d8c3..83c18f1 100644 --- a/dlls/dinput/tests/device.c +++ b/dlls/dinput/tests/device.c @@ -120,7 +120,7 @@ struct enum_data static BOOL CALLBACK enum_devices(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef) { - struct enum_data *data = (struct enum_data*)pvRef; + struct enum_data *data = pvRef; LPDIRECTINPUTDEVICE device; HRESULT hr; diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c index 789317e..371f7ee 100644 --- a/dlls/dinput/tests/joystick.c +++ b/dlls/dinput/tests/joystick.c @@ -96,7 +96,7 @@ static BOOL CALLBACK EnumAxes( VOID* pContext) { HRESULT hr; - JoystickInfo * info = (JoystickInfo *)pContext; + JoystickInfo * info = pContext; if (IsEqualIID(&pdidoi->guidType, &GUID_XAxis) || IsEqualIID(&pdidoi->guidType, &GUID_YAxis) || @@ -171,7 +171,7 @@ static BOOL CALLBACK EnumJoysticks( LPVOID pvRef) { HRESULT hr; - UserData * data = (UserData *)pvRef; + UserData * data = pvRef; LPDIRECTINPUTDEVICE pJoystick; DIDATAFORMAT format; DIDEVCAPS caps; @@ -267,7 +267,7 @@ static BOOL CALLBACK EnumJoysticks( info.lMin = 0; info.lMax = 0xffff; /* enumerate objects */ - hr = IDirectInputDevice_EnumObjects(pJoystick, EnumAxes, (VOID*)&info, DIDFT_ALL); + hr = IDirectInputDevice_EnumObjects(pJoystick, EnumAxes, &info, DIDFT_ALL); ok(hr==DI_OK,"IDirectInputDevice_EnumObjects() failed: %08x\n", hr); ok(caps.dwAxes == info.axis, "Number of enumerated axes (%d) doesn't match capabilities (%d)\n", info.axis, caps.dwAxes); @@ -280,7 +280,7 @@ static BOOL CALLBACK EnumJoysticks( info.lMin = -2000; info.lMax = +2000; info.dZone= 123; - hr = IDirectInputDevice_EnumObjects(pJoystick, EnumAxes, (VOID*)&info, DIDFT_ALL); + hr = IDirectInputDevice_EnumObjects(pJoystick, EnumAxes, &info, DIDFT_ALL); ok(hr==DI_OK,"IDirectInputDevice_EnumObjects() failed: %08x\n", hr); hr = IDirectInputDevice_GetDeviceInfo(pJoystick, 0);
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
135
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Results per page:
10
25
50
100
200