Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50842 Signed-off-by: Bernhard Übelacker bernhardu@mailbox.org --- dlls/msado15/recordset.c | 8 ++++---- dlls/msado15/tests/msado15.c | 9 +++++---- include/msado15_backcompat.idl | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index 92a0deb6959..61b7ebb596a 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -69,7 +69,7 @@ struct field LONG refs; WCHAR *name; DataTypeEnum type; - LONG defined_size; + LONG_PTR defined_size; LONG attrs; LONG index; struct recordset *recordset; @@ -211,7 +211,7 @@ static HRESULT WINAPI field_get_Attributes( Field *iface, LONG *attrs ) return S_OK; }
-static HRESULT WINAPI field_get_DefinedSize( Field *iface, LONG *size ) +static HRESULT WINAPI field_get_DefinedSize( Field *iface, LONG_PTR *size ) { struct field *field = impl_from_Field( iface );
@@ -360,11 +360,11 @@ static HRESULT WINAPI field_put_Type( Field *iface, DataTypeEnum type ) return S_OK; }
-static HRESULT WINAPI field_put_DefinedSize( Field *iface, LONG size ) +static HRESULT WINAPI field_put_DefinedSize( Field *iface, LONG_PTR size ) { struct field *field = impl_from_Field( iface );
- TRACE( "%p, %d\n", field, size ); + TRACE( "%p, %ld\n", field, size );
field->defined_size = size; return S_OK; diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index 25c9c6f8356..cbe48764324 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -631,7 +631,7 @@ static void test_ADORecordsetConstruction(void) if (count > 0) { VARIANT index; - LONG size; + LONG_PTR size; DataTypeEnum type;
V_VT( &index ) = VT_BSTR; @@ -646,7 +646,7 @@ static void test_ADORecordsetConstruction(void) size = -1; hr = Field_get_DefinedSize( field, &size ); ok( hr == S_OK, "got %08x\n", hr ); - ok( size == 5, "got %d\n", size ); + ok( size == 5, "got %ld\n", size );
VariantClear(&index);
@@ -672,7 +672,8 @@ static void test_Fields(void) Field *field, *field2; VARIANT val, index; BSTR name; - LONG count, size; + LONG count; + LONG_PTR size; DataTypeEnum type; FieldAttributeEnum attrs; HRESULT hr; @@ -747,7 +748,7 @@ static void test_Fields(void) size = -1; hr = Field_get_DefinedSize( field, &size ); ok( hr == S_OK, "got %08x\n", hr ); - ok( size == 4, "got %d\n", size ); + ok( size == 4, "got %ld\n", size ); attrs = 0xdead; hr = Field_get_Attributes( field, &attrs ); ok( hr == S_OK, "got %08x\n", hr ); diff --git a/include/msado15_backcompat.idl b/include/msado15_backcompat.idl index fedaf557066..08566a2eee0 100644 --- a/include/msado15_backcompat.idl +++ b/include/msado15_backcompat.idl @@ -634,7 +634,7 @@ interface Field20 : _ADO
[id(0x0000044f), propget] HRESULT DefinedSize( - [out, retval] LONG *size); + [out, retval] LONG_PTR *size);
[id(0x0000044c), propget] HRESULT Name( @@ -699,7 +699,7 @@ interface Field20 : _ADO
[id(0x0000044f), propput] HRESULT DefinedSize( - [in] LONG size); + [in] LONG_PTR size);
[id(0x0000040c), propput] HRESULT Attributes(
In SDK it's using ADO_LONGPTR for sizes, which is defined conditionally as __int64 or long, with same uuid. We should follow that. There are more places to fix in a similar way.
Am 21.12.21 um 20:27 schrieb Nikolay Sivov:
In SDK it's using ADO_LONGPTR for sizes, which is defined conditionally as __int64 or long, with same uuid. We should follow that. There are more places to fix in a similar way.
Hello Nikolay, thanks for your first review. I sent in another version v2.
Kind regards, Bernhard