msi: automation: Implement Record::FieldCount.
This commit is contained in:
parent
aa9f4beb65
commit
c0c6fe6341
|
@ -566,6 +566,14 @@ static HRESULT WINAPI RecordImpl_Invoke(
|
|||
|
||||
switch (dispIdMember)
|
||||
{
|
||||
case DISPID_RECORD_FIELDCOUNT:
|
||||
if (wFlags & DISPATCH_PROPERTYGET) {
|
||||
V_VT(pVarResult) = VT_I4;
|
||||
V_I4(pVarResult) = MsiRecordGetFieldCount(This->msiHandle);
|
||||
}
|
||||
else return DISP_E_MEMBERNOTFOUND;
|
||||
break;
|
||||
|
||||
case DISPID_RECORD_STRINGDATA:
|
||||
if (wFlags & DISPATCH_PROPERTYGET) {
|
||||
hr = DispGetParam(pDispParams, 0, VT_I4, &varg0, puArgErr);
|
||||
|
|
|
@ -88,6 +88,8 @@ library WindowsInstaller
|
|||
void StringData(
|
||||
[in] long Field,
|
||||
[in] BSTR rhs);
|
||||
[id(DISPID_RECORD_FIELDCOUNT), propget]
|
||||
long FieldCount();
|
||||
}
|
||||
|
||||
[ uuid(000C1095-0000-0000-C000-000000000046) ]
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#define DISPID_INSTALLER_PRODUCTSTATE 17
|
||||
#define DISPID_INSTALLER_PRODUCTS 35
|
||||
|
||||
#define DISPID_RECORD_FIELDCOUNT 0
|
||||
#define DISPID_RECORD_STRINGDATA 1
|
||||
|
||||
#define DISPID_STRINGLIST_ITEM 0
|
||||
|
|
|
@ -1388,12 +1388,9 @@ static void test_Installer(void)
|
|||
int iFieldCount = 0;
|
||||
|
||||
/* Record::FieldCountGet */
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue