1

Topic: COM object, DllSurrogate and 64 bits

I welcome, dear colleagues! There is a problem. For operation with the equipment of the supplier there is a COM object of the supplier, 32-bit and ancient as a mammoth. There is a client software, which for a long time already 64-bit.  in the Internet found as to adjust a call 32 a COM object from 64, but works not for all cases. ( DllSurrogate etc.) Under different accounts (it is probable, depends on the rights of the user) the object forms or not. (Thus 32 the version forms under everybody) From under 64 the client in certain cases there is a copy, and in some produces a standard error that was not possible to create object. Attempt of adjustment of the rights through dcomcnfg.exe did not help. How to define what rights does not suffice for start the user from under 64?

2

Re: COM object, DllSurrogate and 64 bits

Hello, Plague, you wrote: P> I Welcome, dear colleagues! P> there is a problem. P> for operation with the equipment of the supplier there is a COM object of the supplier, 32-bit and ancient as a mammoth. There is a client software, which for a long time already 64-bit. P> Guglinem found in the Internet as to adjust a call 32 a COM object from 64, but works not for all cases. ( DllSurrogate etc.) It is all too unreliably, at any reinstallation of this clod it all your adjustments rewrites Create own substitute, as 32 a host and in it  the mammoth. A host [object, dual, uuid ("............")] __ interface IComCreator:/*IUnknown*/IDispatch {HRESULT Create ([in] BSTR progId, [out, retval] IUnknown ** result); HRESULT CreateByCLSID ([in] REFIID clsid, [out, retval] IUnknown ** result);} ; [coclass, version = "4.2", threading (free), aggregatable (never), default (IComCreator), support_error_info (IComCreator), uuid ("............"), registration_script (script = "ComCreator.rgs")] class ComCreator: public IComCreator {public: STDMETHOD (Create) (/* [in] */BSTR progId, / * [out, retval] */IUnknown ** result) {CLSID clsid; HRESULT hr = CLSIDFromProgID (progId, &clsid); if (FAILED (hr)) return hr; return CreateByCLSID (clsid, result);} STDMETHOD (CreateByCLSID) (/* [in] */REFIID clsid, / * [out, retval] */IUnknown ** result) {return CoCreateInstance (clsid, nullptr, CLSCTX_ALL, __ uuidof (IUnknown), (void **) result);}}; and usage IComCreatorPtr creator; HRESULT hr = creator. CreateInstance (__ uuidof (ComCreator), nullptr, CLSCTX_LOCAL_SERVER | CLSCTX_ACTIVATE_32_BIT_SERVER); if (FAILED (hr)) _com_raise_error (hr); creator. Create ("GovnoMamonta")