msi: automation: Implement Record::IntegerData.
This commit is contained in:
parent
757192ebce
commit
18cab64b42
|
@ -608,6 +608,26 @@ static HRESULT WINAPI RecordImpl_Invoke(
|
|||
else return DISP_E_MEMBERNOTFOUND;
|
||||
break;
|
||||
|
||||
case DISPID_RECORD_INTEGERDATA:
|
||||
if (wFlags & DISPATCH_PROPERTYGET) {
|
||||
hr = DispGetParam(pDispParams, 0, VT_I4, &varg0, puArgErr);
|
||||
if (FAILED(hr)) return hr;
|
||||
V_VT(pVarResult) = VT_I4;
|
||||
V_I4(pVarResult) = MsiRecordGetInteger(This->msiHandle, V_I4(&varg0));
|
||||
} else if (wFlags & DISPATCH_PROPERTYPUT) {
|
||||
hr = DispGetParam(pDispParams, 0, VT_I4, &varg0, puArgErr);
|
||||
if (FAILED(hr)) return hr;
|
||||
hr = DispGetParam(pDispParams, DISPID_PROPERTYPUT, VT_I4, &varg1, puArgErr);
|
||||
if (FAILED(hr)) return hr;
|
||||
if ((ret = MsiRecordSetInteger(This->msiHandle, V_I4(&varg0), V_I4(&varg1))) != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("MsiRecordSetInteger returned %d\n", ret);
|
||||
return DISP_E_EXCEPTION;
|
||||
}
|
||||
}
|
||||
else return DISP_E_MEMBERNOTFOUND;
|
||||
break;
|
||||
|
||||
default:
|
||||
return DISP_E_MEMBERNOTFOUND;
|
||||
}
|
||||
|
|
|
@ -88,6 +88,12 @@ library WindowsInstaller
|
|||
void StringData(
|
||||
[in] long Field,
|
||||
[in] BSTR rhs);
|
||||
[id(DISPID_RECORD_INTEGERDATA), propget]
|
||||
long IntegerData([in] long Field);
|
||||
[id(DISPID_RECORD_INTEGERDATA), propput]
|
||||
void IntegerData(
|
||||
[in] long Field,
|
||||
[in] long rhs);
|
||||
[id(DISPID_RECORD_FIELDCOUNT), propget]
|
||||
long FieldCount();
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#define DISPID_RECORD_FIELDCOUNT 0
|
||||
#define DISPID_RECORD_STRINGDATA 1
|
||||
#define DISPID_RECORD_INTEGERDATA 2
|
||||
|
||||
#define DISPID_STRINGLIST_ITEM 0
|
||||
#define DISPID_STRINGLIST_COUNT 1
|
||||
|
|
|
@ -1478,8 +1478,6 @@ static void test_Installer(void)
|
|||
ok(SUCCEEDED(hr), "Record_FiledCountGet failed, hresult 0x%08x\n", hr);
|
||||
ok(iValue == 1, "Record_FieldCountGet result was %d but expected 1\n", iValue);
|
||||
|
||||
todo_wine
|
||||
{
|
||||
/* Record::IntegerDataGet */
|
||||
hr = Record_IntegerDataGet(pRecord, 1, &iValue);
|
||||
ok(SUCCEEDED(hr), "Record_IntegerDataGet failed, hresult 0x%08x\n", hr);
|
||||
|
@ -1503,7 +1501,6 @@ static void test_Installer(void)
|
|||
hr = Record_IntegerDataGet(pRecord, 1, &iValue);
|
||||
ok(SUCCEEDED(hr), "Record_IntegerDataGet failed, hresult 0x%08x\n", hr);
|
||||
ok(iValue == 100, "Record_IntegerDataGet result was %d but expected 100\n", iValue);
|
||||
}
|
||||
|
||||
IDispatch_Release(pRecord);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue