Commit 56e2ac13 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msado15: Implement Field_get_Attributes and Field_get_DefinedSize.

parent a9452acb
......@@ -147,14 +147,22 @@ static HRESULT WINAPI field_get_ActualSize( Field *iface, LONG *size )
static HRESULT WINAPI field_get_Attributes( Field *iface, LONG *attrs )
{
TRACE( "%p, %p\n", iface, attrs );
return E_NOTIMPL;
struct field *field = impl_from_Field( iface );
TRACE( "%p, %p\n", field, attrs );
*attrs = field->attrs;
return S_OK;
}
static HRESULT WINAPI field_get_DefinedSize( Field *iface, LONG *size )
{
FIXME( "%p, %p\n", iface, size );
return E_NOTIMPL;
struct field *field = impl_from_Field( iface );
TRACE( "%p, %p\n", field, size );
*size = field->defined_size;
return S_OK;
}
static HRESULT WINAPI field_get_Name( Field *iface, BSTR *str )
......
......@@ -101,7 +101,9 @@ static void test_Fields(void)
Field *field, *field2;
VARIANT val, index;
BSTR name;
LONG refs, count;
LONG refs, count, size;
DataTypeEnum type;
FieldAttributeEnum attrs;
HRESULT hr;
hr = CoCreateInstance( &CLSID_Recordset, NULL, CLSCTX_INPROC_SERVER, &IID__Recordset, (void **)&recordset );
......@@ -164,6 +166,24 @@ static void test_Fields(void)
Field_Release( field2 );
SysFreeString( name );
/* verify values set with _Append */
hr = Field_get_Name( field, &name );
ok( hr == S_OK, "got %08x\n", hr );
ok( !lstrcmpW( name, L"field" ), "got %s\n", wine_dbgstr_w(name) );
SysFreeString( name );
type = 0xdead;
hr = Field_get_Type( field, &type );
ok( hr == S_OK, "got %08x\n", hr );
ok( type == adInteger, "got %d\n", type );
size = -1;
hr = Field_get_DefinedSize( field, &size );
ok( hr == S_OK, "got %08x\n", hr );
ok( size == 4, "got %d\n", size );
attrs = 0xdead;
hr = Field_get_Attributes( field, &attrs );
ok( hr == S_OK, "got %08x\n", hr );
ok( !attrs, "got %d\n", attrs );
Field_Release( field );
Fields_Release( fields );
_Recordset_Release( recordset );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment