msi: automation: Implement Record::FieldCount.

This commit is contained in:
Misha Koshelev 2007-05-11 14:08:14 -05:00 committed by Alexandre Julliard
parent aa9f4beb65
commit c0c6fe6341
4 changed files with 14 additions and 6 deletions

View File

@ -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);

View File

@ -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) ]

View File

@ -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

View File

@ -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);
}