From 26c0b76bf833710f1907047ee5b7968fc0488bd6 Mon Sep 17 00:00:00 2001 From: Francois Jacques Date: Sat, 25 Nov 2000 01:20:37 +0000 Subject: [PATCH] Implemented VT_EMPTY to VT_BSTR type coercion. --- dlls/oleaut32/variant.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index 379764b486c..840dd1d4ad5 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -1447,6 +1447,12 @@ static HRESULT Coerce( VARIANTARG* pd, LCID lcid, ULONG dwFlags, VARIANTARG* ps, case( VT_BSTR ): switch( vtFrom ) { + case( VT_EMPTY ): + if ((pd->u.bstrVal = SysAllocStringLen(NULL, 0))) + res = S_OK; + else + res = E_OUTOFMEMORY; + break; case( VT_I1 ): res = VarBstrFromI1( ps->u.cVal, lcid, dwFlags, &(pd->u.bstrVal) ); break;