diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index ab2cc12c74a..7f94d1d7b78 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -938,7 +938,7 @@ static HRESULT Record_StringDataPut(IDispatch *pRecord, int iField, LPCWSTR szSt V_VT(&vararg[0]) = VT_BSTR; V_BSTR(&vararg[0]) = SysAllocString(szString); - return invoke(pRecord, "StringData", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_BSTR); + return invoke(pRecord, "StringData", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY); } static HRESULT StringList_Item(IDispatch *pStringList, int iIndex, LPWSTR szString) @@ -1002,6 +1002,16 @@ static void test_Database(IDispatch *pDatabase) ok(SUCCEEDED(hr), "Record_StringDataGet failed, hresult 0x%08x\n", hr); ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, szThree); + /* Record::StringDataPut with correct index */ + hr = Record_StringDataPut(pRecord, 1, szTwo); + ok(SUCCEEDED(hr), "Record_StringDataPut failed, hresult 0x%08x\n", hr); + + /* Record::StringDataGet */ + memset(szString, 0, sizeof(szString)); + hr = Record_StringDataGet(pRecord, 1, szString); + ok(SUCCEEDED(hr), "Record_StringDataGet failed, hresult 0x%08x\n", hr); + ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, szTwo); + /* Record::StringDataPut with incorrect index */ hr = Record_StringDataPut(pRecord, -1, szString); ok(hr == DISP_E_EXCEPTION, "Record_StringDataPut failed, hresult 0x%08x\n", hr);