From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- dlls/wintypes/buffer.c | 8 ++++++-- dlls/wintypes/tests/wintypes.c | 8 -------- 2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/wintypes/buffer.c b/dlls/wintypes/buffer.c index 1c96ee4cc1e..6129e096035 100644 --- a/dlls/wintypes/buffer.c +++ b/dlls/wintypes/buffer.c @@ -201,8 +201,12 @@ static HRESULT WINAPI buffer_get_Capacity( IBuffer *iface, UINT32 *value )
static HRESULT WINAPI buffer_get_Length( IBuffer *iface, UINT32 *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + struct buffer *impl = impl_from_IBuffer( iface ); + + TRACE( "iface %p, value %p\n", iface, value ); + + *value = impl->length; + return S_OK; }
static HRESULT WINAPI buffer_put_Length( IBuffer *iface, UINT32 value ) diff --git a/dlls/wintypes/tests/wintypes.c b/dlls/wintypes/tests/wintypes.c index 974a65bd938..042cc9da4d6 100644 --- a/dlls/wintypes/tests/wintypes.c +++ b/dlls/wintypes/tests/wintypes.c @@ -197,9 +197,7 @@ static void test_IBufferStatics(void)
length = 0xdeadbeef; hr = IBuffer_get_Length(buffer, &length); - todo_wine ok(hr == S_OK, "IBuffer_get_Length failed, hr %#lx.\n", hr); - todo_wine ok(length == 0, "IBuffer_get_Length returned length %u.\n", length);
hr = IBuffer_put_Length(buffer, 1); @@ -217,18 +215,14 @@ static void test_IBufferStatics(void)
length = 0xdeadbeef; hr = IBuffer_get_Length(buffer, &length); - todo_wine ok(hr == S_OK, "IBuffer_get_Length failed, hr %#lx.\n", hr); - todo_wine ok(length == 0, "IBuffer_get_Length returned length %u.\n", length);
hr = IBuffer_put_Length(buffer, 1); ok(hr == S_OK, "IBuffer_put_Length failed, hr %#lx.\n", hr); length = 0xdeadbeef; hr = IBuffer_get_Length(buffer, &length); - todo_wine ok(hr == S_OK, "IBuffer_get_Length failed, hr %#lx.\n", hr); - todo_wine ok(length == 1, "IBuffer_get_Length returned length %u.\n", length);
hr = IBuffer_put_Length(buffer, 100 + 1); @@ -238,9 +232,7 @@ static void test_IBufferStatics(void) ok(hr == S_OK, "IBuffer_put_Length failed, hr %#lx.\n", hr); length = 0; hr = IBuffer_get_Length(buffer, &length); - todo_wine ok(hr == S_OK, "IBuffer_get_Length failed, hr %#lx.\n", hr); - todo_wine ok(length == 100, "IBuffer_get_Length returned length %u.\n", length);
IBuffer_Release(buffer);