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
Jacek Caban : urlmon: Added more test of FindMimeFromData.
by Alexandre Julliard
07 Jul '06
07 Jul '06
Module: wine Branch: refs/heads/master Commit: 1fd9f3edfaed7a85c5472a61a063dedf1d0eac77 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1fd9f3edfaed7a85c5472a6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 6 20:03:51 2006 +0200 urlmon: Added more test of FindMimeFromData. --- dlls/urlmon/tests/misc.c | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/tests/misc.c b/dlls/urlmon/tests/misc.c index 853a8dc..1a7f078 100644 --- a/dlls/urlmon/tests/misc.c +++ b/dlls/urlmon/tests/misc.c @@ -330,6 +330,7 @@ static const WCHAR mimeTextHtml[] = {'t' static const WCHAR mimeTextPlain[] = {'t','e','x','t','/','p','l','a','i','n',0}; static const WCHAR mimeAppOctetStream[] = {'a','p','p','l','i','c','a','t','i','o','n','/', 'o','c','t','e','t','-','s','t','r','e','a','m',0}; +static const WCHAR mimeImagePjpeg[] = {'i','m','a','g','e','/','p','j','p','e','g',0}; static const struct { LPCWSTR url; @@ -358,6 +359,10 @@ static BYTE data11[] = "blah<HTML>blahbl static BYTE data12[] = "blah<HTMLblahblah"; static BYTE data13[] = "blahHTML>blahblah"; static BYTE data14[] = "blah<HTMblahblah"; +static BYTE data15[] = {0xff,0xd8}; +static BYTE data16[] = {0xff,0xd8,'h'}; +static BYTE data17[] = {0,0xff,0xd8}; +static BYTE data18[] = {0xff,0xd8,'<','h','t','m','l','>'}; static const struct { BYTE *data; @@ -377,7 +382,11 @@ static const struct { {data11, sizeof(data11), mimeTextHtml}, {data12, sizeof(data12), mimeTextHtml}, {data13, sizeof(data13), mimeTextPlain}, - {data14, sizeof(data14), mimeTextPlain} + {data14, sizeof(data14), mimeTextPlain}, + {data15, sizeof(data15), mimeTextPlain}, + {data16, sizeof(data16), mimeImagePjpeg}, + {data17, sizeof(data17), mimeAppOctetStream}, + {data18, sizeof(data18), mimeTextHtml} }; static void test_FindMimeFromData(void) @@ -421,7 +430,20 @@ static void test_FindMimeFromData(void) hres = FindMimeFromData(NULL, NULL, mime_tests2[i].data, mime_tests2[i].size, mimeTextHtml, 0, &mime, 0); ok(hres == S_OK, "[%d] FindMimeFromData failed: %08lx\n", i, hres); - ok(!lstrcmpW(mime, mimeTextHtml), "[%d] wrong mime\n", i); + if(!lstrcmpW(mimeAppOctetStream, mime_tests2[i].mime) + || !lstrcmpW(mimeTextPlain, mime_tests2[i].mime)) + ok(!lstrcmpW(mime, mimeTextHtml), "[%d] wrong mime\n", i); + else + ok(!lstrcmpW(mime, mime_tests2[i].mime), "[%d] wrong mime\n", i); + + hres = FindMimeFromData(NULL, NULL, mime_tests2[i].data, mime_tests2[i].size, + mimeImagePjpeg, 0, &mime, 0); + ok(hres == S_OK, "[%d] FindMimeFromData failed: %08lx\n", i, hres); + if(!lstrcmpW(mimeAppOctetStream, mime_tests2[i].mime) || i == 17) + ok(!lstrcmpW(mime, mimeImagePjpeg), "[%d] wrong mime\n", i); + else + ok(!lstrcmpW(mime, mime_tests2[i].mime), "[%d] wrong mime\n", i); + CoTaskMemFree(mime); }
1
0
0
0
Jacek Caban : urlmon: Fix handling of proposed mime.
by Alexandre Julliard
07 Jul '06
07 Jul '06
Module: wine Branch: refs/heads/master Commit: ae9e41c639591f2ef7242f6f66a79ae3d40876c8 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=ae9e41c639591f2ef7242f6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 6 20:02:49 2006 +0200 urlmon: Fix handling of proposed mime. --- dlls/urlmon/urlmon_main.c | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c index 99ba81c..2adafe9 100644 --- a/dlls/urlmon/urlmon_main.c +++ b/dlls/urlmon/urlmon_main.c @@ -455,7 +455,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC if(!ppwzMimeOut || (!pwzUrl && !pBuffer)) return E_INVALIDARG; - if(pwzMimeProposed && (!pwzUrl || !pBuffer || (pBuffer && !cbSize))) { + if(pwzMimeProposed && (!pBuffer || (pBuffer && !cbSize))) { DWORD len; if(!pwzMimeProposed) @@ -470,7 +470,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC if(pBuffer) { DWORD len; LPCWSTR ret = NULL; - int i = 0; + int i; static const WCHAR wszTextHtml[] = {'t','e','x','t','/','h','t','m','l',0}; static const WCHAR wszImagePjpeg[] = {'i','m','a','g','e','/','p','j','p','e','g',0}; @@ -491,12 +491,37 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC if(!cbSize) return E_FAIL; + if(pwzMimeProposed && strcmpW(pwzMimeProposed, wszAppOctetStream)) { + for(i=0; i < sizeof(mime_filters)/sizeof(*mime_filters); i++) { + if(!strcmpW(pwzMimeProposed, mime_filters[i].mime)) + break; + } + + if(i == sizeof(mime_filters)/sizeof(*mime_filters) + || mime_filters[i].filter(pBuffer, cbSize)) { + len = strlenW(pwzMimeProposed)+1; + *ppwzMimeOut = CoTaskMemAlloc(len*sizeof(WCHAR)); + memcpy(*ppwzMimeOut, pwzMimeProposed, len*sizeof(WCHAR)); + return S_OK; + } + } + + i=0; while(!ret) { if(mime_filters[i].filter(pBuffer, cbSize)) ret = mime_filters[i].mime; i++; } + if(pwzMimeProposed) { + if(i == sizeof(mime_filters)/sizeof(*mime_filters)) + ret = pwzMimeProposed; + + /* text/html is a special case */ + if(!strcmpW(pwzMimeProposed, wszTextHtml) && !strcmpW(ret, wszTextPlain)) + ret = wszTextHtml; + } + len = strlenW(ret)+1; *ppwzMimeOut = CoTaskMemAlloc(len*sizeof(WCHAR)); memcpy(*ppwzMimeOut, ret, len*sizeof(WCHAR));
1
0
0
0
Jacek Caban : urlmon: Added image/pjpeg mime filter.
by Alexandre Julliard
07 Jul '06
07 Jul '06
Module: wine Branch: refs/heads/master Commit: b5fa092756722d0ecdbbec7efdb99a58f7b277e4 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=b5fa092756722d0ecdbbec7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 6 20:02:24 2006 +0200 urlmon: Added image/pjpeg mime filter. --- dlls/urlmon/urlmon_main.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c index b121a3c..99ba81c 100644 --- a/dlls/urlmon/urlmon_main.c +++ b/dlls/urlmon/urlmon_main.c @@ -416,6 +416,11 @@ static BOOL text_html_filter(LPVOID buf, return FALSE; } +static BOOL image_pjpeg_filter(LPVOID buf, DWORD size) +{ + return size > 2 && *(BYTE*)buf == 0xff && *((BYTE*)buf+1) == 0xd8; +} + static BOOL text_plain_filter(LPVOID buf, DWORD size) { UCHAR *ptr; @@ -468,6 +473,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC int i = 0; static const WCHAR wszTextHtml[] = {'t','e','x','t','/','h','t','m','l',0}; + static const WCHAR wszImagePjpeg[] = {'i','m','a','g','e','/','p','j','p','e','g',0}; static const WCHAR wszTextPlain[] = {'t','e','x','t','/','p','l','a','i','n','\0'}; static const WCHAR wszAppOctetStream[] = {'a','p','p','l','i','c','a','t','i','o','n','/', 'o','c','t','e','t','-','s','t','r','e','a','m','\0'}; @@ -477,6 +483,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC BOOL (*filter)(LPVOID,DWORD); } mime_filters[] = { {wszTextHtml, text_html_filter}, + {wszImagePjpeg, image_pjpeg_filter}, {wszTextPlain, text_plain_filter}, {wszAppOctetStream, application_octet_stream_filter} };
1
0
0
0
Andrew Talbot : regedit: Write-strings warning fix.
by Alexandre Julliard
07 Jul '06
07 Jul '06
Module: wine Branch: refs/heads/master Commit: 973371c01d2c06a34b095daea45e7e9bcb9da71e URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=973371c01d2c06a34b095da…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Thu Jul 6 18:55:19 2006 +0100 regedit: Write-strings warning fix. --- programs/regedit/listview.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c index 6f9937b..64c54f0 100644 --- a/programs/regedit/listview.c +++ b/programs/regedit/listview.c @@ -165,7 +165,8 @@ #endif if (ValBuf) { ListView_SetItemText(hwndLV, index, 2, ValBuf); } else { - ListView_SetItemText(hwndLV, index, 2, "(not set)"); + TCHAR textT[] = {'(','n','o','t',' ','s','e','t',')',0}; + ListView_SetItemText(hwndLV, index, 2, textT); } break; case REG_DWORD: {
1
0
0
0
Robert Shearman : widl: Add support for the builtin constants "TRUE" and " FALSE".
by Alexandre Julliard
07 Jul '06
07 Jul '06
Module: wine Branch: refs/heads/master Commit: f6278456240f6095a501daedab9ec24c6af1ee18 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=f6278456240f6095a501dae…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Jul 6 12:56:36 2006 +0100 widl: Add support for the builtin constants "TRUE" and "FALSE". --- tools/widl/header.c | 6 ++++++ tools/widl/parser.l | 4 +++- tools/widl/parser.y | 8 +++++++- tools/widl/typegen.c | 7 +++++++ tools/widl/widltypes.h | 1 + 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/tools/widl/header.c b/tools/widl/header.c index 82637e5..546481a 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -410,6 +410,12 @@ void write_expr(FILE *h, const expr_t *e case EXPR_HEXNUM: fprintf(h, "0x%lx", e->u.lval); break; + case EXPR_TRUEFALSE: + if (e->u.lval == 0) + fprintf(h, "FALSE"); + else + fprintf(h, "TRUE"); + break; case EXPR_IDENTIFIER: fprintf(h, "%s", e->u.sval); break; diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 01984f3..cefdca9 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -172,6 +172,8 @@ static struct keyword { int token; int val; } keywords[] = { + {"FALSE", tFALSE}, + {"TRUE", tTRUE}, {"__cdecl", tCDECL}, {"__int64", tINT64}, {"__stdcall", tSTDCALL}, @@ -307,7 +309,7 @@ static struct keyword { {"version", tVERSION}, {"void", tVOID}, {"wchar_t", tWCHAR}, - {"wire_marshal", tWIREMARSHAL} + {"wire_marshal", tWIREMARSHAL}, }; #define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0])) #define KWP(p) ((const struct keyword *)(p)) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 284d802..284f0fd 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -141,6 +141,7 @@ static type_t std_uhyper = { "MIDL_uhype %token tENDPOINT %token tENTRY tENUM tERRORSTATUST %token tEXPLICITHANDLE tEXTERN +%token tFALSE %token tFLOAT %token tHANDLE %token tHANDLET @@ -188,6 +189,7 @@ static type_t std_uhyper = { "MIDL_uhype %token tSTRING tSTRUCT %token tSWITCH tSWITCHIS tSWITCHTYPE %token tTRANSMITAS +%token tTRUE %token tTYPEDEF %token tUNION %token tUNIQUE @@ -496,6 +498,8 @@ m_expr: { $$ = make_expr(EXPR_VOID) expr: aNUM { $$ = make_exprl(EXPR_NUM, $1); } | aHEXNUM { $$ = make_exprl(EXPR_HEXNUM, $1); } + | tFALSE { $$ = make_exprl(EXPR_TRUEFALSE, 0); } + | tTRUE { $$ = make_exprl(EXPR_TRUEFALSE, 1); } | aIDENTIFIER { $$ = make_exprs(EXPR_IDENTIFIER, $1); } | expr '?' expr ':' expr { $$ = make_expr3(EXPR_COND, $1, $3, $5); } | expr '|' expr { $$ = make_expr2(EXPR_OR , $1, $3); } @@ -859,7 +863,9 @@ static expr_t *make_exprl(enum expr_type e->is_const = FALSE; INIT_LINK(e); /* check for numeric constant */ - if (type == EXPR_NUM || type == EXPR_HEXNUM) { + if (type == EXPR_NUM || type == EXPR_HEXNUM || type == EXPR_TRUEFALSE) { + /* make sure true/false value is valid */ + assert(type != EXPR_TRUEFALSE || val == 0 || val == 1); e->is_const = TRUE; e->cval = val; } diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 20db78c..190fae2 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -73,6 +73,7 @@ static int compare_expr(const expr_t *a, { case EXPR_NUM: case EXPR_HEXNUM: + case EXPR_TRUEFALSE: return a->u.lval - b->u.lval; case EXPR_IDENTIFIER: return strcmp(a->u.sval, b->u.sval); @@ -1957,6 +1958,12 @@ static void write_struct_expr(FILE *h, c case EXPR_HEXNUM: fprintf(h, "0x%lx", e->u.lval); break; + case EXPR_TRUEFALSE: + if (e->u.lval == 0) + fprintf(h, "FALSE"); + else + fprintf(h, "TRUE"); + break; case EXPR_IDENTIFIER: { const var_t *field; diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index c86e8c0..508284e 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -156,6 +156,7 @@ enum expr_type EXPR_AND, EXPR_OR, EXPR_COND, + EXPR_TRUEFALSE, }; enum type_kind
1
0
0
0
Robert Shearman : ole32: Fix the return value of COM_RegReadPath and make it static.
by Alexandre Julliard
07 Jul '06
07 Jul '06
Module: wine Branch: refs/heads/master Commit: 5f453db5cf397aa88158c86a9b38a552ce86f109 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=5f453db5cf397aa88158c86…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Jul 6 12:55:13 2006 +0100 ole32: Fix the return value of COM_RegReadPath and make it static. --- dlls/ole32/compobj.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index f66926c..a25d9ec 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -1540,25 +1540,25 @@ end: * * Reads a registry value and expands it when necessary */ -HRESULT COM_RegReadPath(HKEY hkeyroot, const WCHAR *keyname, const WCHAR *valuename, WCHAR * dst, DWORD dstlen) +static DWORD COM_RegReadPath(HKEY hkeyroot, const WCHAR *keyname, const WCHAR *valuename, WCHAR * dst, DWORD dstlen) { - HRESULT hres; + DWORD ret; HKEY key; DWORD keytype; WCHAR src[MAX_PATH]; DWORD dwLength = dstlen * sizeof(WCHAR); - if((hres = RegOpenKeyExW(hkeyroot, keyname, 0, KEY_READ, &key)) == ERROR_SUCCESS) { - if( (hres = RegQueryValueExW(key, NULL, NULL, &keytype, (LPBYTE)src, &dwLength)) == ERROR_SUCCESS ) { + if((ret = RegOpenKeyExW(hkeyroot, keyname, 0, KEY_READ, &key)) == ERROR_SUCCESS) { + if( (ret = RegQueryValueExW(key, NULL, NULL, &keytype, (LPBYTE)src, &dwLength)) == ERROR_SUCCESS ) { if (keytype == REG_EXPAND_SZ) { - if (dstlen <= ExpandEnvironmentStringsW(src, dst, dstlen)) hres = ERROR_MORE_DATA; + if (dstlen <= ExpandEnvironmentStringsW(src, dst, dstlen)) ret = ERROR_MORE_DATA; } else { lstrcpynW(dst, src, dstlen); } } RegCloseKey (key); } - return hres; + return ret; } static HRESULT get_inproc_class_object(HKEY hkeydll, REFCLSID rclsid, REFIID riid, void **ppv)
1
0
0
0
Robert Shearman : oleaut32: ITypeComp_fnBind should do case-insensitive compares on the name passed in .
by Alexandre Julliard
07 Jul '06
07 Jul '06
Module: wine Branch: refs/heads/master Commit: ef7b6e2740dd4a958bd66ec0c1e197a362ee0c63 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=ef7b6e2740dd4a958bd66ec…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Jul 6 12:55:05 2006 +0100 oleaut32: ITypeComp_fnBind should do case-insensitive compares on the name passed in. --- dlls/oleaut32/tests/typelib.c | 13 +++++++++++++ dlls/oleaut32/typelib.c | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 8aa7b0f..343b5d1 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -83,6 +83,7 @@ static void test_TypeComp(void) static WCHAR wszStdPicture[] = {'S','t','d','P','i','c','t','u','r','e',0}; static WCHAR wszOLE_COLOR[] = {'O','L','E','_','C','O','L','O','R',0}; static WCHAR wszClone[] = {'C','l','o','n','e',0}; + static WCHAR wszclone[] = {'c','l','o','n','e',0}; hr = LoadTypeLib(wszStdOle2, &pTypeLib); ok_ole_success(hr, LoadTypeLib); @@ -245,6 +246,18 @@ static void test_TypeComp(void) ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n"); + /* tests that the compare is case-insensitive */ + ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszclone); + hr = ITypeComp_Bind(pTypeComp, wszclone, ulHash, 0, &pTypeInfo, &desckind, &bindptr); + ok_ole_success(hr, ITypeComp_Bind); + + ok(desckind == DESCKIND_FUNCDESC, + "desckind should have been DESCKIND_FUNCDESC instead of %d\n", + desckind); + ok(bindptr.lpfuncdesc != NULL, "bindptr.lpfuncdesc should not have been set to NULL\n"); + ITypeInfo_ReleaseFuncDesc(pTypeInfo, bindptr.lpfuncdesc); + ITypeInfo_Release(pTypeInfo); + ITypeComp_Release(pTypeComp); ITypeInfo_Release(pFontTypeInfo); ITypeLib_Release(pTypeLib); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index dedea02..080e25b 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -6544,7 +6544,7 @@ static HRESULT WINAPI ITypeComp_fnBind( *ppTInfo = NULL; for(pFDesc = This->funclist; pFDesc; pFDesc = pFDesc->next) - if (!strcmpW(pFDesc->Name, szName)) { + if (!strcmpiW(pFDesc->Name, szName)) { if (!wFlags || (pFDesc->funcdesc.invkind & wFlags)) break; else @@ -6566,7 +6566,7 @@ static HRESULT WINAPI ITypeComp_fnBind( return S_OK; } else { for(pVDesc = This->varlist; pVDesc; pVDesc = pVDesc->next) { - if (!strcmpW(pVDesc->Name, szName)) { + if (!strcmpiW(pVDesc->Name, szName)) { HRESULT hr = TLB_AllocAndInitVarDesc(&pVDesc->vardesc, &pBindPtr->lpvardesc); if (FAILED(hr)) return hr;
1
0
0
0
Robert Shearman : oleaut32: Add a typedef for "boolean".
by Alexandre Julliard
07 Jul '06
07 Jul '06
Module: wine Branch: refs/heads/master Commit: c71af7332401745eeb3f2367ceca1ff964e21781 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=c71af7332401745eeb3f236…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Jul 6 12:54:58 2006 +0100 oleaut32: Add a typedef for "boolean". Fix up an conflict that this type has with jpeglib.h. --- dlls/oleaut32/olepicture.c | 2 ++ include/rpcndr.h | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index 89b7edb..9130027 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -83,7 +83,9 @@ #define XMD_H #define UINT8 JPEG_UINT8 #define UINT16 JPEG_UINT16 #undef FAR +#define boolean jpeg_boolean # include <jpeglib.h> +#undef jpeg_boolean #undef UINT16 #ifndef SONAME_LIBJPEG #define SONAME_LIBJPEG "libjpeg.so" diff --git a/include/rpcndr.h b/include/rpcndr.h index 42e5b1c..780fa29 100644 --- a/include/rpcndr.h +++ b/include/rpcndr.h @@ -92,9 +92,7 @@ #define small char typedef unsigned char byte; #define hyper __int64 #define MIDL_uhyper unsigned __int64 -/* 'boolean' tend to conflict, let's call it _wine_boolean */ -typedef unsigned char _wine_boolean; -/* typedef _wine_boolean boolean; */ +typedef unsigned char boolean; #define __RPC_CALLEE WINAPI #define RPC_VAR_ENTRY __cdecl @@ -121,7 +119,7 @@ #define cbNDRContext 20 typedef void (__RPC_USER *NDR_RUNDOWN)(void *context); typedef void (__RPC_USER *NDR_NOTIFY_ROUTINE)(void); -typedef void (__RPC_USER *NDR_NOTIFY2_ROUTINE)(_wine_boolean flag); +typedef void (__RPC_USER *NDR_NOTIFY2_ROUTINE)(boolean flag); #define DECLSPEC_UUID(x) #define MIDL_INTERFACE(x) struct
1
0
0
0
Robert Shearman : oleaut32: Fix the error code returned by ITypeComp on an interface when the name matches , but the flags don't.
by Alexandre Julliard
07 Jul '06
07 Jul '06
Module: wine Branch: refs/heads/master Commit: dd677948b4728fc2be461a665b688828235b3bc0 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=dd677948b4728fc2be461a6…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Jul 6 12:54:48 2006 +0100 oleaut32: Fix the error code returned by ITypeComp on an interface when the name matches, but the flags don't. --- dlls/oleaut32/tests/typelib.c | 34 ++++++++++++++++++++++++++++++++++ dlls/oleaut32/typelib.c | 14 +++++++++----- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index b8e615b..8aa7b0f 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -28,6 +28,7 @@ #include <stdarg.h> #include "windef.h" #include "winbase.h" #include "oleauto.h" +#include "ocidl.h" #define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08lx\n", hr) @@ -71,6 +72,7 @@ static void test_TypeComp(void) DESCKIND desckind; BINDPTR bindptr; ITypeInfo *pTypeInfo; + ITypeInfo *pFontTypeInfo; static WCHAR wszStdFunctions[] = {'S','t','d','F','u','n','c','t','i','o','n','s',0}; static WCHAR wszSavePicture[] = {'S','a','v','e','P','i','c','t','u','r','e',0}; static WCHAR wszOLE_TRISTATE[] = {'O','L','E','_','T','R','I','S','T','A','T','E',0}; @@ -80,6 +82,7 @@ static void test_TypeComp(void) static WCHAR wszGUID[] = {'G','U','I','D',0}; static WCHAR wszStdPicture[] = {'S','t','d','P','i','c','t','u','r','e',0}; static WCHAR wszOLE_COLOR[] = {'O','L','E','_','C','O','L','O','R',0}; + static WCHAR wszClone[] = {'C','l','o','n','e',0}; hr = LoadTypeLib(wszStdOle2, &pTypeLib); ok_ole_success(hr, LoadTypeLib); @@ -213,6 +216,37 @@ static void test_TypeComp(void) ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n"); ITypeComp_Release(pTypeComp); + + /* tests for ITypeComp on an interface */ + hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IFont, &pFontTypeInfo); + ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid); + + hr = ITypeInfo_GetTypeComp(pFontTypeInfo, &pTypeComp); + ok_ole_success(hr, ITypeLib_GetTypeComp); + + ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszClone); + hr = ITypeComp_Bind(pTypeComp, wszClone, ulHash, 0, &pTypeInfo, &desckind, &bindptr); + ok_ole_success(hr, ITypeComp_Bind); + + ok(desckind == DESCKIND_FUNCDESC, + "desckind should have been DESCKIND_FUNCDESC instead of %d\n", + desckind); + ok(bindptr.lpfuncdesc != NULL, "bindptr.lpfuncdesc should not have been set to NULL\n"); + ITypeInfo_ReleaseFuncDesc(pTypeInfo, bindptr.lpfuncdesc); + ITypeInfo_Release(pTypeInfo); + + ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszClone); + hr = ITypeComp_Bind(pTypeComp, wszClone, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr); + ok(hr == TYPE_E_TYPEMISMATCH, "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08lx\n", hr); + + ok(desckind == DESCKIND_NONE, + "desckind should have been DESCKIND_NONE instead of %d\n", + desckind); + ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); + ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n"); + + ITypeComp_Release(pTypeComp); + ITypeInfo_Release(pFontTypeInfo); ITypeLib_Release(pTypeLib); } diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 8483aa9..dedea02 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -6535,6 +6535,7 @@ static HRESULT WINAPI ITypeComp_fnBind( ITypeInfoImpl *This = info_impl_from_ITypeComp(iface); const TLBFuncDesc *pFDesc; const TLBVarDesc *pVDesc; + HRESULT hr = DISP_E_MEMBERNOTFOUND; TRACE("(%s, %lx, 0x%x, %p, %p, %p)\n", debugstr_w(szName), lHash, wFlags, ppTInfo, pDescKind, pBindPtr); @@ -6543,10 +6544,13 @@ static HRESULT WINAPI ITypeComp_fnBind( *ppTInfo = NULL; for(pFDesc = This->funclist; pFDesc; pFDesc = pFDesc->next) - if (!wFlags || (pFDesc->funcdesc.invkind & wFlags)) - if (!strcmpW(pFDesc->Name, szName)) { + if (!strcmpW(pFDesc->Name, szName)) { + if (!wFlags || (pFDesc->funcdesc.invkind & wFlags)) break; - } + else + /* name found, but wrong flags */ + hr = TYPE_E_TYPEMISMATCH; + } if (pFDesc) { @@ -6574,7 +6578,7 @@ static HRESULT WINAPI ITypeComp_fnBind( } } /* FIXME: search each inherited interface, not just the first */ - if (This->TypeAttr.cImplTypes) { + if (hr == DISP_E_MEMBERNOTFOUND && This->TypeAttr.cImplTypes) { /* recursive search */ ITypeInfo *pTInfo; ITypeComp *pTComp; @@ -6594,7 +6598,7 @@ static HRESULT WINAPI ITypeComp_fnBind( WARN("Could not search inherited interface!\n"); } WARN("did not find member with name %s, flags 0x%x!\n", debugstr_w(szName), wFlags); - return DISP_E_MEMBERNOTFOUND; + return hr; } static HRESULT WINAPI ITypeComp_fnBindType(
1
0
0
0
James Hawkins : advapi32: Get the token type in ImpersonateLoggedOnUser.
by Alexandre Julliard
07 Jul '06
07 Jul '06
Module: wine Branch: refs/heads/master Commit: 409c6dc7b00a8ea6e1321d7f00b032bfe37711d7 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=409c6dc7b00a8ea6e1321d7…
Author: James Hawkins <truiken(a)gmail.com> Date: Wed Jul 5 19:55:02 2006 -0700 advapi32: Get the token type in ImpersonateLoggedOnUser. --- dlls/advapi32/security.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 0a78668..977bd61 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -1675,13 +1675,16 @@ ImpersonateSelf(SECURITY_IMPERSONATION_L */ BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken) { + DWORD size; NTSTATUS Status; HANDLE ImpersonationToken; - TOKEN_TYPE Type = TokenImpersonation; + TOKEN_TYPE Type; FIXME( "(%p)\n", hToken ); - /* FIXME: get token type */ + if (!GetTokenInformation( hToken, TokenType, &Type, + sizeof(TOKEN_TYPE), &size )) + return FALSE; if (Type == TokenPrimary) {
1
0
0
0
← Newer
1
...
72
73
74
75
76
77
78
...
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