From c4022601e2050ee33efb964962210c2e96d2256f Mon Sep 17 00:00:00 2001 From: Harald Radi Date: Tue, 14 Aug 2001 00:48:15 +0000 Subject: [PATCH] hresult is returned if no return type is specified --- ext/com/COM.c | 7 +++++++ ext/rpc/com/com_wrapper.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/ext/com/COM.c b/ext/com/COM.c index aeae84ddcfe..3b455c1e9c1 100644 --- a/ext/com/COM.c +++ b/ext/com/COM.c @@ -162,6 +162,13 @@ PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DIS } } + if(!pVarResult) + { + VariantInit(pVarResult); + V_VT(pVarResult) = VT_I4; + V_I4(pVarResult) = hr; + } + return hr; } else diff --git a/ext/rpc/com/com_wrapper.c b/ext/rpc/com/com_wrapper.c index aeae84ddcfe..3b455c1e9c1 100644 --- a/ext/rpc/com/com_wrapper.c +++ b/ext/rpc/com/com_wrapper.c @@ -162,6 +162,13 @@ PHPAPI HRESULT php_COM_invoke(comval *obj, DISPID dispIdMember, WORD wFlags, DIS } } + if(!pVarResult) + { + VariantInit(pVarResult); + V_VT(pVarResult) = VT_I4; + V_I4(pVarResult) = hr; + } + return hr; } else