diff options
author | Joachim Lingner <jl@openoffice.org> | 2000-10-20 10:28:16 +0000 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2000-10-20 10:28:16 +0000 |
commit | 09f7be7f295b75ec03c61def46d8e6307f0a09ba (patch) | |
tree | a57743ca5622e3d6a4af08efa2669509d44c6237 /extensions/source/ole | |
parent | 37c6e6b103e3c4ec226c6a3851b468e8a42ec8de (diff) |
OleClient_Impl::createInstanceWithArguments now delegates to OleClient_Impl::createInstance
Diffstat (limited to 'extensions/source/ole')
-rw-r--r-- | extensions/source/ole/servprov.cxx | 52 |
1 files changed, 3 insertions, 49 deletions
diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx index 802683413c34..661bb47dd54a 100644 --- a/extensions/source/ole/servprov.cxx +++ b/extensions/source/ole/servprov.cxx @@ -2,9 +2,9 @@ * * $RCSfile: servprov.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: jl $ $Date: 2000-10-13 15:27:56 $ + * last change: $Author: jl $ $Date: 2000-10-20 11:28:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -609,53 +609,7 @@ Reference<XInterface> SAL_CALL OleClient_Impl::createInstance(const OUString& Se Reference<XInterface> SAL_CALL OleClient_Impl::createInstanceWithArguments(const OUString& ServiceSpecifier, const Sequence< Any >& Arguments) throw (Exception, RuntimeException) { - Reference<XInterface> ret; - HRESULT result; - IUnknown* pUnknown = NULL; - CLSID classId; - - o2u_attachCurrentThread(); - - result = CLSIDFromProgID( - ServiceSpecifier.getStr(), //Pointer to the ProgID - &classId); //Pointer to the CLSID - - - if (result == NOERROR) - { - result = CoCreateInstance( - classId, //Class identifier (CLSID) of the object - NULL, //Pointer to whether object is or isn't part of an aggregate - CLSCTX_LOCAL_SERVER, //Context for running executable code - IID_IUnknown, //Reference to the identifier of the interface - (void**)&pUnknown); //Address of output variable that receives - // the interface pointer requested in riid - } - - if (pUnknown != NULL) - { - Any any; - VARIANT variant; - - VariantInit(&variant); - - V_VT(&variant) = VT_UNKNOWN; - V_UNKNOWN(&variant) = pUnknown; - - pUnknown->AddRef(); - - if (variantToAny(&variant, any)) - { - if (any.getValueTypeClass() == TypeClass_INTERFACE) - { - ret = *(Reference<XInterface>*)any.getValue(); - } - } - - VariantClear(&variant); - } - - return ret; + return createInstance( ServiceSpecifier); } // UnoConversionUtilities ----------------------------------------------------------------------------- |