From: Vibhav Pant vibhavp@gmail.com
--- dlls/combase/usrmarshal.c | 9 ++++++++- dlls/oleaut32/tests/usrmarshal.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/combase/usrmarshal.c b/dlls/combase/usrmarshal.c index b3321d8baa8..51cb242635e 100644 --- a/dlls/combase/usrmarshal.c +++ b/dlls/combase/usrmarshal.c @@ -22,6 +22,7 @@ #define COBJMACROS #include "ole2.h"
+#include "winstring.h" #include "inspectable.h" #include "wine/debug.h"
@@ -1032,7 +1033,13 @@ void WINAPI WdtpInterfacePointer_UserFree(IUnknown *punk) */ ULONG __RPC_USER HSTRING_UserSize(ULONG *flags, ULONG start, HSTRING *str) { - FIXME("%p, %lu, %p: stub\n", flags, start, str); + TRACE("%s, %lu, %s.\n", debugstr_user_flags(flags), start, debugstr_hstring(*str)); + + ALIGN_LENGTH(start, 7); + if (LOWORD(*flags) == MSHCTX_INPROC) + start += sizeof(*str) * 2; + else + start += sizeof(ULONG64) + WindowsGetStringLen(*str) * sizeof(WCHAR); return start; }
diff --git a/dlls/oleaut32/tests/usrmarshal.c b/dlls/oleaut32/tests/usrmarshal.c index f87859faeda..f25b055b1c5 100644 --- a/dlls/oleaut32/tests/usrmarshal.c +++ b/dlls/oleaut32/tests/usrmarshal.c @@ -861,7 +861,7 @@ static void test_marshal_HSTRING(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, test->ctx); size = HSTRING_UserSize(&umcb.Flags, test->offset, &str); - todo_wine ok(size == test->size, "got size %lu != %lu\n", size, test->size); + ok(size == test->size, "got size %lu != %lu\n", size, test->size);
if (size != test->size) {