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
June
May
April
March
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
October 2009
----- 2025 -----
June 2025
May 2025
April 2025
March 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
1207 discussions
Start a n
N
ew thread
Juan Lang : wininet: Move initialization of SSL_CTX to library initialization time.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 5c6f47f7a764b632d9ef08490c48fe425be2f3f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c6f47f7a764b632d9ef08490…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Sep 29 11:05:11 2009 -0700 wininet: Move initialization of SSL_CTX to library initialization time. --- dlls/wininet/netconnection.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/
…
[View More]
netconnection.c index b5ca18a..2e97017 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -209,6 +209,14 @@ BOOL NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL) pBIO_new_fp(stderr, BIO_NOCLOSE); /* FIXME: should use winedebug stuff */ meth = pSSLv23_method(); + ctx = pSSL_CTX_new(meth); + if (!pSSL_CTX_set_default_verify_paths(ctx)) + { + ERR("SSL_CTX_set_default_verify_paths failed: %s\n", + pERR_error_string(pERR_get_error(), 0)); + INTERNET_SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } #else FIXME("can't use SSL, not compiled in.\n"); INTERNET_SetLastError(ERROR_INTERNET_SECURITY_CHANNEL_ERROR); @@ -371,14 +379,6 @@ BOOL NETCON_secure_connect(WININET_NETCONNECTION *connection, LPCWSTR hostname) return FALSE; } - ctx = pSSL_CTX_new(meth); - if (!pSSL_CTX_set_default_verify_paths(ctx)) - { - ERR("SSL_CTX_set_default_verify_paths failed: %s\n", - pERR_error_string(pERR_get_error(), 0)); - INTERNET_SetLastError(ERROR_OUTOFMEMORY); - return FALSE; - } connection->ssl_s = pSSL_new(ctx); if (!connection->ssl_s) {
[View Less]
1
0
0
0
Alexandre Julliard : version: Simplify the resource loading since we always load the same type and id now .
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: f6fc2dba0718d28ccbb98f9e8b15a8e034dc88b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6fc2dba0718d28ccbb98f9e8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 1 13:58:24 2009 +0200 version: Simplify the resource loading since we always load the same type and id now. --- dlls/version/info.c | 5 +- dlls/version/resource.c | 127 +++++++++-------------------------------------- 2 files changed, 25 insertions(+
…
[View More]
), 107 deletions(-) diff --git a/dlls/version/info.c b/dlls/version/info.c index f88b239..de6dd4b 100644 --- a/dlls/version/info.c +++ b/dlls/version/info.c @@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ver); -extern DWORD find_resource( HFILE lzfd, LPCSTR type, LPCSTR id, DWORD *reslen, DWORD *offset ); +extern DWORD find_version_resource( HFILE lzfd, DWORD *reslen, DWORD *offset ); /****************************************************************************** * @@ -355,8 +355,7 @@ static DWORD VERSION_GetFileVersionInfo_16( LPCSTR filename, DWORD datasize, LPV if (lzfd >= 0) { - if (find_resource( lzfd, MAKEINTRESOURCEA(VS_FILE_INFO), MAKEINTRESOURCEA(VS_VERSION_INFO), - &len, &offset )) + if (find_version_resource( lzfd, &len, &offset )) { if (data) { diff --git a/dlls/version/resource.c b/dlls/version/resource.c index 0f8e086..9af07fe 100644 --- a/dlls/version/resource.c +++ b/dlls/version/resource.c @@ -36,6 +36,7 @@ #include "windef.h" #include "winbase.h" #include "lzexpand.h" +#include "winver.h" #include "wine/unicode.h" #include "wine/winbase16.h" @@ -88,56 +89,6 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_default( const IMAGE_RESOURCE_ } -/********************************************************************** - * find_entry_by_name - * - * Find an entry by name in a resource directory - * Copied from loader/pe_resource.c - */ -static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_name( const IMAGE_RESOURCE_DIRECTORY *dir, - LPCSTR name, const void *root ) -{ - const IMAGE_RESOURCE_DIRECTORY *ret = NULL; - LPWSTR nameW; - DWORD namelen; - - if (!HIWORD(name)) return find_entry_by_id( dir, LOWORD(name), root ); - if (name[0] == '#') - { - return find_entry_by_id( dir, atoi(name+1), root ); - } - - namelen = MultiByteToWideChar( CP_ACP, 0, name, -1, NULL, 0 ); - if ((nameW = HeapAlloc( GetProcessHeap(), 0, namelen * sizeof(WCHAR) ))) - { - const IMAGE_RESOURCE_DIRECTORY_ENTRY *entry; - const IMAGE_RESOURCE_DIR_STRING_U *str; - int min, max, res, pos; - - MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, namelen ); - namelen--; /* remove terminating null */ - entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1); - min = 0; - max = dir->NumberOfNamedEntries - 1; - while (min <= max) - { - pos = (min + max) / 2; - str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const char *)root + entry[pos].u1.s1.NameOffset); - res = strncmpiW( nameW, str->NameString, str->Length ); - if (!res && namelen == str->Length) - { - ret = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + entry[pos].u2.s3.OffsetToDirectory); - break; - } - if (res < 0) max = pos - 1; - else min = pos + 1; - } - HeapFree( GetProcessHeap(), 0, nameW ); - } - return ret; -} - - /*********************************************************************** * read_xx_header [internal] */ @@ -171,9 +122,10 @@ static int read_xx_header( HFILE lzfd ) /*********************************************************************** * find_ne_resource [internal] */ -static BOOL find_ne_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid, - DWORD *resLen, DWORD *resOff ) +static BOOL find_ne_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff ) { + const WORD typeid = VS_FILE_INFO | 0x8000; + const WORD resid = VS_VERSION_INFO | 0x8000; IMAGE_OS2_HEADER nehd; NE_TYPEINFO *typeInfo; NE_NAMEINFO *nameInfo; @@ -206,55 +158,23 @@ static BOOL find_ne_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid, /* Find resource */ typeInfo = (NE_TYPEINFO *)(resTab + 2); - - if (HIWORD(typeid) != 0) /* named type */ - { - BYTE len = strlen( typeid ); - while (typeInfo->type_id) - { - if (!(typeInfo->type_id & 0x8000)) - { - BYTE *p = resTab + typeInfo->type_id; - if ((*p == len) && !strncasecmp( (char*)p+1, typeid, len )) goto found_type; - } - typeInfo = (NE_TYPEINFO *)((char *)(typeInfo + 1) + - typeInfo->count * sizeof(NE_NAMEINFO)); - } - } - else /* numeric type id */ + while (typeInfo->type_id) { - WORD id = LOWORD(typeid) | 0x8000; - while (typeInfo->type_id) - { - if (typeInfo->type_id == id) goto found_type; - typeInfo = (NE_TYPEINFO *)((char *)(typeInfo + 1) + - typeInfo->count * sizeof(NE_NAMEINFO)); - } + if (typeInfo->type_id == typeid) goto found_type; + typeInfo = (NE_TYPEINFO *)((char *)(typeInfo + 1) + + typeInfo->count * sizeof(NE_NAMEINFO)); } - TRACE("No typeid entry found for %p\n", typeid ); + TRACE("No typeid entry found\n" ); HeapFree( GetProcessHeap(), 0, resTab ); return FALSE; found_type: nameInfo = (NE_NAMEINFO *)(typeInfo + 1); - if (HIWORD(resid) != 0) /* named resource */ - { - BYTE len = strlen( resid ); - for (count = typeInfo->count; count > 0; count--, nameInfo++) - { - BYTE *p = resTab + nameInfo->id; - if (nameInfo->id & 0x8000) continue; - if ((*p == len) && !strncasecmp( (char*)p+1, resid, len )) goto found_name; - } - } - else /* numeric resource id */ - { - WORD id = LOWORD(resid) | 0x8000; - for (count = typeInfo->count; count > 0; count--, nameInfo++) - if (nameInfo->id == id) goto found_name; - } - TRACE("No resid entry found for %p\n", typeid ); + for (count = typeInfo->count; count > 0; count--, nameInfo++) + if (nameInfo->id == resid) goto found_name; + + TRACE("No resid entry found\n" ); HeapFree( GetProcessHeap(), 0, resTab ); return FALSE; @@ -270,8 +190,7 @@ static BOOL find_ne_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid, /*********************************************************************** * find_pe_resource [internal] */ -static BOOL find_pe_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid, - DWORD *resLen, DWORD *resOff ) +static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff ) { IMAGE_NT_HEADERS pehd; DWORD pehdoffset; @@ -344,22 +263,22 @@ static BOOL find_pe_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid, resDir = resSection + (resDataDir->VirtualAddress - sections[i].VirtualAddress); resPtr = resDir; - resPtr = find_entry_by_name( resPtr, typeid, resDir ); + resPtr = find_entry_by_id( resPtr, VS_FILE_INFO, resDir ); if ( !resPtr ) { - TRACE("No typeid entry found for %p\n", typeid ); + TRACE("No typeid entry found\n" ); goto done; } - resPtr = find_entry_by_name( resPtr, resid, resDir ); + resPtr = find_entry_by_id( resPtr, VS_VERSION_INFO, resDir ); if ( !resPtr ) { - TRACE("No resid entry found for %p\n", resid ); + TRACE("No resid entry found\n" ); goto done; } resPtr = find_entry_default( resPtr, resDir ); if ( !resPtr ) { - TRACE("No default language entry found for %p\n", resid ); + TRACE("No default language entry found\n" ); goto done; } @@ -391,19 +310,19 @@ static BOOL find_pe_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid, /*********************************************************************** - * find_resource [internal] + * find_version_resource [internal] */ -DWORD find_resource( HFILE lzfd, LPCSTR type, LPCSTR id, DWORD *reslen, DWORD *offset ) +DWORD find_version_resource( HFILE lzfd, DWORD *reslen, DWORD *offset ) { DWORD magic = read_xx_header( lzfd ); switch (magic) { case IMAGE_OS2_SIGNATURE: - if (!find_ne_resource( lzfd, type, id, reslen, offset )) magic = 0; + if (!find_ne_resource( lzfd, reslen, offset )) magic = 0; break; case IMAGE_NT_SIGNATURE: - if (!find_pe_resource( lzfd, type, id, reslen, offset )) magic = 0; + if (!find_pe_resource( lzfd, reslen, offset )) magic = 0; break; } return magic;
[View Less]
1
0
0
0
Alexandre Julliard : version: Make ver.dll into a stand-alone 16-bit module .
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 3ed5986dd68ddbaaecf9676f808e9c062f27f914 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3ed5986dd68ddbaaecf9676f8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 1 13:57:08 2009 +0200 version: Make ver.dll into a stand-alone 16-bit module. --- .gitignore | 1 - configure | 9 + configure.ac |
…
[View More]
1 + dlls/Makefile.in | 4 - dlls/ver.dll16/Makefile.in | 14 + .../{version/ver.spec => ver.dll16/ver.dll16.spec} | 0 dlls/ver.dll16/version.c | 558 ++++++++++++++++++++ dlls/version/Makefile.in | 5 - dlls/version/ver16.c | 182 ------- 9 files changed, 582 insertions(+), 192 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3ed5986dd68ddbaaecf96…
[View Less]
1
0
0
0
Alexandre Julliard : version: Moved GetFileResourceSize16/ GetFileResource16 to ver16.c.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: dbbc40affa69a66d2f0993492e5e910210835ceb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dbbc40affa69a66d2f0993492…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 1 13:56:13 2009 +0200 version: Moved GetFileResourceSize16/GetFileResource16 to ver16.c. --- dlls/version/resource.c | 58 --------------------------------------------- dlls/version/ver16.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files
…
[View More]
changed, 60 insertions(+), 58 deletions(-) diff --git a/dlls/version/resource.c b/dlls/version/resource.c index 2523aaa..0f8e086 100644 --- a/dlls/version/resource.c +++ b/dlls/version/resource.c @@ -408,61 +408,3 @@ DWORD find_resource( HFILE lzfd, LPCSTR type, LPCSTR id, DWORD *reslen, DWORD *o } return magic; } - - -/************************************************************************* - * GetFileResourceSize [VER.2] - */ -DWORD WINAPI GetFileResourceSize16( LPCSTR lpszFileName, LPCSTR lpszResType, - LPCSTR lpszResId, LPDWORD lpdwFileOffset ) -{ - HFILE lzfd; - OFSTRUCT ofs; - DWORD reslen = 0; - - TRACE("(%s,type=%p,id=%p,off=%p)\n", - debugstr_a(lpszFileName), lpszResType, lpszResId, lpszResId ); - - lzfd = LZOpenFileA( (LPSTR)lpszFileName, &ofs, OF_READ ); - if (lzfd >= 0) - { - if (!find_resource( lzfd, lpszResType, lpszResId, &reslen, lpdwFileOffset )) reslen = 0; - LZClose( lzfd ); - } - return reslen; -} - - -/************************************************************************* - * GetFileResource [VER.3] - */ -DWORD WINAPI GetFileResource16( LPCSTR lpszFileName, LPCSTR lpszResType, - LPCSTR lpszResId, DWORD dwFileOffset, - DWORD dwResLen, LPVOID lpvData ) -{ - HFILE lzfd; - OFSTRUCT ofs; - DWORD reslen = dwResLen; - - TRACE("(%s,type=%p,id=%p,off=%d,len=%d,data=%p)\n", - debugstr_a(lpszFileName), lpszResType, lpszResId, - dwFileOffset, dwResLen, lpvData ); - - lzfd = LZOpenFileA( (LPSTR)lpszFileName, &ofs, OF_READ ); - if ( lzfd < 0 ) return 0; - - if ( !dwFileOffset ) - { - if (!find_resource( lzfd, lpszResType, lpszResId, &reslen, &dwFileOffset )) - { - LZClose( lzfd ); - return 0; - } - } - - LZSeek( lzfd, dwFileOffset, SEEK_SET ); - reslen = LZRead( lzfd, lpvData, min( reslen, dwResLen ) ); - LZClose( lzfd ); - - return reslen; -} diff --git a/dlls/version/ver16.c b/dlls/version/ver16.c index 3ffb920..f399cd2 100644 --- a/dlls/version/ver16.c +++ b/dlls/version/ver16.c @@ -23,11 +23,71 @@ #include "windef.h" #include "wine/winbase16.h" #include "winver.h" +#include "lzexpand.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(ver); +extern DWORD find_resource( HFILE lzfd, LPCSTR type, LPCSTR id, DWORD *reslen, DWORD *offset ); + +/************************************************************************* + * GetFileResourceSize [VER.2] + */ +DWORD WINAPI GetFileResourceSize16( LPCSTR lpszFileName, LPCSTR lpszResType, + LPCSTR lpszResId, LPDWORD lpdwFileOffset ) +{ + HFILE lzfd; + OFSTRUCT ofs; + DWORD reslen = 0; + + TRACE("(%s,type=%p,id=%p,off=%p)\n", + debugstr_a(lpszFileName), lpszResType, lpszResId, lpszResId ); + + lzfd = LZOpenFileA( (LPSTR)lpszFileName, &ofs, OF_READ ); + if (lzfd >= 0) + { + if (!find_resource( lzfd, lpszResType, lpszResId, &reslen, lpdwFileOffset )) reslen = 0; + LZClose( lzfd ); + } + return reslen; +} + + +/************************************************************************* + * GetFileResource [VER.3] + */ +DWORD WINAPI GetFileResource16( LPCSTR lpszFileName, LPCSTR lpszResType, + LPCSTR lpszResId, DWORD dwFileOffset, + DWORD dwResLen, LPVOID lpvData ) +{ + HFILE lzfd; + OFSTRUCT ofs; + DWORD reslen = dwResLen; + + TRACE("(%s,type=%p,id=%p,off=%d,len=%d,data=%p)\n", + debugstr_a(lpszFileName), lpszResType, lpszResId, + dwFileOffset, dwResLen, lpvData ); + + lzfd = LZOpenFileA( (LPSTR)lpszFileName, &ofs, OF_READ ); + if ( lzfd < 0 ) return 0; + + if ( !dwFileOffset ) + { + if (!find_resource( lzfd, lpszResType, lpszResId, &reslen, &dwFileOffset )) + { + LZClose( lzfd ); + return 0; + } + } + + LZSeek( lzfd, dwFileOffset, 0 /* SEEK_SET */ ); + reslen = LZRead( lzfd, lpvData, min( reslen, dwResLen ) ); + LZClose( lzfd ); + + return reslen; +} + /************************************************************************* * GetFileVersionInfoSize [VER.6] */
[View Less]
1
0
0
0
Alexandre Julliard : version: Use the find_resource function instead of the 16-bit entry points to load 16-bit resources .
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: e84c42d92afc45891eefc78fa3961c66b533504b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e84c42d92afc45891eefc78fa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 1 13:54:58 2009 +0200 version: Use the find_resource function instead of the 16-bit entry points to load 16-bit resources. --- dlls/version/info.c | 36 +++++++++++++++++++++++------------- 1 files changed, 23 insertions(+), 13 deletions(-) diff --git a/
…
[View More]
dlls/version/info.c b/dlls/version/info.c index 95dadaf..f88b239 100644 --- a/dlls/version/info.c +++ b/dlls/version/info.c @@ -30,6 +30,7 @@ #include "winbase.h" #include "winver.h" #include "winternl.h" +#include "lzexpand.h" #include "wine/winuser16.h" #include "wine/unicode.h" #include "winerror.h" @@ -37,6 +38,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ver); +extern DWORD find_resource( HFILE lzfd, LPCSTR type, LPCSTR id, DWORD *reslen, DWORD *offset ); + /****************************************************************************** * * This function will print via standard TRACE, debug info regarding @@ -344,23 +347,30 @@ static DWORD VERSION_GetFileVersionInfo_16( LPCSTR filename, DWORD datasize, LPV } /* first try without loading a 16-bit module */ - if (is_builtin) - len = 0; - else - len = GetFileResourceSize16( filename, - MAKEINTRESOURCEA(VS_FILE_INFO), - MAKEINTRESOURCEA(VS_VERSION_INFO), - &offset ); - if (len) - { - if (!data) return len; - - len = GetFileResource16( filename, - MAKEINTRESOURCEA(VS_FILE_INFO), - MAKEINTRESOURCEA(VS_VERSION_INFO), - offset, datasize, data ); + len = 0; + if (!is_builtin) + { + OFSTRUCT ofs; + HFILE lzfd = LZOpenFileA( (LPSTR)filename, &ofs, OF_READ ); + + if (lzfd >= 0) + { + if (find_resource( lzfd, MAKEINTRESOURCEA(VS_FILE_INFO), MAKEINTRESOURCEA(VS_VERSION_INFO), + &len, &offset )) + { + if (data) + { + LZSeek( lzfd, offset, 0 /* SEEK_SET */ ); + len = LZRead( lzfd, data, min( len, datasize ) ); + } + } + LZClose( lzfd ); + } + if (len) { + if (!data) return len; + vffi = (VS_FIXEDFILEINFO *)VersionInfo16_Value( (VS_VERSION_INFO_STRUCT16 *)data ); if ( vffi->dwSignature == VS_FFI_SIGNATURE )
[View Less]
1
0
0
0
Alexandre Julliard : version: Abstract resource finding into a common function.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: e04b9984b60c4eecf31ae7b29717ce0a6871d575 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e04b9984b60c4eecf31ae7b29…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 1 13:53:42 2009 +0200 version: Abstract resource finding into a common function. --- dlls/version/resource.c | 58 +++++++++++++++++++++-------------------------- 1 files changed, 26 insertions(+), 32 deletions(-) diff --git a/dlls/version/resource.c b/
…
[View More]
dlls/version/resource.c index efd9115..2523aaa 100644 --- a/dlls/version/resource.c +++ b/dlls/version/resource.c @@ -390,38 +390,46 @@ static BOOL find_pe_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid, } +/*********************************************************************** + * find_resource [internal] + */ +DWORD find_resource( HFILE lzfd, LPCSTR type, LPCSTR id, DWORD *reslen, DWORD *offset ) +{ + DWORD magic = read_xx_header( lzfd ); + + switch (magic) + { + case IMAGE_OS2_SIGNATURE: + if (!find_ne_resource( lzfd, type, id, reslen, offset )) magic = 0; + break; + case IMAGE_NT_SIGNATURE: + if (!find_pe_resource( lzfd, type, id, reslen, offset )) magic = 0; + break; + } + return magic; +} + + /************************************************************************* * GetFileResourceSize [VER.2] */ DWORD WINAPI GetFileResourceSize16( LPCSTR lpszFileName, LPCSTR lpszResType, LPCSTR lpszResId, LPDWORD lpdwFileOffset ) { - BOOL retv = FALSE; HFILE lzfd; OFSTRUCT ofs; - DWORD reslen; + DWORD reslen = 0; TRACE("(%s,type=%p,id=%p,off=%p)\n", debugstr_a(lpszFileName), lpszResType, lpszResId, lpszResId ); lzfd = LZOpenFileA( (LPSTR)lpszFileName, &ofs, OF_READ ); - if ( lzfd < 0 ) return 0; - - switch ( read_xx_header( lzfd ) ) + if (lzfd >= 0) { - case IMAGE_OS2_SIGNATURE: - retv = find_ne_resource( lzfd, lpszResType, lpszResId, - &reslen, lpdwFileOffset ); - break; - - case IMAGE_NT_SIGNATURE: - retv = find_pe_resource( lzfd, lpszResType, lpszResId, - &reslen, lpdwFileOffset ); - break; + if (!find_resource( lzfd, lpszResType, lpszResId, &reslen, lpdwFileOffset )) reslen = 0; + LZClose( lzfd ); } - - LZClose( lzfd ); - return retv? reslen : 0; + return reslen; } @@ -432,7 +440,6 @@ DWORD WINAPI GetFileResource16( LPCSTR lpszFileName, LPCSTR lpszResType, LPCSTR lpszResId, DWORD dwFileOffset, DWORD dwResLen, LPVOID lpvData ) { - BOOL retv = FALSE; HFILE lzfd; OFSTRUCT ofs; DWORD reslen = dwResLen; @@ -446,20 +453,7 @@ DWORD WINAPI GetFileResource16( LPCSTR lpszFileName, LPCSTR lpszResType, if ( !dwFileOffset ) { - switch ( read_xx_header( lzfd ) ) - { - case IMAGE_OS2_SIGNATURE: - retv = find_ne_resource( lzfd, lpszResType, lpszResId, - &reslen, &dwFileOffset ); - break; - - case IMAGE_NT_SIGNATURE: - retv = find_pe_resource( lzfd, lpszResType, lpszResId, - &reslen, &dwFileOffset ); - break; - } - - if ( !retv ) + if (!find_resource( lzfd, lpszResType, lpszResId, &reslen, &dwFileOffset )) { LZClose( lzfd ); return 0;
[View Less]
1
0
0
0
Frédéric Delanoy : jscript: Update French translation.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 633293ad5f6f330b43be874c6cf26cd24ed58422 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=633293ad5f6f330b43be874c6…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Wed Sep 30 19:18:40 2009 +0200 jscript: Update French translation. --- dlls/jscript/jscript_Fr.rc | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/jscript/jscript_Fr.rc b/dlls/jscript/jscript_Fr.rc index c523b6d..8c23e41 100644 --- a/
…
[View More]
dlls/jscript/jscript_Fr.rc +++ b/dlls/jscript/jscript_Fr.rc @@ -29,6 +29,7 @@ STRINGTABLE DISCARDABLE { IDS_TO_PRIMITIVE "Erreur lors de la conversion de l'objet vers un type primitif" IDS_INVALID_CALL_ARG "Appel de procédure ou argument invalide" + IDS_CREATE_OBJ_ERROR "Le serveur d'automatisation ne peut créer l'objet" IDS_NO_PROPERTY "Cet objet ne supporte pas cette propriété ou méthode" IDS_ARG_NOT_OPT "Argument non optionnel" IDS_SYNTAX_ERROR "Erreur de syntaxe"
[View Less]
1
0
0
0
Chris Robinson : openal32: Watch for the generic device names, and map them to the default.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 1bb5219a5832d6d7dcddf046180f313769d9b3c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1bb5219a5832d6d7dcddf0461…
Author: Chris Robinson <chris.kcat(a)gmail.com> Date: Wed Sep 30 08:37:54 2009 -0700 openal32: Watch for the generic device names, and map them to the default. --- dlls/openal32/openal.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/openal32/openal.c b/dlls/openal32/openal.c index
…
[View More]
792a870..88bfc9c 100644 --- a/dlls/openal32/openal.c +++ b/dlls/openal32/openal.c @@ -289,6 +289,12 @@ ALCdevice* CDECL wine_alcGetContextsDevice(ALCcontext *context) ALCdevice* CDECL wine_alcOpenDevice(const ALCchar *devicename) { + if(devicename != NULL && (strcmp(devicename, "DirectSound3D") == 0 || + strcmp(devicename, "DirectSound") == 0 || + strcmp(devicename, "Generic Hardware") == 0 || + strcmp(devicename, "Generic Software") == 0)) { + devicename = NULL; + } return alcOpenDevice(devicename); }
[View Less]
1
0
0
0
Owen Rudge : comctl32: Implement highlighting (marquee) selection support in listview.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: 69b76a18fb19bd4a6c83f4f05eb942513af970fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=69b76a18fb19bd4a6c83f4f05…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Wed Sep 30 16:41:23 2009 +0100 comctl32: Implement highlighting (marquee) selection support in listview. --- dlls/comctl32/listview.c | 135 ++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 120 insertions(+), 15 deletions(-) diff --git a/dlls/comctl32/
…
[View More]
listview.c b/dlls/comctl32/listview.c index 1c0f58b..eb2dbfb 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -7,6 +7,7 @@ * Copyright 2001 CodeWeavers Inc. * Copyright 2002 Dimitrie O. Paun * Copyright 2009 Nikolay Sivov + * Copyright 2009 Owen Rudge for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -98,7 +99,6 @@ * -- LVN_BEGINSCROLL, LVN_ENDSCROLL * -- LVN_GETINFOTIP * -- LVN_HOTTRACK - * -- LVN_MARQUEEBEGIN * -- LVN_SETDISPINFO * -- NM_HOVER * -- LVN_BEGINRDRAG @@ -248,6 +248,8 @@ typedef struct tagLISTVIEW_INFO BOOL bLButtonDown; BOOL bRButtonDown; BOOL bDragging; + BOOL bMarqueeSelect; /* marquee selection/highlight underway */ + RECT marqueeRect; POINT ptClickPos; /* point where the user clicked */ BOOL bNoItemMetrics; /* flags if item metrics are not yet computed */ INT nItemHeight; @@ -3605,17 +3607,94 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN WORD wDragWidth = GetSystemMetrics(SM_CXDRAG); WORD wDragHeight= GetSystemMetrics(SM_CYDRAG); - rect.left = infoPtr->ptClickPos.x - wDragWidth; - rect.right = infoPtr->ptClickPos.x + wDragWidth; - rect.top = infoPtr->ptClickPos.y - wDragHeight; - rect.bottom = infoPtr->ptClickPos.y + wDragHeight; - tmp.x = x; tmp.y = y; lvHitTestInfo.pt = tmp; LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE); + if (infoPtr->bMarqueeSelect) + { + LVITEMW item; + ITERATOR i; + + if (x > infoPtr->ptClickPos.x) + { + rect.left = infoPtr->ptClickPos.x; + rect.right = x; + } + else + { + rect.left = x; + rect.right = infoPtr->ptClickPos.x; + } + + if (y > infoPtr->ptClickPos.y) + { + rect.top = infoPtr->ptClickPos.y; + rect.bottom = y; + } + else + { + rect.top = y; + rect.bottom = infoPtr->ptClickPos.y; + } + + /* Cancel out the old marquee rectangle and draw the new one */ + LISTVIEW_InvalidateRect(infoPtr, &infoPtr->marqueeRect); + + /* Invert the items in the old marquee rectangle */ + iterator_frameditems(&i, infoPtr, &infoPtr->marqueeRect); + + while (iterator_next(&i)) + { + if (i.nItem > -1) + { + if (LISTVIEW_GetItemState(infoPtr, i.nItem, LVIS_SELECTED) == LVIS_SELECTED) + item.state = 0; + else + item.state = LVIS_SELECTED; + + item.stateMask = LVIS_SELECTED; + + LISTVIEW_SetItemState(infoPtr, i.nItem, &item); + } + } + + iterator_destroy(&i); + + CopyRect(&infoPtr->marqueeRect, &rect); + + /* Iterate over the items within our marquee rectangle */ + iterator_frameditems(&i, infoPtr, &rect); + + while (iterator_next(&i)) + { + if (i.nItem > -1) + { + /* If CTRL is pressed, invert. If not, always select the item. */ + if ((fwKeys & MK_CONTROL) && (LISTVIEW_GetItemState(infoPtr, i.nItem, LVIS_SELECTED))) + item.state = 0; + else + item.state = LVIS_SELECTED; + + item.stateMask = LVIS_SELECTED; + + LISTVIEW_SetItemState(infoPtr, i.nItem, &item); + } + } + + iterator_destroy(&i); + + LISTVIEW_InvalidateRect(infoPtr, &rect); + return 0; + } + + rect.left = infoPtr->ptClickPos.x - wDragWidth; + rect.right = infoPtr->ptClickPos.x + wDragWidth; + rect.top = infoPtr->ptClickPos.y - wDragHeight; + rect.bottom = infoPtr->ptClickPos.y + wDragHeight; + /* reset item marker */ if (infoPtr->nLButtonDownItem != lvHitTestInfo.iItem) infoPtr->nLButtonDownItem = -1; @@ -3640,17 +3719,31 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN if (!infoPtr->bDragging) { - NMLISTVIEW nmlv; - lvHitTestInfo.pt = infoPtr->ptClickPos; LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE); - ZeroMemory(&nmlv, sizeof(nmlv)); - nmlv.iItem = lvHitTestInfo.iItem; - nmlv.ptAction = infoPtr->ptClickPos; + /* If the click is outside the range of an item, begin a + highlight. If not, begin an item drag. */ + if (lvHitTestInfo.iItem == -1) + { + NMHDR hdr; + + /* If we're allowing multiple selections, send notification. + If return value is non-zero, cancel. */ + if (!(infoPtr->dwStyle & LVS_SINGLESEL) && (notify_hdr(infoPtr, LVN_MARQUEEBEGIN, &hdr) == 0)) + infoPtr->bMarqueeSelect = TRUE; + } + else + { + NMLISTVIEW nmlv; - notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv); - infoPtr->bDragging = TRUE; + ZeroMemory(&nmlv, sizeof(nmlv)); + nmlv.iItem = lvHitTestInfo.iItem; + nmlv.ptAction = infoPtr->ptClickPos; + + notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv); + infoPtr->bDragging = TRUE; + } } return 0; @@ -4643,6 +4736,10 @@ enddraw: if ((infoPtr->uView == LV_VIEW_DETAILS) && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) LISTVIEW_RefreshReportGrid(infoPtr, hdc); + /* Draw marquee rectangle if appropriate */ + if (infoPtr->bMarqueeSelect) + DrawFocusRect(hdc, &infoPtr->marqueeRect); + if (cdmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd); @@ -9312,6 +9409,7 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN infoPtr->bLButtonDown = TRUE; infoPtr->ptClickPos = pt; infoPtr->bDragging = FALSE; + infoPtr->bMarqueeSelect = FALSE; lvHitTestInfo.pt.x = x; lvHitTestInfo.pt.y = y; @@ -9433,9 +9531,16 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT LISTVIEW_SetSelection(infoPtr, infoPtr->nLButtonDownItem); infoPtr->nLButtonDownItem = -1; - if (infoPtr->bDragging) + if (infoPtr->bDragging || infoPtr->bMarqueeSelect) { + /* Remove the marquee rectangle */ + if (infoPtr->bMarqueeSelect) + LISTVIEW_InvalidateRect(infoPtr, &infoPtr->marqueeRect); + + SetRect(&infoPtr->marqueeRect, 0, 0, 0, 0); + infoPtr->bDragging = FALSE; + infoPtr->bMarqueeSelect = FALSE; return 0; }
[View Less]
1
0
0
0
Owen Rudge : mapi32: Pass DllGetClassObject through to Extended MAPI provider.
by Alexandre Julliard
01 Oct '09
01 Oct '09
Module: wine Branch: master Commit: cc4a6693f1a0364ed9af72a52adb040a55c5a802 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cc4a6693f1a0364ed9af72a52…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Wed Sep 30 16:09:25 2009 +0100 mapi32: Pass DllGetClassObject through to Extended MAPI provider. --- dlls/mapi32/mapi32_main.c | 11 ++++++++++- dlls/mapi32/util.c | 2 ++ dlls/mapi32/util.h | 2 ++ 3 files changed, 14 insertions(+), 1 deletions(-)
…
[View More]
diff --git a/dlls/mapi32/mapi32_main.c b/dlls/mapi32/mapi32_main.c index 5039c29..28c2f14 100644 --- a/dlls/mapi32/mapi32_main.c +++ b/dlls/mapi32/mapi32_main.c @@ -61,8 +61,17 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) */ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) { - *ppv = NULL; + if (mapiFunctions.DllGetClassObject) + { + HRESULT ret = mapiFunctions.DllGetClassObject(rclsid, iid, ppv); + + TRACE("ret: %x\n", ret); + return ret; + } + FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n", debugstr_guid(rclsid), debugstr_guid(iid)); + + *ppv = NULL; return CLASS_E_CLASSNOTAVAILABLE; } diff --git a/dlls/mapi32/util.c b/dlls/mapi32/util.c index 4957941..fdb8497 100644 --- a/dlls/mapi32/util.c +++ b/dlls/mapi32/util.c @@ -1056,6 +1056,8 @@ void load_mapi_providers(void) mapiFunctions.MAPIInitialize = (void*) GetProcAddress(mapi_ex_provider, "MAPIInitialize"); mapiFunctions.MAPILogonEx = (void*) GetProcAddress(mapi_ex_provider, "MAPILogonEx"); mapiFunctions.MAPIUninitialize = (void*) GetProcAddress(mapi_ex_provider, "MAPIUninitialize"); + + mapiFunctions.DllGetClassObject = (void*) GetProcAddress(mapi_ex_provider, "DllGetClassObject"); } cleanUp: diff --git a/dlls/mapi32/util.h b/dlls/mapi32/util.h index 69b1603..9899053 100644 --- a/dlls/mapi32/util.h +++ b/dlls/mapi32/util.h @@ -43,6 +43,8 @@ typedef struct MAPI_FUNCTIONS { LPMAPISENDMAIL MAPISendMail; LPMAPISENDDOCUMENTS MAPISendDocuments; LPMAPIUNINITIALIZE MAPIUninitialize; + + HRESULT (WINAPI *DllGetClassObject)(REFCLSID, REFIID, LPVOID *); } MAPI_FUNCTIONS; extern MAPI_FUNCTIONS mapiFunctions;
[View Less]
1
0
0
0
← Newer
1
...
115
116
117
118
119
120
121
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
Results per page:
10
25
50
100
200