21#include <rtl/ustring.hxx>
22#include <osl/diagnose.h>
28 OSL_ASSERT(sTypeName && pVar);
29 CComObject< UnoTypeWrapper>* pObj;
31 if( SUCCEEDED( CComObject<UnoTypeWrapper>::CreateInstance( &pObj)))
34 pVar->vt= VT_DISPATCH;
35 pVar->pdispVal= CComQIPtr<IDispatch>(pObj->GetUnknown());
37 CComQIPtr<IUnoTypeWrapper> spType(pVar->pdispVal);
39 if (SUCCEEDED(spType->put_Name(sTypeName)))
50 CComBSTR bstr(o3tl::toW(sTypeName.getStr()));
88 CComBSTR
name(*rgszNames);
91 if(
name == CComBSTR( L
"name") )
92 *rgDispId= DISPID_VALUE;
94 ret= DISP_E_UNKNOWNNAME;
104 DISPPARAMS *pDispParams,
109 if (pDispParams ==
nullptr)
110 return DISP_E_EXCEPTION;
112 if( pDispParams->cNamedArgs)
113 return DISP_E_NONAMEDARGS;
117 switch( dispIdMember)
120 if (wFlags & DISPATCH_PROPERTYGET)
122 if (pVarResult ==
nullptr)
132 ret= DISP_E_MEMBERNOTFOUND;
STDMETHOD() put_Name(BSTR val) override
STDMETHOD() GetTypeInfoCount(UINT *pctinfo) override
STDMETHOD() GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override
STDMETHOD() Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override
virtual ~UnoTypeWrapper()
STDMETHOD() get_Name(BSTR *pVal) override
STDMETHOD() GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override
bool createUnoTypeWrapper(BSTR sTypeName, VARIANT *pVar)