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
June 2012
----- 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
827 discussions
Start a n
N
ew thread
Detlef Riekenberg : devenum: Do not fail with a IBindCtx (with tests).
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: a8f4364388a841b4debd5fc25e340f21dadd3623 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8f4364388a841b4debd5fc25…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sat Jun 16 19:36:24 2012 +0200 devenum: Do not fail with a IBindCtx (with tests). --- dlls/devenum/mediacatenum.c | 12 +++++++++++- dlls/devenum/tests/devenum.c | 36 ++++++++++++++++++++++-------------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c index f167feb..24d236d 100644 --- a/dlls/devenum/mediacatenum.c +++ b/dlls/devenum/mediacatenum.c @@ -465,9 +465,19 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToStorage(IMoniker *iface, IB *ppvObj = NULL; - if (pbc || pmkToLeft) + if (pmkToLeft) return MK_E_NOSTORAGE; + if (pbc != NULL) + { + static DWORD reported; + if (!reported) + { + FIXME("ignoring IBindCtx %p\n", pbc); + reported++; + } + } + if (IsEqualGUID(riid, &IID_IPropertyBag)) { HANDLE hkey; diff --git a/dlls/devenum/tests/devenum.c b/dlls/devenum/tests/devenum.c index d8cd92f..c7f765b 100644 --- a/dlls/devenum/tests/devenum.c +++ b/dlls/devenum/tests/devenum.c @@ -47,28 +47,24 @@ static struct category am_categories[] = { "Video compressor category", &CLSID_VideoCompressorCategory } }; -static void test_devenum(void) +static void test_devenum(IBindCtx *bind_ctx) { HRESULT res; ICreateDevEnum* create_devenum; IEnumMoniker* enum_moniker = NULL; int i; - CoInitialize(NULL); - res = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC, &IID_ICreateDevEnum, (LPVOID*)&create_devenum); if (res != S_OK) { skip("Cannot create SystemDeviceEnum object (%x)\n", res); - CoUninitialize(); return; } - trace("\n"); - for (i = 0; i < (sizeof(am_categories) / sizeof(struct category)); i++) { - trace("%s:\n", am_categories[i].name); + if (winetest_debug > 1) + trace("%s:\n", am_categories[i].name); res = ICreateDevEnum_CreateClassEnumerator(create_devenum, am_categories[i].clsid, &enum_moniker, 0); ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res); @@ -82,7 +78,7 @@ static void test_devenum(void) HRESULT hr; VariantInit(&var); - hr = IMoniker_BindToStorage(moniker, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&prop_bag); + hr = IMoniker_BindToStorage(moniker, bind_ctx, NULL, &IID_IPropertyBag, (LPVOID*)&prop_bag); ok(hr == S_OK, "IMoniker_BindToStorage failed with error %x\n", hr); if (SUCCEEDED(hr)) @@ -92,7 +88,8 @@ static void test_devenum(void) if (SUCCEEDED(hr)) { - trace(" %s\n", wine_dbgstr_w(V_UNION(&var, bstrVal))); + if (winetest_debug > 1) + trace(" %s\n", wine_dbgstr_w(V_UNION(&var, bstrVal))); VariantClear(&var); } else @@ -107,18 +104,29 @@ static void test_devenum(void) } IEnumMoniker_Release(enum_moniker); } - - trace("\n"); } ICreateDevEnum_Release(create_devenum); - - CoUninitialize(); } /* CLSID_CDeviceMoniker */ START_TEST(devenum) { - test_devenum(); + IBindCtx *bind_ctx = NULL; + HRESULT hr; + + CoInitialize(NULL); + + test_devenum(NULL); + + /* IBindCtx is allowed in IMoniker_BindToStorage (IMediaCatMoniker_BindToStorage) */ + hr = CreateBindCtx(0, &bind_ctx); + ok(hr == S_OK, "Cannot create BindCtx: (res = 0x%x)\n", hr); + if (bind_ctx) { + test_devenum(bind_ctx); + IBindCtx_Release(bind_ctx); + } + + CoUninitialize(); }
1
0
0
0
Bruno Jesus : comdlg32: Fix NULL lpstrFile uses in FILEDLG95_OnOpen.
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: 8c5cf7e25f8c547306f37ae151d2b4cda712cf47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c5cf7e25f8c547306f37ae15…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Fri Jun 15 00:51:34 2012 -0300 comdlg32: Fix NULL lpstrFile uses in FILEDLG95_OnOpen. --- dlls/comdlg32/filedlg.c | 19 +++++--- dlls/comdlg32/tests/filedlg.c | 105 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 7 deletions(-) diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 0fd9644..3e7ee4f 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -2684,16 +2684,20 @@ BOOL FILEDLG95_OnOpen(HWND hwnd) } else { - LPSTR lpszTemp; - LPOPENFILENAMEA ofn = (LPOPENFILENAMEA)fodInfos->ofnInfos; + LPSTR lpszTemp; + CHAR tempFileA[MAX_PATH]; + + /* avoid using fodInfos->ofnInfos->lpstrFile since it can be NULL */ + WideCharToMultiByte(CP_ACP, 0, lpstrPathAndFile, -1, + tempFileA, sizeof(tempFileA), NULL, NULL); /* set filename offset */ - lpszTemp = PathFindFileNameA(ofn->lpstrFile); - fodInfos->ofnInfos->nFileOffset = (lpszTemp - ofn->lpstrFile); + lpszTemp = PathFindFileNameA(tempFileA); + fodInfos->ofnInfos->nFileOffset = (lpszTemp - tempFileA); /* set extension offset */ - lpszTemp = PathFindExtensionA(ofn->lpstrFile); - fodInfos->ofnInfos->nFileExtension = (*lpszTemp) ? (lpszTemp - ofn->lpstrFile) + 1 : 0; + lpszTemp = PathFindExtensionA(tempFileA); + fodInfos->ofnInfos->nFileExtension = (*lpszTemp) ? (lpszTemp - tempFileA) + 1 : 0; } /* set the lpstrFileTitle */ @@ -2746,7 +2750,8 @@ BOOL FILEDLG95_OnOpen(HWND hwnd) if (fodInfos->ofnInfos->Flags & OFN_ALLOWMULTISELECT) size += 1; /* return needed size in first two bytes of lpstrFile */ - *(WORD *)fodInfos->ofnInfos->lpstrFile = size; + if(fodInfos->ofnInfos->lpstrFile) + *(WORD *)fodInfos->ofnInfos->lpstrFile = size; FILEDLG95_Clean(hwnd); ret = EndDialog(hwnd, FALSE); COMDLG32_SetCommDlgExtendedError(FNERR_BUFFERTOOSMALL); diff --git a/dlls/comdlg32/tests/filedlg.c b/dlls/comdlg32/tests/filedlg.c index b1c1e76..c9bf52a 100644 --- a/dlls/comdlg32/tests/filedlg.c +++ b/dlls/comdlg32/tests/filedlg.c @@ -1134,6 +1134,110 @@ static void test_extension(void) #undef ARRAY_SIZE + +static BOOL WINAPI test_null_enum(HWND hwnd, LPARAM lParam) +{ + /* Find the textbox and send a filename so IDOK will work. + If the file textbox is empty IDOK will be ignored */ + CHAR className[20]; + if(GetClassNameA(hwnd, className, sizeof(className)) > 0 && !strcmp("Edit",className)) + { + SetWindowText(hwnd, "testfile"); + return FALSE; /* break window enumeration */ + } + return TRUE; +} + +static UINT_PTR WINAPI test_null_wndproc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + HWND parent = GetParent( dlg); + if( msg == WM_NOTIFY) { + SetTimer( dlg, 0, 100, 0); + SetTimer( dlg, 1, 1000, 0); + EnumChildWindows( parent, test_null_enum, 0); + } + if( msg == WM_TIMER) { + if(!wParam) + PostMessage( parent, WM_COMMAND, IDOK, 0); + else { + /* the dialog did not close automatically */ + KillTimer( dlg, 0); + PostMessage( parent, WM_COMMAND, IDCANCEL, 0); + } + } + return FALSE; +} + +static void test_null_filename(void) +{ + OPENFILENAMEA ofnA = {0}; + OPENFILENAMEW ofnW = {0}; + WCHAR filterW[] = {'t','e','x','t','\0','*','.','t','x','t','\0', + 'A','l','l','\0','*','\0','\0'}; + DWORD ret; + + ofnA.lStructSize = sizeof(ofnA); + ofnA.lpstrFile = NULL; + ofnA.nMaxFile = 0; + ofnA.nFileOffset = 0xdead; + ofnA.nFileExtension = 0xbeef; + ofnA.lpfnHook = test_null_wndproc; + ofnA.Flags = OFN_ENABLEHOOK | OFN_EXPLORER; + ofnA.hInstance = GetModuleHandleA(NULL); + ofnA.lpstrFilter = "text\0*.txt\0All\0*\0\0"; + ofnA.lpstrDefExt = NULL; + ret = GetOpenFileNameA(&ofnA); + todo_wine ok(ret, "GetOpenFileNameA returned %#x\n", ret); + ret = CommDlgExtendedError(); + todo_wine ok(!ret, "CommDlgExtendedError returned %#x, should be 0\n", ret); + + todo_wine ok(ofnA.nFileOffset != 0xdead, "ofnA.nFileOffset is 0xdead\n"); + todo_wine ok(ofnA.nFileExtension != 0xbeef, "ofnA.nFileExtension is 0xbeef\n"); + + ofnA.lpstrFile = NULL; + ofnA.nMaxFile = 1024; /* bogus input - lpstrFile = NULL but fake 1024 bytes available */ + ofnA.nFileOffset = 0xdead; + ofnA.nFileExtension = 0xbeef; + ret = GetOpenFileNameA(&ofnA); + ok(ret, "GetOpenFileNameA returned %#x\n", ret); + ret = CommDlgExtendedError(); + ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + + ok(ofnA.nFileOffset != 0xdead, "ofnA.nFileOffset is 0xdead\n"); + ok(ofnA.nFileExtension == 0, "ofnA.nFileExtension is 0x%x, should be 0\n", ofnA.nFileExtension); + + /* unicode tests */ + ofnW.lStructSize = sizeof(ofnW); + ofnW.lpstrFile = NULL; + ofnW.nMaxFile = 0; + ofnW.nFileOffset = 0xdead; + ofnW.nFileExtension = 0xbeef; + ofnW.lpfnHook = test_null_wndproc; + ofnW.Flags = OFN_ENABLEHOOK | OFN_EXPLORER; + ofnW.hInstance = GetModuleHandleW(NULL); + ofnW.lpstrFilter = filterW; + ofnW.lpstrDefExt = NULL; + ret = GetOpenFileNameW(&ofnW); + todo_wine ok(ret, "GetOpenFileNameW returned %#x\n", ret); + ret = CommDlgExtendedError(); + todo_wine ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + + todo_wine ok(ofnW.nFileOffset != 0xdead, "ofnW.nFileOffset is 0xdead\n"); + todo_wine ok(ofnW.nFileExtension != 0xbeef, "ofnW.nFileExtension is 0xbeef\n"); + + ofnW.lpstrFile = NULL; + ofnW.nMaxFile = 1024; /* bogus input - lpstrFile = NULL but fake 1024 bytes available */ + ofnW.nFileOffset = 0xdead; + ofnW.nFileExtension = 0xbeef; + ret = GetOpenFileNameW(&ofnW); + ok(ret, "GetOpenFileNameA returned %#x\n", ret); + ret = CommDlgExtendedError(); + ok(!ret, "CommDlgExtendedError returned %#x\n", ret); + + ok(ofnW.nFileOffset != 0xdead, "ofnW.nFileOffset is 0xdead\n"); + ok(ofnW.nFileExtension == 0, "ofnW.nFileExtension is 0x%x, should be 0\n", ofnW.nFileExtension); +} + START_TEST(filedlg) { test_DialogCancel(); @@ -1146,4 +1250,5 @@ START_TEST(filedlg) test_mru(); if( resizesupported) test_resizable2(); test_extension(); + test_null_filename(); }
1
0
0
0
Lucas Zawacki : joy.cpl: Hardcode axis name strings that were in joy.rc.
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: 6cc99681257f0825efa3fc5697fdd957ab9d950e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6cc99681257f0825efa3fc569…
Author: Lucas Zawacki <lfzawacki(a)gmail.com> Date: Tue Jun 19 11:42:08 2012 -0300 joy.cpl: Hardcode axis name strings that were in joy.rc. --- dlls/joy.cpl/joy.h | 3 +++ dlls/joy.cpl/joy.rc | 6 +++--- dlls/joy.cpl/main.c | 7 ++++++- po/ar.po | 12 ------------ po/bg.po | 12 ------------ po/ca.po | 12 ------------ po/cs.po | 12 ------------ po/da.po | 12 ------------ po/de.po | 12 ------------ po/el.po | 12 ------------ po/en.po | 12 ------------ po/en_US.po | 12 ------------ po/eo.po | 12 ------------ po/es.po | 12 ------------ po/fa.po | 12 ------------ po/fi.po | 12 ------------ po/fr.po | 12 ------------ po/he.po | 12 ------------ po/hi.po | 12 ------------ po/hu.po | 12 ------------ po/it.po | 12 ------------ po/ja.po | 12 ------------ po/ko.po | 12 ------------ po/lt.po | 12 ------------ po/ml.po | 12 ------------ po/nb_NO.po | 12 ------------ po/nl.po | 12 ------------ po/or.po | 12 ------------ po/pa.po | 12 ------------ po/pl.po | 12 ------------ po/pt_BR.po | 12 ------------ po/pt_PT.po | 12 ------------ po/rm.po | 12 ------------ po/ro.po | 12 ------------ po/ru.po | 12 ------------ po/sk.po | 12 ------------ po/sl.po | 12 ------------ po/sr_RS(a)cyrillic.po | 12 ------------ po/sr_RS(a)latin.po | 12 ------------ po/sv.po | 12 ------------ po/te.po | 12 ------------ po/th.po | 12 ------------ po/tr.po | 12 ------------ po/uk.po | 12 ------------ po/wa.po | 12 ------------ po/wine.pot | 12 ------------ po/zh_CN.po | 12 ------------ po/zh_TW.po | 12 ------------ 48 files changed, 12 insertions(+), 544 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6cc99681257f0825efa3f…
1
0
0
0
Dmitry Timoshkov : gdiplus: Create a copy of the source stream when loading an image.
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: 9e12bc0175f6a65ee45ebce1ca519eac6f5ca501 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e12bc0175f6a65ee45ebce1c…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Jun 19 16:51:54 2012 +0900 gdiplus: Create a copy of the source stream when loading an image. --- dlls/gdiplus/gdiplus_private.h | 3 ++- dlls/gdiplus/image.c | 34 +++++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 322fb02..9ac9be2 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -260,7 +260,8 @@ struct GpAdustableArrowCap{ }; struct GpImage{ - IPicture* picture; + IPicture *picture; + IStream *stream; /* a copy of the source stream */ ImageType type; GUID format; UINT flags; diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 8ad1d24..7da052f 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -1779,6 +1779,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, (*bitmap)->height = height; (*bitmap)->format = format; (*bitmap)->image.picture = NULL; + (*bitmap)->image.stream = NULL; (*bitmap)->hbitmap = hbitmap; (*bitmap)->hdc = NULL; (*bitmap)->bits = bits; @@ -2029,6 +2030,8 @@ GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image) } if (image->picture) IPicture_Release(image->picture); + if (image->stream) + IStream_Release(image->stream); GdipFree(image->palette_entries); image->type = ~0; GdipFree(image); @@ -2704,6 +2707,7 @@ end: bitmap->image.flags |= ImageFlagsReadOnly|ImageFlagsHasRealPixelSize|ImageFlagsHasRealDPI|ImageFlagsColorSpaceRGB; bitmap->image.frame_count = frame_count; bitmap->image.current_frame = active_frame; + bitmap->image.stream = stream; } return status; @@ -2771,6 +2775,7 @@ static GpStatus decode_image_olepicture_metafile(IStream* stream, REFCLSID clsid *image = GdipAlloc(sizeof(GpMetafile)); if(!*image) return OutOfMemory; (*image)->type = ImageTypeMetafile; + (*image)->stream = stream; (*image)->picture = pic; (*image)->flags = ImageFlagsNone; (*image)->frame_count = 1; @@ -2857,21 +2862,42 @@ static GpStatus get_decoder_info(IStream* stream, const struct image_codec **res return GenericError; } -GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* stream, GpImage **image) +GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream *source, GpImage **image) { GpStatus stat; LARGE_INTEGER seek; HRESULT hr; const struct image_codec *codec=NULL; + IStream *stream; + + hr = IStream_Clone(source, &stream); + if (FAILED(hr)) + { + STATSTG statstg; + + hr = IStream_Stat(source, &statstg, STATFLAG_NOOPEN); + if (FAILED(hr)) return hresult_to_status(hr); + + stat = GdipCreateStreamOnFile(statstg.pwcsName, GENERIC_READ, &stream); + if(stat != Ok) return stat; + } /* choose an appropriate image decoder */ stat = get_decoder_info(stream, &codec); - if (stat != Ok) return stat; + if (stat != Ok) + { + IStream_Release(stream); + return stat; + } /* seek to the start of the stream */ seek.QuadPart = 0; hr = IStream_Seek(stream, seek, STREAM_SEEK_SET, NULL); - if (FAILED(hr)) return hresult_to_status(hr); + if (FAILED(hr)) + { + IStream_Release(stream); + return hresult_to_status(hr); + } /* call on the image decoder to do the real work */ stat = codec->decode_func(stream, &codec->info.Clsid, 0, image); @@ -2880,8 +2906,10 @@ GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* stream, GpImage **image) if (stat == Ok) { memcpy(&(*image)->format, &codec->info.FormatID, sizeof(GUID)); + return Ok; } + IStream_Release(stream); return stat; }
1
0
0
0
Dmitry Timoshkov : gdiplus: Add active frame parameter to the WIC decoder interface.
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: 8b1bbd4fe51f921c4b9c58e6c33b04476a626bd0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b1bbd4fe51f921c4b9c58e6c…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Jun 19 16:51:45 2012 +0900 gdiplus: Add active frame parameter to the WIC decoder interface. --- dlls/gdiplus/image.c | 37 ++++++++++++++++++------------------- 1 files changed, 18 insertions(+), 19 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 4fba788..8ad1d24 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -2583,7 +2583,7 @@ static const PixelFormat wic_gdip_formats[] = { PixelFormat32bppPARGB, }; -static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, GpImage **image) +static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, UINT active_frame, GpImage **image) { GpStatus status=Ok; GpBitmap *bitmap; @@ -2609,8 +2609,7 @@ static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, GpImage **imag if (SUCCEEDED(hr)) { IWICBitmapDecoder_GetFrameCount(decoder, &frame_count); - /* FIXME: set current frame */ - hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame); + hr = IWICBitmapDecoder_GetFrame(decoder, active_frame, &frame); } if (SUCCEEDED(hr)) /* got frame */ @@ -2704,23 +2703,23 @@ end: /* Native GDI+ used to be smarter, but since Win7 it just sets these flags. */ bitmap->image.flags |= ImageFlagsReadOnly|ImageFlagsHasRealPixelSize|ImageFlagsHasRealDPI|ImageFlagsColorSpaceRGB; bitmap->image.frame_count = frame_count; - bitmap->image.current_frame = 0; + bitmap->image.current_frame = active_frame; } return status; } -static GpStatus decode_image_icon(IStream* stream, REFCLSID clsid, GpImage **image) +static GpStatus decode_image_icon(IStream* stream, REFCLSID clsid, UINT active_frame, GpImage **image) { - return decode_image_wic(stream, &CLSID_WICIcoDecoder, image); + return decode_image_wic(stream, &CLSID_WICIcoDecoder, active_frame, image); } -static GpStatus decode_image_bmp(IStream* stream, REFCLSID clsid, GpImage **image) +static GpStatus decode_image_bmp(IStream* stream, REFCLSID clsid, UINT active_frame, GpImage **image) { GpStatus status; GpBitmap* bitmap; - status = decode_image_wic(stream, &CLSID_WICBmpDecoder, image); + status = decode_image_wic(stream, &CLSID_WICBmpDecoder, active_frame, image); bitmap = (GpBitmap*)*image; @@ -2733,27 +2732,27 @@ static GpStatus decode_image_bmp(IStream* stream, REFCLSID clsid, GpImage **imag return status; } -static GpStatus decode_image_jpeg(IStream* stream, REFCLSID clsid, GpImage **image) +static GpStatus decode_image_jpeg(IStream* stream, REFCLSID clsid, UINT active_frame, GpImage **image) { - return decode_image_wic(stream, &CLSID_WICJpegDecoder, image); + return decode_image_wic(stream, &CLSID_WICJpegDecoder, active_frame, image); } -static GpStatus decode_image_png(IStream* stream, REFCLSID clsid, GpImage **image) +static GpStatus decode_image_png(IStream* stream, REFCLSID clsid, UINT active_frame, GpImage **image) { - return decode_image_wic(stream, &CLSID_WICPngDecoder, image); + return decode_image_wic(stream, &CLSID_WICPngDecoder, active_frame, image); } -static GpStatus decode_image_gif(IStream* stream, REFCLSID clsid, GpImage **image) +static GpStatus decode_image_gif(IStream* stream, REFCLSID clsid, UINT active_frame, GpImage **image) { - return decode_image_wic(stream, &CLSID_WICGifDecoder, image); + return decode_image_wic(stream, &CLSID_WICGifDecoder, active_frame, image); } -static GpStatus decode_image_tiff(IStream* stream, REFCLSID clsid, GpImage **image) +static GpStatus decode_image_tiff(IStream* stream, REFCLSID clsid, UINT active_frame, GpImage **image) { - return decode_image_wic(stream, &CLSID_WICTiffDecoder, image); + return decode_image_wic(stream, &CLSID_WICTiffDecoder, active_frame, image); } -static GpStatus decode_image_olepicture_metafile(IStream* stream, REFCLSID clsid, GpImage **image) +static GpStatus decode_image_olepicture_metafile(IStream* stream, REFCLSID clsid, UINT active_frame, GpImage **image) { IPicture *pic; @@ -2789,7 +2788,7 @@ static GpStatus decode_image_olepicture_metafile(IStream* stream, REFCLSID clsid typedef GpStatus (*encode_image_func)(GpImage *image, IStream* stream, GDIPCONST CLSID* clsid, GDIPCONST EncoderParameters* params); -typedef GpStatus (*decode_image_func)(IStream *stream, REFCLSID clsid, GpImage** image); +typedef GpStatus (*decode_image_func)(IStream *stream, REFCLSID clsid, UINT active_frame, GpImage **image); typedef struct image_codec { ImageCodecInfo info; @@ -2875,7 +2874,7 @@ GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* stream, GpImage **image) if (FAILED(hr)) return hresult_to_status(hr); /* call on the image decoder to do the real work */ - stat = codec->decode_func(stream, &codec->info.Clsid, image); + stat = codec->decode_func(stream, &codec->info.Clsid, 0, image); /* take note of the original data format */ if (stat == Ok)
1
0
0
0
Dmitry Timoshkov : gdiplus: Fix parameter order in expect() calls.
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: 9de1d861320a3a5796cf31c4fea6c914b40c6e0e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9de1d861320a3a5796cf31c4f…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Jun 19 16:51:34 2012 +0900 gdiplus: Fix parameter order in expect() calls. --- dlls/gdiplus/tests/image.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index e22d45a..635b633 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -432,14 +432,14 @@ static void test_SavingImages(void) if (stat != Ok) goto cleanup; stat = GdipSaveImageToFile((GpImage*)bm, filename, &codecs[0].Clsid, 0); - expect(stat, Ok); + expect(Ok, stat); GdipDisposeImage((GpImage*)bm); bm = 0; /* re-load and check image stats */ stat = GdipLoadImageFromFile(filename, (GpImage**)&bm); - expect(stat, Ok); + expect(Ok, stat); if (stat != Ok) goto cleanup; stat = GdipGetImageDimension((GpImage*)bm, &w, &h);
1
0
0
0
Dmitry Timoshkov : gdiplus: Remove a redundant cast.
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: 527cae47e35e9381f4d6641ed17cbb32311c6603 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=527cae47e35e9381f4d6641ed…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Jun 19 16:51:24 2012 +0900 gdiplus: Remove a redundant cast. --- dlls/gdiplus/image.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index dd4dcea..4fba788 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -2605,7 +2605,7 @@ static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, GpImage **imag &IID_IWICBitmapDecoder, (void**)&decoder); if (FAILED(hr)) goto end; - hr = IWICBitmapDecoder_Initialize(decoder, (IStream*)stream, WICDecodeMetadataCacheOnLoad); + hr = IWICBitmapDecoder_Initialize(decoder, stream, WICDecodeMetadataCacheOnLoad); if (SUCCEEDED(hr)) { IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
1
0
0
0
Dmitry Timoshkov : gdiplus: GdipCreateFontFromLogfont also returns NotTrueTypeFont for a not present font .
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: 3439f286791f9c3947f6a765853e2391e29167e1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3439f286791f9c3947f6a7658…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Jun 19 12:05:30 2012 +0900 gdiplus: GdipCreateFontFromLogfont also returns NotTrueTypeFont for a not present font. --- dlls/gdiplus/tests/graphics.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 0d31365..3cb33c7 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -1970,7 +1970,7 @@ static void test_GdipDrawString(void) expect(Ok, status); status = GdipCreateFontFromLogfontA(hdc, &logfont, &fnt); - if (status == FileNotFound) + if (status == NotTrueTypeFont || status == FileNotFound) { skip("Arial not installed.\n"); return;
1
0
0
0
Dmitry Timoshkov : gdiplus: Add a test for creating a nonexistent font with GdipCreateFontFromLogfont.
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: eeb52474c1a04a9f8f75ab7602d4113bae6d0fe3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eeb52474c1a04a9f8f75ab760…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Jun 19 12:05:17 2012 +0900 gdiplus: Add a test for creating a nonexistent font with GdipCreateFontFromLogfont. --- dlls/gdiplus/tests/font.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index 982db39..03f5769 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -105,6 +105,11 @@ static void test_logfont(void) memset(&lfa, 0, sizeof(LOGFONTA)); memset(&lfa2, 0xff, sizeof(LOGFONTA)); + lstrcpyA(lfa.lfFaceName, "Nonexistent font"); + stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); + ok(stat == NotTrueTypeFont || broken(stat == FileNotFound), /* before XP */ + "expected NotTrueTypeFont, got %d\n", stat); + /* empty FaceName */ lfa.lfFaceName[0] = 0; stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font);
1
0
0
0
Hans Leidekker : wbemprox: Add a partial Win32_OperatingSystem class implementation.
by Alexandre Julliard
19 Jun '12
19 Jun '12
Module: wine Branch: master Commit: bc66ef043f5436d1dcb6bb76e7be35e803fabb88 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc66ef043f5436d1dcb6bb76e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jun 19 10:21:47 2012 +0200 wbemprox: Add a partial Win32_OperatingSystem class implementation. --- dlls/wbemprox/builtin.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 8a6a74f..a1ef65e 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -17,6 +17,8 @@ */ #define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT #include "config.h" #include <stdarg.h> @@ -35,6 +37,8 @@ static const WCHAR class_biosW[] = {'W','i','n','3','2','_','B','I','O','S',0}; static const WCHAR class_compsysW[] = {'W','i','n','3','2','_','C','o','m','p','u','t','e','r','S','y','s','t','e','m',0}; +static const WCHAR class_osW[] = + {'W','i','n','3','2','_','O','p','e','r','a','t','i','n','g','S','y','s','t','e','m',0}; static const WCHAR class_processW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s',0}; static const WCHAR class_processorW[] = @@ -48,6 +52,8 @@ static const WCHAR prop_manufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e','r',0}; static const WCHAR prop_modelW[] = {'M','o','d','e','l',0}; +static const WCHAR prop_osarchitectureW[] = + {'O','S','A','r','c','h','i','t','e','c','t','u','r','e',0}; static const WCHAR prop_pprocessidW[] = {'P','a','r','e','n','t','P','r','o','c','e','s','s','I','D',0}; static const WCHAR prop_processidW[] = @@ -72,6 +78,11 @@ static const struct column col_compsys[] = { prop_manufacturerW, CIM_STRING }, { prop_modelW, CIM_STRING } }; +static const struct column col_os[] = +{ + { prop_captionW, CIM_STRING }, + { prop_osarchitectureW, CIM_STRING } +}; static const struct column col_process[] = { { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC }, @@ -99,6 +110,12 @@ static const WCHAR compsys_manufacturerW[] = {'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0}; static const WCHAR compsys_modelW[] = {'W','i','n','e',0}; +static const WCHAR os_captionW[] = + {'W','i','n','e',0}; +static const WCHAR os_32bitW[] = + {'3','2','-','b','i','t',0}; +static const WCHAR os_64bitW[] = + {'6','4','-','b','i','t',0}; static const WCHAR processor_manufacturerW[] = {'G','e','n','u','i','n','e','I','n','t','e','l',0}; @@ -116,6 +133,11 @@ struct record_computersystem const WCHAR *manufacturer; const WCHAR *model; }; +struct record_operatingsystem +{ + const WCHAR *caption; + const WCHAR *osarchitecture; +}; struct record_process { const WCHAR *caption; @@ -183,10 +205,31 @@ done: CloseHandle( snap ); } +static void fill_os( struct table *table ) +{ + struct record_operatingsystem *rec; + SYSTEM_INFO info; + + if (!(table->data = heap_alloc( sizeof(*rec) ))) return; + + rec = (struct record_operatingsystem *)table->data; + rec->caption = os_captionW; + + GetNativeSystemInfo( &info ); + if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) + rec->osarchitecture = os_64bitW; + else + rec->osarchitecture = os_32bitW; + + TRACE("created 1 row\n"); + table->num_rows = 1; +} + static struct table classtable[] = { { class_biosW, SIZEOF(col_bios), col_bios, SIZEOF(data_bios), (BYTE *)data_bios, NULL }, { class_compsysW, SIZEOF(col_compsys), col_compsys, SIZEOF(data_compsys), (BYTE *)data_compsys, NULL }, + { class_osW, SIZEOF(col_os), col_os, 0, NULL, fill_os }, { class_processW, SIZEOF(col_process), col_process, 0, NULL, fill_process }, { class_processorW, SIZEOF(col_processor), col_processor, SIZEOF(data_processor), (BYTE *)data_processor, NULL } };
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
83
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
Results per page:
10
25
50
100
200