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
May 2007
----- 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
715 discussions
Start a n
N
ew thread
Misha Koshelev : msi: automation: Return DISP_E_MEMBERNOTFOUND if flags are incorrect.
by Alexandre Julliard
14 May '07
14 May '07
Module: wine Branch: master Commit: aa9f4beb65553e3a4d815fc669a59efe2eb02fb7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa9f4beb65553e3a4d815fc66…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Fri May 11 14:08:08 2007 -0500 msi: automation: Return DISP_E_MEMBERNOTFOUND if flags are incorrect. --- dlls/msi/automation.c | 36 ++++++++++++++++++++++++++++++------ dlls/msi/tests/automation.c | 8 ++++---- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c index d871fa2..ec0706a 100644 --- a/dlls/msi/automation.c +++ b/dlls/msi/automation.c @@ -597,6 +597,7 @@ static HRESULT WINAPI RecordImpl_Invoke( return DISP_E_EXCEPTION; } } + else return DISP_E_MEMBERNOTFOUND; break; default: @@ -637,6 +638,7 @@ static HRESULT WINAPI StringListImpl_Invoke( V_VT(pVarResult) = VT_BSTR; V_BSTR(pVarResult) = SysAllocString(data->pszStrings[V_I4(&varg0)]); } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_STRINGLIST_COUNT: @@ -644,6 +646,7 @@ static HRESULT WINAPI StringListImpl_Invoke( V_VT(pVarResult) = VT_I4; V_I4(pVarResult) = data->iCount; } + else return DISP_E_MEMBERNOTFOUND; break; default: @@ -696,6 +699,7 @@ static HRESULT WINAPI ViewImpl_Invoke( else MsiViewExecute(This->msiHandle, 0); } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_VIEW_FETCH: @@ -720,6 +724,7 @@ static HRESULT WINAPI ViewImpl_Invoke( return DISP_E_EXCEPTION; } } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_VIEW_CLOSE: @@ -727,6 +732,7 @@ static HRESULT WINAPI ViewImpl_Invoke( { MsiViewClose(This->msiHandle); } + else return DISP_E_MEMBERNOTFOUND; break; default: @@ -784,6 +790,7 @@ static HRESULT WINAPI DatabaseImpl_Invoke( return DISP_E_EXCEPTION; } } + else return DISP_E_MEMBERNOTFOUND; break; default: @@ -829,6 +836,7 @@ static HRESULT WINAPI SessionImpl_Invoke( IDispatch_AddRef(data->pInstaller); V_DISPATCH(pVarResult) = data->pInstaller; } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_SESSION_PROPERTY: @@ -866,6 +874,7 @@ static HRESULT WINAPI SessionImpl_Invoke( return DISP_E_EXCEPTION; } } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_SESSION_LANGUAGE: @@ -874,6 +883,7 @@ static HRESULT WINAPI SessionImpl_Invoke( V_VT(pVarResult) = VT_I4; V_I4(pVarResult) = langId; } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_SESSION_MODE: @@ -893,6 +903,7 @@ static HRESULT WINAPI SessionImpl_Invoke( return DISP_E_EXCEPTION; } } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_SESSION_DATABASE: @@ -914,6 +925,7 @@ static HRESULT WINAPI SessionImpl_Invoke( return DISP_E_EXCEPTION; } } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_SESSION_DOACTION: @@ -954,6 +966,7 @@ static HRESULT WINAPI SessionImpl_Invoke( return DISP_E_EXCEPTION; } } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_SESSION_EVALUATECONDITION: @@ -963,16 +976,20 @@ static HRESULT WINAPI SessionImpl_Invoke( V_VT(pVarResult) = VT_I4; V_I4(pVarResult) = MsiEvaluateConditionW(This->msiHandle, V_BSTR(&varg0)); } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_SESSION_SETINSTALLLEVEL: - hr = DispGetParam(pDispParams, 0, VT_I4, &varg0, puArgErr); - if (FAILED(hr)) return hr; - if ((ret = MsiSetInstallLevel(This->msiHandle, V_I4(&varg0))) != ERROR_SUCCESS) - { - ERR("MsiSetInstallLevel returned %d\n", ret); - return DISP_E_EXCEPTION; + if (wFlags & DISPATCH_METHOD) { + hr = DispGetParam(pDispParams, 0, VT_I4, &varg0, puArgErr); + if (FAILED(hr)) return hr; + if ((ret = MsiSetInstallLevel(This->msiHandle, V_I4(&varg0))) != ERROR_SUCCESS) + { + ERR("MsiSetInstallLevel returned %d\n", ret); + return DISP_E_EXCEPTION; + } } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_SESSION_FEATURECURRENTSTATE: @@ -988,6 +1005,7 @@ static HRESULT WINAPI SessionImpl_Invoke( V_I4(pVarResult) = msiInstallStateUnknown; } } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_SESSION_FEATUREREQUESTSTATE: @@ -1017,6 +1035,7 @@ static HRESULT WINAPI SessionImpl_Invoke( return DISP_E_EXCEPTION; } } + else return DISP_E_MEMBERNOTFOUND; break; default: @@ -1137,6 +1156,7 @@ static HRESULT WINAPI InstallerImpl_Invoke( return DISP_E_EXCEPTION; } } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_INSTALLER_OPENPACKAGE: @@ -1168,6 +1188,7 @@ static HRESULT WINAPI InstallerImpl_Invoke( return DISP_E_EXCEPTION; } } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_INSTALLER_REGISTRYVALUE: @@ -1257,6 +1278,7 @@ static HRESULT WINAPI InstallerImpl_Invoke( msi_free(szString); RegCloseKey(hkey); } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_INSTALLER_PRODUCTSTATE: @@ -1266,6 +1288,7 @@ static HRESULT WINAPI InstallerImpl_Invoke( V_VT(pVarResult) = VT_I4; V_I4(pVarResult) = MsiQueryProductStateW(V_BSTR(&varg0)); } + else return DISP_E_MEMBERNOTFOUND; break; case DISPID_INSTALLER_PRODUCTS: @@ -1306,6 +1329,7 @@ static HRESULT WINAPI InstallerImpl_Invoke( else ERR("Failed to create StringList object, hresult 0x%08x\n", hr); } + else return DISP_E_MEMBERNOTFOUND; break; default: diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index e0240fd..c197c87 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -449,11 +449,11 @@ static void test_dispatch(void) /* Test invoking a method as a DISPATCH_PROPERTYGET or DISPATCH_PROPERTYPUT */ VariantInit(&vararg[0]); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - todo_wine ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); VariantInit(&vararg[0]); hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - todo_wine ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); /* Test invoking a read-only property as DISPATCH_PROPERTYPUT or as a DISPATCH_METHOD */ name = (WCHAR *)szProductState; @@ -463,12 +463,12 @@ static void test_dispatch(void) dispparams.rgvarg = NULL; dispparams.cArgs = 0; hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - todo_wine ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); dispparams.rgvarg = NULL; dispparams.cArgs = 0; hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - todo_wine ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); } /* invocation helper function */
1
0
0
0
Misha Koshelev : msi/tests: automation: Test invoking methods as properties & vice versa.
by Alexandre Julliard
14 May '07
14 May '07
Module: wine Branch: master Commit: 6bb7c911f50f7f9d5acb6f52cb46072704042cb9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6bb7c911f50f7f9d5acb6f52c…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Fri May 11 14:08:04 2007 -0500 msi/tests: automation: Test invoking methods as properties & vice versa. --- dlls/msi/tests/automation.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index 5a34459..e0240fd 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -394,6 +394,7 @@ static void test_dispatch(void) { static WCHAR szOpenPackage[] = { 'O','p','e','n','P','a','c','k','a','g','e',0 }; static WCHAR szOpenPackageException[] = {'O','p','e','n','P','a','c','k','a','g','e',',','P','a','c','k','a','g','e','P','a','t','h',',','O','p','t','i','o','n','s',0}; + static WCHAR szProductState[] = { 'P','r','o','d','u','c','t','S','t','a','t','e',0 }; HRESULT hr; DISPID dispid; OLECHAR *name; @@ -444,6 +445,30 @@ static void test_dispatch(void) ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr); ok_exception(hr, szOpenPackageException); + + /* Test invoking a method as a DISPATCH_PROPERTYGET or DISPATCH_PROPERTYPUT */ + VariantInit(&vararg[0]); + hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); + todo_wine ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + + VariantInit(&vararg[0]); + hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); + todo_wine ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + + /* Test invoking a read-only property as DISPATCH_PROPERTYPUT or as a DISPATCH_METHOD */ + name = (WCHAR *)szProductState; + hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); + ok(SUCCEEDED(hr), "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); + + dispparams.rgvarg = NULL; + dispparams.cArgs = 0; + hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); + todo_wine ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); + + dispparams.rgvarg = NULL; + dispparams.cArgs = 0; + hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); + todo_wine ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); } /* invocation helper function */
1
0
0
0
Misha Koshelev : msi: automation: Implement Installer::CreateRecord.
by Alexandre Julliard
14 May '07
14 May '07
Module: wine Branch: master Commit: 7eb3db632e592a05ff209b6965d13d2e5b8bdc63 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7eb3db632e592a05ff209b696…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Fri May 11 14:07:58 2007 -0500 msi: automation: Implement Installer::CreateRecord. --- dlls/msi/automation.c | 24 ++++++++++++++++++++++++ dlls/msi/msiserver.idl | 2 ++ dlls/msi/msiserver_dispids.h | 1 + dlls/msi/tests/automation.c | 32 ++++++++++++++++---------------- 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c index 56f163a..d871fa2 100644 --- a/dlls/msi/automation.c +++ b/dlls/msi/automation.c @@ -1115,6 +1115,30 @@ static HRESULT WINAPI InstallerImpl_Invoke( switch (dispIdMember) { + case DISPID_INSTALLER_CREATERECORD: + if (wFlags & DISPATCH_METHOD) + { + hr = DispGetParam(pDispParams, 0, VT_I4, &varg0, puArgErr); + if (FAILED(hr)) return hr; + V_VT(pVarResult) = VT_DISPATCH; + if ((msiHandle = MsiCreateRecord(V_I4(&varg0)))) + { + if (SUCCEEDED(hr = create_automation_object(msiHandle, NULL, (LPVOID*)&pDispatch, &DIID_Record, RecordImpl_Invoke, NULL, 0))) + { + IDispatch_AddRef(pDispatch); + V_DISPATCH(pVarResult) = pDispatch; + } + else + ERR("Failed to create Record object, hresult 0x%08x\n", hr); + } + else + { + ERR("MsiCreateRecord failed\n"); + return DISP_E_EXCEPTION; + } + } + break; + case DISPID_INSTALLER_OPENPACKAGE: if (wFlags & DISPATCH_METHOD) { diff --git a/dlls/msi/msiserver.idl b/dlls/msi/msiserver.idl index cd6621f..e02f194 100644 --- a/dlls/msi/msiserver.idl +++ b/dlls/msi/msiserver.idl @@ -59,6 +59,8 @@ library WindowsInstaller { properties: methods: + [id(DISPID_INSTALLER_CREATERECORD)] + Record *CreateRecord([in] long Count); [id(DISPID_INSTALLER_OPENPACKAGE)] Session* OpenPackage( [in] VARIANT PackagePath, diff --git a/dlls/msi/msiserver_dispids.h b/dlls/msi/msiserver_dispids.h index e85f750..b65726e 100644 --- a/dlls/msi/msiserver_dispids.h +++ b/dlls/msi/msiserver_dispids.h @@ -16,6 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define DISPID_INSTALLER_CREATERECORD 1 #define DISPID_INSTALLER_OPENPACKAGE 2 #define DISPID_INSTALLER_REGISTRYVALUE 11 #define DISPID_INSTALLER_PRODUCTSTATE 17 diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index cbe48d0..5a34459 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -312,9 +312,7 @@ static DISPID get_dispid( IDispatch *disp, const char *name ) static void test_dispid(void) { - todo_wine { ok( get_dispid( pInstaller, "CreateRecord" ) == 1, "dispid wrong\n"); - } ok( get_dispid( pInstaller, "OpenPackage" ) == 2, "dispid wrong\n"); todo_wine { ok( get_dispid( pInstaller, "OpenProduct" ) == 3, "dispid wrong\n"); @@ -1350,25 +1348,27 @@ static void test_Installer(void) if (!pInstaller) return; /* Installer::CreateRecord */ - todo_wine { - /* Test for error */ - hr = Installer_CreateRecord(-1, &pRecord); - ok(hr == DISP_E_EXCEPTION, "Installer_CreateRecord failed, hresult 0x%08x\n", hr); - ok_exception(hr, szCreateRecordException); - - /* Test for success */ - hr = Installer_CreateRecord(1, &pRecord); - ok(SUCCEEDED(hr), "Installer_CreateRecord failed, hresult 0x%08x\n", hr); - ok(pRecord != NULL, "Installer_CreateRecord should not have returned NULL record\n"); - } + + /* Test for error */ + hr = Installer_CreateRecord(-1, &pRecord); + ok(hr == DISP_E_EXCEPTION, "Installer_CreateRecord failed, hresult 0x%08x\n", hr); + ok_exception(hr, szCreateRecordException); + + /* Test for success */ + hr = Installer_CreateRecord(1, &pRecord); + ok(SUCCEEDED(hr), "Installer_CreateRecord failed, hresult 0x%08x\n", hr); + ok(pRecord != NULL, "Installer_CreateRecord should not have returned NULL record\n"); if (pRecord) { int iFieldCount = 0; /* Record::FieldCountGet */ - hr = Record_FieldCountGet(pRecord, &iFieldCount); - ok(SUCCEEDED(hr), "Record_FiledCountGet failed, hresult 0x%08x\n", hr); - ok(iFieldCount == 1, "Record_FieldCountGet result was %d but expected 1\n", iFieldCount); + todo_wine + { + hr = Record_FieldCountGet(pRecord, &iFieldCount); + ok(SUCCEEDED(hr), "Record_FiledCountGet failed, hresult 0x%08x\n", hr); + ok(iFieldCount == 1, "Record_FieldCountGet result was %d but expected 1\n", iFieldCount); + } IDispatch_Release(pRecord); }
1
0
0
0
Misha Koshelev : msi/tests: automation: Test for Installer:: CreateRecord error.
by Alexandre Julliard
14 May '07
14 May '07
Module: wine Branch: master Commit: 075e1898bf3f62ab865074170b24aa262d83dadd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=075e1898bf3f62ab865074170…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Fri May 11 14:07:53 2007 -0500 msi/tests: automation: Test for Installer::CreateRecord error. --- dlls/msi/tests/automation.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index 5538d09..cbe48d0 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -1340,6 +1340,7 @@ static void test_Installer(void) { static WCHAR szProductCode[] = { '{','F','1','C','3','A','F','5','0','-','8','B','5','6','-','4','A','6','9','-','A','0','0','C','-','0','0','7','7','3','F','E','4','2','F','3','0','}',0 }; static WCHAR szBackslash[] = { '\\',0 }; + static WCHAR szCreateRecordException[] = { 'C','r','e','a','t','e','R','e','c','o','r','d',',','C','o','u','n','t',0 }; WCHAR szPath[MAX_PATH]; HRESULT hr; UINT len; @@ -1350,6 +1351,12 @@ static void test_Installer(void) /* Installer::CreateRecord */ todo_wine { + /* Test for error */ + hr = Installer_CreateRecord(-1, &pRecord); + ok(hr == DISP_E_EXCEPTION, "Installer_CreateRecord failed, hresult 0x%08x\n", hr); + ok_exception(hr, szCreateRecordException); + + /* Test for success */ hr = Installer_CreateRecord(1, &pRecord); ok(SUCCEEDED(hr), "Installer_CreateRecord failed, hresult 0x%08x\n", hr); ok(pRecord != NULL, "Installer_CreateRecord should not have returned NULL record\n");
1
0
0
0
Misha Koshelev : msi: automation: Implement Session::EvaluateCondition.
by Alexandre Julliard
14 May '07
14 May '07
Module: wine Branch: master Commit: 2d8c2ce6d692c07bfff81027945cae1fca6608f0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d8c2ce6d692c07bfff810279…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Fri May 11 14:07:48 2007 -0500 msi: automation: Implement Session::EvaluateCondition. --- dlls/msi/automation.c | 9 ++++++ dlls/msi/msiserver.idl | 9 ++++++ dlls/msi/msiserver_dispids.h | 1 + dlls/msi/tests/automation.c | 59 +++++++++++++++++------------------------ 4 files changed, 44 insertions(+), 34 deletions(-) diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c index 72b2e6b..56f163a 100644 --- a/dlls/msi/automation.c +++ b/dlls/msi/automation.c @@ -956,6 +956,15 @@ static HRESULT WINAPI SessionImpl_Invoke( } break; + case DISPID_SESSION_EVALUATECONDITION: + if (wFlags & DISPATCH_METHOD) { + hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr); + if (FAILED(hr)) return hr; + V_VT(pVarResult) = VT_I4; + V_I4(pVarResult) = MsiEvaluateConditionW(This->msiHandle, V_BSTR(&varg0)); + } + break; + case DISPID_SESSION_SETINSTALLLEVEL: hr = DispGetParam(pDispParams, 0, VT_I4, &varg0, puArgErr); if (FAILED(hr)) return hr; diff --git a/dlls/msi/msiserver.idl b/dlls/msi/msiserver.idl index 84bf138..cd6621f 100644 --- a/dlls/msi/msiserver.idl +++ b/dlls/msi/msiserver.idl @@ -172,6 +172,13 @@ library WindowsInstaller msiRunModeCommit = 18 } MsiRunMode; + typedef enum { + msiEvaluateConditionFalse = 0, + msiEvaluateConditionTrue = 1, + msiEvaluateConditionNone = 2, + msiEvaluateConditionError = 3 + } _MsiEvaluateCondition; /* Added underscore to avoid conflict with function name */ + [ uuid(000C109E-0000-0000-C000-000000000046) ] dispinterface Session { @@ -197,6 +204,8 @@ library WindowsInstaller Database* Database(); [id(DISPID_SESSION_DOACTION)] MsiDoActionStatus DoAction([in] BSTR Action); + [id(DISPID_SESSION_EVALUATECONDITION)] + _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression); [id(DISPID_SESSION_FEATURECURRENTSTATE), propget] MsiInstallState FeatureCurrentState([in] BSTR Feature); [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget] diff --git a/dlls/msi/msiserver_dispids.h b/dlls/msi/msiserver_dispids.h index 7aa01d4..e85f750 100644 --- a/dlls/msi/msiserver_dispids.h +++ b/dlls/msi/msiserver_dispids.h @@ -38,6 +38,7 @@ #define DISPID_SESSION_MODE 4 #define DISPID_SESSION_DATABASE 5 #define DISPID_SESSION_DOACTION 8 +#define DISPID_SESSION_EVALUATECONDITION 10 #define DISPID_SESSION_FEATURECURRENTSTATE 13 #define DISPID_SESSION_FEATUREREQUESTSTATE 14 #define DISPID_SESSION_SETINSTALLLEVEL 19 diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index 9d337f8..5538d09 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -1106,20 +1106,17 @@ static void test_Session(IDispatch *pSession) } /* Session::EvaluateCondition */ - todo_wine - { - hr = Session_EvaluateCondition(pSession, NULL, &myint); - ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + hr = Session_EvaluateCondition(pSession, NULL, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - hr = Session_EvaluateCondition(pSession, szEmpty, &myint); - ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + hr = Session_EvaluateCondition(pSession, szEmpty, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - hr = Session_EvaluateCondition(pSession, szEquals, &myint); - ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_ERROR, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - } + hr = Session_EvaluateCondition(pSession, szEquals, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(myint == MSICONDITION_ERROR, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); /* Session::DoAction(CostInitialize) must occur before the next statements */ hr = Session_DoAction(pSession, szCostInitialize, &myint); @@ -1136,17 +1133,14 @@ static void test_Session(IDispatch *pSession) ok(myint == INSTALLSTATE_UNKNOWN, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); /* Session::EvaluateCondition */ - todo_wine - { - hr = Session_EvaluateCondition(pSession, szOneStateFalse, &myint); - ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - if (SUCCEEDED(hr)) - ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - - hr = Session_EvaluateCondition(pSession, szOneStateTrue, &myint); - ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - } + hr = Session_EvaluateCondition(pSession, szOneStateFalse, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + if (SUCCEEDED(hr)) + ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + + hr = Session_EvaluateCondition(pSession, szOneStateTrue, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); /* Session::FeatureRequestState, put */ hr = Session_FeatureRequestStatePut(pSession, szOne, INSTALLSTATE_ADVERTISED); @@ -1156,17 +1150,14 @@ static void test_Session(IDispatch *pSession) ok(myint == INSTALLSTATE_ADVERTISED, "Feature request state was %d but expected %d\n", myint, INSTALLSTATE_ADVERTISED); /* Session::EvaluateCondition */ - todo_wine - { - hr = Session_EvaluateCondition(pSession, szOneActionFalse, &myint); - ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - if (SUCCEEDED(hr)) - ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - - hr = Session_EvaluateCondition(pSession, szOneActionTrue, &myint); - ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - } + hr = Session_EvaluateCondition(pSession, szOneActionFalse, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + if (SUCCEEDED(hr)) + ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + + hr = Session_EvaluateCondition(pSession, szOneActionTrue, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); } /* delete key and all its subkeys */
1
0
0
0
Misha Koshelev : msi/tests: automation: Add tests for Session:: EvaluateCondition.
by Alexandre Julliard
14 May '07
14 May '07
Module: wine Branch: master Commit: 75222d74526c58edd7a4862b031af0c60689eb62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=75222d74526c58edd7a4862b0…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Fri May 11 14:07:41 2007 -0500 msi/tests: automation: Add tests for Session::EvaluateCondition. --- dlls/msi/tests/automation.c | 63 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 63 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index a333aee..9d337f8 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -748,6 +748,23 @@ static HRESULT Session_DoAction(IDispatch *pSession, LPCWSTR szAction, int *iRet return hr; } +static HRESULT Session_EvaluateCondition(IDispatch *pSession, LPCWSTR szCondition, int *iReturn) +{ + VARIANT varresult; + VARIANTARG vararg[1]; + DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; + HRESULT hr; + + VariantInit(&vararg[0]); + V_VT(&vararg[0]) = VT_BSTR; + V_BSTR(&vararg[0]) = SysAllocString(szCondition); + + hr = invoke(pSession, "EvaluateCondition", DISPATCH_METHOD, &dispparams, &varresult, VT_I4); + *iReturn = V_I4(&varresult); + VariantClear(&varresult); + return hr; +} + static HRESULT Session_SetInstallLevel(IDispatch *pSession, long iInstallLevel) { VARIANT varresult; @@ -1005,6 +1022,10 @@ static void test_Session(IDispatch *pSession) static WCHAR szProductName[] = { 'P','r','o','d','u','c','t','N','a','m','e',0 }; static WCHAR szMSITEST[] = { 'M','S','I','T','E','S','T',0 }; static WCHAR szOne[] = { 'O','n','e',0 }; + static WCHAR szOneStateFalse[] = { '!','O','n','e','>','0',0 }; + static WCHAR szOneStateTrue[] = { '!','O','n','e','=','-','1',0 }; + static WCHAR szOneActionFalse[] = { '$','O','n','e','=','-','1',0 }; + static WCHAR szOneActionTrue[] = { '$','O','n','e','>','0',0 }; static WCHAR szCostInitialize[] = { 'C','o','s','t','I','n','i','t','i','a','l','i','z','e',0 }; static WCHAR szEmpty[] = { 0 }; static WCHAR szEquals[] = { '=',0 }; @@ -1084,6 +1105,22 @@ static void test_Session(IDispatch *pSession) IDispatch_Release(pDatabase); } + /* Session::EvaluateCondition */ + todo_wine + { + hr = Session_EvaluateCondition(pSession, NULL, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + + hr = Session_EvaluateCondition(pSession, szEmpty, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + + hr = Session_EvaluateCondition(pSession, szEquals, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(myint == MSICONDITION_ERROR, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + } + /* Session::DoAction(CostInitialize) must occur before the next statements */ hr = Session_DoAction(pSession, szCostInitialize, &myint); ok(SUCCEEDED(hr), "Session_DoAction failed, hresult 0x%08x\n", hr); @@ -1098,12 +1135,38 @@ static void test_Session(IDispatch *pSession) ok(SUCCEEDED(hr), "Session_FeatureCurrentState failed, hresult 0x%08x\n", hr); ok(myint == INSTALLSTATE_UNKNOWN, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + /* Session::EvaluateCondition */ + todo_wine + { + hr = Session_EvaluateCondition(pSession, szOneStateFalse, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + if (SUCCEEDED(hr)) + ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + + hr = Session_EvaluateCondition(pSession, szOneStateTrue, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + } + /* Session::FeatureRequestState, put */ hr = Session_FeatureRequestStatePut(pSession, szOne, INSTALLSTATE_ADVERTISED); ok(SUCCEEDED(hr), "Session_FeatureRequestStatePut failed, hresult 0x%08x\n", hr); hr = Session_FeatureRequestStateGet(pSession, szOne, &myint); ok(SUCCEEDED(hr), "Session_FeatureRequestStateGet failed, hresult 0x%08x\n", hr); ok(myint == INSTALLSTATE_ADVERTISED, "Feature request state was %d but expected %d\n", myint, INSTALLSTATE_ADVERTISED); + + /* Session::EvaluateCondition */ + todo_wine + { + hr = Session_EvaluateCondition(pSession, szOneActionFalse, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + if (SUCCEEDED(hr)) + ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + + hr = Session_EvaluateCondition(pSession, szOneActionTrue, &myint); + ok(SUCCEEDED(hr), "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); + ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); + } } /* delete key and all its subkeys */
1
0
0
0
Mikołaj Zalewski : comctl32: status: Send a NMMOUSE in mouse notifications, not a NMHDR.
by Alexandre Julliard
14 May '07
14 May '07
Module: wine Branch: master Commit: 1f0183e21837104249a9855c402a3876f544aec5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f0183e21837104249a9855c4…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Sun May 13 21:03:27 2007 +0200 comctl32: status: Send a NMMOUSE in mouse notifications, not a NMHDR. --- dlls/comctl32/status.c | 43 +++++++++++++++++++++++++++++++------------ 1 files changed, 31 insertions(+), 12 deletions(-) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 522123c..5f09520 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -310,6 +310,20 @@ STATUSBAR_Refresh (STATUS_INFO *infoPtr, HDC hdc) } +static int +STATUSBAR_InternalHitTest(const STATUS_INFO *infoPtr, const LPPOINT pt) +{ + int i; + if (infoPtr->simple) + return 255; + + for (i = 0; i < infoPtr->numParts; i++) + if (pt->x >= infoPtr->parts[i].bound.left && pt->x <= infoPtr->parts[i].bound.right) + return i; + return -2; +} + + static void STATUSBAR_SetPartBounds (STATUS_INFO *infoPtr) { @@ -1211,15 +1225,20 @@ STATUSBAR_NotifyFormat (STATUS_INFO *infoPtr, HWND from, INT cmd) static LRESULT -STATUSBAR_SendNotify (const STATUS_INFO *infoPtr, UINT code) +STATUSBAR_SendMouseNotify(const STATUS_INFO *infoPtr, UINT code, LPARAM lParam) { - NMHDR nmhdr; - - TRACE("code %04x\n", code); - nmhdr.hwndFrom = infoPtr->Self; - nmhdr.idFrom = GetWindowLongPtrW (infoPtr->Self, GWLP_ID); - nmhdr.code = code; - SendMessageW (infoPtr->Notify, WM_NOTIFY, 0, (LPARAM)&nmhdr); + NMMOUSE nm; + + TRACE("code %04x, lParam=%lx\n", code, lParam); + nm.hdr.hwndFrom = infoPtr->Self; + nm.hdr.idFrom = GetWindowLongPtrW(infoPtr->Self, GWLP_ID); + nm.hdr.code = code; + nm.pt.x = (short)LOWORD(lParam); + nm.pt.y = (short)HIWORD(lParam); + nm.dwItemSpec = STATUSBAR_InternalHitTest(infoPtr, &nm.pt); + nm.dwItemData = 0; + nm.dwHitInfo = 0x30000; /* seems constant */ + SendMessageW(infoPtr->Notify, WM_NOTIFY, 0, (LPARAM)&nm); return 0; } @@ -1320,10 +1339,10 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return STATUSBAR_GetTextLength (infoPtr, 0); case WM_LBUTTONDBLCLK: - return STATUSBAR_SendNotify (infoPtr, NM_DBLCLK); + return STATUSBAR_SendMouseNotify(infoPtr, NM_DBLCLK, lParam); case WM_LBUTTONUP: - return STATUSBAR_SendNotify (infoPtr, NM_CLICK); + return STATUSBAR_SendMouseNotify(infoPtr, NM_CLICK, lParam); case WM_MOUSEMOVE: return STATUSBAR_Relay2Tip (infoPtr, msg, wParam, lParam); @@ -1347,10 +1366,10 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return STATUSBAR_WMPaint (infoPtr, (HDC)wParam); case WM_RBUTTONDBLCLK: - return STATUSBAR_SendNotify (infoPtr, NM_RDBLCLK); + return STATUSBAR_SendMouseNotify(infoPtr, NM_RDBLCLK, lParam); case WM_RBUTTONUP: - return STATUSBAR_SendNotify (infoPtr, NM_RCLICK); + return STATUSBAR_SendMouseNotify(infoPtr, NM_RCLICK, lParam); case WM_SETFONT: return STATUSBAR_WMSetFont (infoPtr, (HFONT)wParam, LOWORD(lParam));
1
0
0
0
Marcus Meissner : ddraw/tests: Check for failing to create surfaces.
by Alexandre Julliard
14 May '07
14 May '07
Module: wine Branch: master Commit: b7ac570f3969d9bc690950d0fd14dc45c11fe3fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7ac570f3969d9bc690950d0f…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sat May 12 16:32:48 2007 +0200 ddraw/tests: Check for failing to create surfaces. --- dlls/ddraw/tests/d3d.c | 2 + dlls/ddraw/tests/dsurface.c | 48 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index bca7d81..bb52816 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -85,6 +85,8 @@ static BOOL CreateDirect3D(void) ddsd.dwHeight = 256; rc = IDirectDraw7_CreateSurface(lpDD, &ddsd, &lpDDS, NULL); ok(rc==DD_OK, "CreateSurface returned: %x\n", rc); + if (!SUCCEEDED(rc)) + return FALSE; rc = IDirect3D7_CreateDevice(lpD3D, &IID_IDirect3DTnLHalDevice, lpDDS, &lpD3DDevice); diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index 60ba7af..565a390 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -73,6 +73,10 @@ static void MipMapCreationTest(void) ddsd.dwHeight = 32; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpDDSMipMapTest, NULL); ok(rc==DD_OK,"CreateSurface returned: %x\n",rc); + if (FAILED(rc)) { + skip("failed to create surface\n"); + return; + } /* Check the number of created mipmaps */ memset(&ddsd, 0, sizeof(DDSURFACEDESC)); @@ -99,7 +103,10 @@ static void MipMapCreationTest(void) ddsd.dwHeight = 32; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpDDSMipMapTest, NULL); ok(rc==DD_OK,"CreateSurface returned: %x\n",rc); - + if (FAILED(rc)) { + skip("failed to create surface\n"); + return; + } /* Check the number of created mipmaps */ memset(&ddsd, 0, sizeof(DDSURFACEDESC)); ddsd.dwSize = sizeof(ddsd); @@ -128,6 +135,10 @@ static void MipMapCreationTest(void) ddsd.dwHeight = 32; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpDDSMipMapTest, NULL); ok(rc==DD_OK,"CreateSurface returned: %x\n",rc); + if (FAILED(rc)) { + skip("failed to create surface\n"); + return; + } /* Check the number of created mipmaps */ memset(&ddsd, 0, sizeof(DDSURFACEDESC)); @@ -155,6 +166,10 @@ static void MipMapCreationTest(void) ddsd.dwHeight = 64; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpDDSMipMapTest, NULL); ok(rc==DD_OK,"CreateSurface returned: %x\n",rc); + if (FAILED(rc)) { + skip("failed to create surface\n"); + return; + } /* Check the number of created mipmaps */ memset(&ddsd, 0, sizeof(DDSURFACEDESC)); @@ -196,12 +211,20 @@ static void SrcColorKey32BlitTest(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x0000FF; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpDst, NULL); ok(rc==DD_OK,"CreateSurface returned: %x\n",rc); + if (FAILED(rc)) { + skip("failed to create surface\n"); + return; + } ddsd.dwFlags |= DDSD_CKSRCBLT; ddsd.ddckCKSrcBlt.dwColorSpaceLowValue = 0xFF00FF; ddsd.ddckCKSrcBlt.dwColorSpaceHighValue = 0xFF00FF; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpSrc, NULL); ok(rc==DD_OK,"CreateSurface returned: %x\n",rc); + if (FAILED(rc)) { + skip("failed to create surface\n"); + return; + } rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); @@ -1577,6 +1600,10 @@ static void test_lockrect_invalid(void) hr = IDirectDraw_CreateSurface(lpDD, &surface_desc, &surface, NULL); ok(SUCCEEDED(hr), "CreateSurface failed (0x%08x)\n", hr); + if (FAILED(hr)) { + skip("failed to create surface\n"); + continue; + } for (i = 0; i < (sizeof(valid) / sizeof(*valid)); ++i) { @@ -1631,6 +1658,10 @@ static void CompressedTest(void) hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + if (FAILED(hr)) { + skip("failed to create surface\n"); + return; + } memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); @@ -1651,6 +1682,10 @@ static void CompressedTest(void) U4(ddsd).ddpfPixelFormat.dwFourCC = MAKEFOURCC('D','X','T','3'); hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + if (FAILED(hr)) { + skip("failed to create surface\n"); + return; + } memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); @@ -1670,6 +1705,10 @@ static void CompressedTest(void) U4(ddsd).ddpfPixelFormat.dwFourCC = MAKEFOURCC('D','X','T','5'); hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface, NULL); ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + if (FAILED(hr)) { + skip("failed to create surface\n"); + return; + } memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); @@ -2011,8 +2050,9 @@ static void SizeTest(void) desc.dwSize = sizeof(desc); desc.dwFlags = DDSD_CAPS; desc.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; + trace("before offscreenplain create dsurface = %p\n", dsurface); ret = IDirectDraw_CreateSurface(lpDD, &desc, &dsurface, NULL); - ok(ret == DDERR_INVALIDPARAMS, "Creating an offscreen plain surface without a size info returned %08x\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Creating an offscreen plain surface without a size info returned %08x (dsurface=%p)\n", ret, dsurface); if(dsurface) { trace("Surface at %p\n", dsurface); @@ -2095,8 +2135,8 @@ static void SizeTest(void) static void PrivateDataTest(void) { HRESULT hr; - IDirectDrawSurface7 *surface7; - IDirectDrawSurface *surface; + IDirectDrawSurface7 *surface7 = NULL; + IDirectDrawSurface *surface = NULL; DDSURFACEDESC desc; ULONG ref, ref2; IUnknown *ptr;
1
0
0
0
Jacek Caban : mshtml: Don' t call start_binding if we use necko to load the page.
by Alexandre Julliard
14 May '07
14 May '07
Module: wine Branch: master Commit: fb2b06a144fdb51cf7821a6dba3b811b6e7d382d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb2b06a144fdb51cf7821a6db…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat May 12 16:13:16 2007 +0200 mshtml: Don't call start_binding if we use necko to load the page. --- dlls/mshtml/persist.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 397a307..2cc80ec 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -113,7 +113,7 @@ static nsIInputStream *get_post_data_stream(IBindCtx *bctx) return ret; } -static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc) +static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BOOL *bind_complete) { BSCallback *bscallback; LPOLESTR url = NULL; @@ -237,6 +237,9 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc) IBindStatusCallback_Release(STATUSCLB(bscallback)); CoTaskMemFree(url); + + if(bind_complete) + *bind_complete = TRUE; return S_OK; }else if(nsres != WINE_NS_LOAD_FROM_MONIKER) { WARN("LoadURI failed: %08x\n", nsres); @@ -247,6 +250,8 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc) IBindStatusCallback_Release(STATUSCLB(bscallback)); CoTaskMemFree(url); + if(bind_complete) + *bind_complete = FALSE; return S_OK; } @@ -335,15 +340,19 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva IMoniker *pimkName, LPBC pibc, DWORD grfMode) { HTMLDocument *This = PERSISTMON_THIS(iface); + BOOL bind_complete = FALSE; HRESULT hres; TRACE("(%p)->(%x %p %p %08x)\n", This, fFullyAvailable, pimkName, pibc, grfMode); - hres = set_moniker(This, pimkName, pibc); + hres = set_moniker(This, pimkName, pibc, &bind_complete); if(FAILED(hres)) return hres; - return start_binding(This->bscallback); + if(!bind_complete) + return start_binding(This->bscallback); + + return S_OK; } static HRESULT WINAPI PersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName, @@ -571,7 +580,7 @@ static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM return hres; } - hres = set_moniker(This, mon, NULL); + hres = set_moniker(This, mon, NULL, NULL); IMoniker_Release(mon); if(FAILED(hres)) return hres;
1
0
0
0
Jacek Caban : mshtml: Wrap nsIExternalProtocolHandler.
by Alexandre Julliard
14 May '07
14 May '07
Module: wine Branch: master Commit: 836c672dcfcb602e282df20f4efae793c4dbf4ac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=836c672dcfcb602e282df20f4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat May 12 16:12:04 2007 +0200 mshtml: Wrap nsIExternalProtocolHandler. --- dlls/mshtml/nsiface.idl | 27 +++++++- dlls/mshtml/nsio.c | 184 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 209 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 85b0e30..817030b 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -86,7 +86,6 @@ interface nsISupports typedef nsISupports nsISHistory; typedef nsISupports nsISimpleEnumerator; typedef nsISupports nsIWidget; -typedef nsISupports nsIProtocolHandler; typedef nsISupports nsIDOMAbstractView; typedef nsISupports nsIHttpHeaderVisitor; typedef nsISupports nsIDOMBarProp; @@ -1196,6 +1195,32 @@ interface nsIFile : nsISupports [ object, + uuid(15fd6940-8ea7-11d3-93ad-00104ba0fd40) + /* FROZEN */ +] +interface nsIProtocolHandler : nsISupports +{ + nsresult GetScheme(nsACString *aScheme); + nsresult GetDefaultPort(PRInt32 *aDefaultPort); + nsresult GetProtocolFlags(PRUint32 *aProtocolFlags); + nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, + nsIURI *aBaseURI, nsIURI **_retval); + nsresult NewChannel(nsIURI *aURI, nsIChannel **_retval); + nsresult AllowPort(PRInt32 port, const char *scheme, PRBool *_retval); +} + +[ + object, + uuid(0e61f3b2-34d7-4c79-bfdc-4860bc7341b7) + /* NOT_FROZEN */ +] +interface nsIExternalProtocolHandler : nsIProtocolHandler +{ + nsresult ExternalAppExistsForScheme(const nsACString *scheme, PRBool *_retval); +} + +[ + object, uuid(bddeda3f-9020-4d12-8c70-984ee9f7935e) /* FROZEN */ ] diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index e3eba43..e7cf487 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1698,6 +1698,167 @@ static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIWineURI **_re return NS_OK; } +typedef struct { + const nsIProtocolHandlerVtbl *lpProtocolHandlerVtbl; + + LONG ref; + + nsIProtocolHandler *nshandler; +} nsProtocolHandler; + +#define NSPROTHANDLER(x) ((nsIProtocolHandler*) &(x)->lpProtocolHandlerVtbl) + +#define NSPROTHANDLER_THIS(iface) DEFINE_THIS(nsProtocolHandler, ProtocolHandler, iface) + +static nsresult NSAPI nsProtocolHandler_QueryInterface(nsIProtocolHandler *iface, nsIIDRef riid, + nsQIResult result) +{ + nsProtocolHandler *This = NSPROTHANDLER_THIS(iface); + + *result = NULL; + + if(IsEqualGUID(&IID_nsISupports, riid)) { + TRACE("(%p)->(IID_nsISupports %p)\n", This, result); + *result = NSPROTHANDLER(This); + }else if(IsEqualGUID(&IID_nsIProtocolHandler, riid)) { + TRACE("(%p)->(IID_nsIProtocolHandler %p)\n", This, result); + *result = NSPROTHANDLER(This); + }else if(IsEqualGUID(&IID_nsIExternalProtocolHandler, riid)) { + TRACE("(%p)->(IID_nsIExternalProtocolHandler %p), returning NULL\n", This, result); + return NS_NOINTERFACE; + } + + if(*result) { + nsISupports_AddRef((nsISupports*)*result); + return NS_OK; + } + + WARN("(%s %p)\nn", debugstr_guid(riid), result); + return NS_NOINTERFACE; +} + +static nsrefcnt NSAPI nsProtocolHandler_AddRef(nsIProtocolHandler *iface) +{ + nsProtocolHandler *This = NSPROTHANDLER_THIS(iface); + LONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + return ref; +} + +static nsrefcnt NSAPI nsProtocolHandler_Release(nsIProtocolHandler *iface) +{ + nsProtocolHandler *This = NSPROTHANDLER_THIS(iface); + LONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + if(!ref) { + if(This->nshandler) + nsIProtocolHandler_Release(This->nshandler); + mshtml_free(This); + } + + return ref; +} + +static nsresult NSAPI nsProtocolHandler_GetScheme(nsIProtocolHandler *iface, nsACString *aScheme) +{ + nsProtocolHandler *This = NSPROTHANDLER_THIS(iface); + + TRACE("(%p)->(%p)\n", This, aScheme); + + if(This->nshandler) + return nsIProtocolHandler_GetScheme(This->nshandler, aScheme); + return NS_ERROR_NOT_IMPLEMENTED; +} + +static nsresult NSAPI nsProtocolHandler_GetDefaultPort(nsIProtocolHandler *iface, + PRInt32 *aDefaultPort) +{ + nsProtocolHandler *This = NSPROTHANDLER_THIS(iface); + + TRACE("(%p)->(%p)\n", This, aDefaultPort); + + if(This->nshandler) + return nsIProtocolHandler_GetDefaultPort(This->nshandler, aDefaultPort); + return NS_ERROR_NOT_IMPLEMENTED; +} + +static nsresult NSAPI nsProtocolHandler_GetProtocolFlags(nsIProtocolHandler *iface, + PRUint32 *aProtocolFlags) +{ + nsProtocolHandler *This = NSPROTHANDLER_THIS(iface); + + TRACE("(%p)->(%p)\n", This, aProtocolFlags); + + if(This->nshandler) + return nsIProtocolHandler_GetProtocolFlags(This->nshandler, aProtocolFlags); + return NS_ERROR_NOT_IMPLEMENTED; +} + +static nsresult NSAPI nsProtocolHandler_NewURI(nsIProtocolHandler *iface, + const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval) +{ + nsProtocolHandler *This = NSPROTHANDLER_THIS(iface); + + TRACE("((%p)->%p %s %p %p)\n", This, aSpec, debugstr_a(aOriginCharset), aBaseURI, _retval); + + if(This->nshandler) + return nsIProtocolHandler_NewURI(This->nshandler, aSpec, aOriginCharset, aBaseURI, _retval); + return NS_ERROR_NOT_IMPLEMENTED; +} + +static nsresult NSAPI nsProtocolHandler_NewChannel(nsIProtocolHandler *iface, + nsIURI *aURI, nsIChannel **_retval) +{ + nsProtocolHandler *This = NSPROTHANDLER_THIS(iface); + + TRACE("(%p)->(%p %p)\n", This, aURI, _retval); + + if(This->nshandler) + return nsIProtocolHandler_NewChannel(This->nshandler, aURI, _retval); + return NS_ERROR_NOT_IMPLEMENTED; +} + +static nsresult NSAPI nsProtocolHandler_AllowPort(nsIProtocolHandler *iface, + PRInt32 port, const char *scheme, PRBool *_retval) +{ + nsProtocolHandler *This = NSPROTHANDLER_THIS(iface); + + TRACE("(%p)->(%d %s %p)\n", This, port, debugstr_a(scheme), _retval); + + if(This->nshandler) + return nsIProtocolHandler_AllowPort(This->nshandler, port, scheme, _retval); + return NS_ERROR_NOT_IMPLEMENTED; +} + +#undef NSPROTHANDLER_THIS + +static const nsIProtocolHandlerVtbl nsProtocolHandlerVtbl = { + nsProtocolHandler_QueryInterface, + nsProtocolHandler_AddRef, + nsProtocolHandler_Release, + nsProtocolHandler_GetScheme, + nsProtocolHandler_GetDefaultPort, + nsProtocolHandler_GetProtocolFlags, + nsProtocolHandler_NewURI, + nsProtocolHandler_NewChannel, + nsProtocolHandler_AllowPort +}; + +static nsIProtocolHandler *create_protocol_handler(nsIProtocolHandler *nshandler) +{ + nsProtocolHandler *ret = mshtml_alloc(sizeof(nsProtocolHandler)); + + ret->lpProtocolHandlerVtbl = &nsProtocolHandlerVtbl; + ret->ref = 1; + ret->nshandler = nshandler; + + return NSPROTHANDLER(ret); +} + static nsresult NSAPI nsIOService_QueryInterface(nsIIOService *iface, nsIIDRef riid, nsQIResult result) { @@ -1733,8 +1894,29 @@ static nsrefcnt NSAPI nsIOService_Release(nsIIOService *iface) static nsresult NSAPI nsIOService_GetProtocolHandler(nsIIOService *iface, const char *aScheme, nsIProtocolHandler **_retval) { + nsIExternalProtocolHandler *nsexthandler; + nsIProtocolHandler *nshandler; + nsresult nsres; + TRACE("(%s %p)\n", debugstr_a(aScheme), _retval); - return nsIIOService_GetProtocolHandler(nsio, aScheme, _retval); + + nsres = nsIIOService_GetProtocolHandler(nsio, aScheme, &nshandler); + if(NS_FAILED(nsres)) { + WARN("GetProtocolHandler failed: %08x\n", nsres); + return nsres; + } + + nsres = nsIProtocolHandler_QueryInterface(nshandler, &IID_nsIExternalProtocolHandler, + (void**)&nsexthandler); + if(NS_FAILED(nsres)) { + *_retval = nshandler; + return NS_OK; + } + + nsIExternalProtocolHandler_Release(nsexthandler); + *_retval = create_protocol_handler(nshandler); + TRACE("return %p\n", *_retval); + return NS_OK; } static nsresult NSAPI nsIOService_GetProtocolFlags(nsIIOService *iface, const char *aScheme,
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
72
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
Results per page:
10
25
50
100
200