mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 20:09:27 +00:00
ole32/tests: Release the marshalled data in the expected buffers.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6aa797e669
commit
9021b96772
|
@ -699,6 +699,8 @@ static void test_marshal_STGMEDIUM(void)
|
|||
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE);
|
||||
expect_size = WdtpInterfacePointer_UserSize(&umcb.Flags, umcb.Flags, 2 * sizeof(DWORD), unk, &IID_IUnknown);
|
||||
expect_buffer = HeapAlloc(GetProcessHeap(), 0, expect_size);
|
||||
*(DWORD*)expect_buffer = TYMED_NULL;
|
||||
*((DWORD*)expect_buffer + 1) = 0xdeadbeef;
|
||||
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, expect_buffer, expect_size, MSHCTX_DIFFERENTMACHINE);
|
||||
expect_buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, umcb.Flags, expect_buffer + 2 * sizeof(DWORD), unk, &IID_IUnknown);
|
||||
|
||||
|
@ -735,6 +737,14 @@ static void test_marshal_STGMEDIUM(void)
|
|||
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE);
|
||||
STGMEDIUM_UserFree(&umcb.Flags, &med2);
|
||||
|
||||
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, expect_buffer, expect_size, MSHCTX_DIFFERENTMACHINE);
|
||||
med2.tymed = TYMED_NULL;
|
||||
U(med2).pstm = NULL;
|
||||
med2.pUnkForRelease = NULL;
|
||||
STGMEDIUM_UserUnmarshal(&umcb.Flags, expect_buffer, &med2);
|
||||
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE);
|
||||
STGMEDIUM_UserFree(&umcb.Flags, &med2);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, expect_buffer);
|
||||
|
||||
/* TYMED_ISTREAM with pUnkForRelease */
|
||||
|
@ -746,6 +756,9 @@ static void test_marshal_STGMEDIUM(void)
|
|||
expect_buffer = HeapAlloc(GetProcessHeap(), 0, expect_size);
|
||||
/* There may be a hole between the two interfaces so init the buffer to something */
|
||||
memset(expect_buffer, 0xcc, expect_size);
|
||||
*(DWORD*)expect_buffer = TYMED_ISTREAM;
|
||||
*((DWORD*)expect_buffer + 1) = 0xdeadbeef;
|
||||
*((DWORD*)expect_buffer + 2) = 0xcafe;
|
||||
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, expect_buffer, expect_size, MSHCTX_DIFFERENTMACHINE);
|
||||
expect_buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, umcb.Flags, expect_buffer + 3 * sizeof(DWORD), (IUnknown*)stm, &IID_IStream);
|
||||
expect_buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, umcb.Flags, expect_buffer_end, unk, &IID_IUnknown);
|
||||
|
@ -786,6 +799,14 @@ static void test_marshal_STGMEDIUM(void)
|
|||
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE);
|
||||
STGMEDIUM_UserFree(&umcb.Flags, &med2);
|
||||
|
||||
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, expect_buffer, expect_size, MSHCTX_DIFFERENTMACHINE);
|
||||
med2.tymed = TYMED_NULL;
|
||||
U(med2).pstm = NULL;
|
||||
med2.pUnkForRelease = NULL;
|
||||
STGMEDIUM_UserUnmarshal(&umcb.Flags, expect_buffer, &med2);
|
||||
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE);
|
||||
STGMEDIUM_UserFree(&umcb.Flags, &med2);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, expect_buffer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue