|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-03-11 12:53 UTC] phanto@php.net
[2002-03-21 14:22 UTC] phanto@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 01:00:02 2025 UTC |
I noticed that loading a COM object that has been declared as a singleton locks up the browser. I created a simple COM object (header follows), and if I add the SINGLETON macro to the com object, it will hang on instantiation. If anybody has a solution, or a work around, I would greatly appreciate it. It looks as though only simple apartment level COM objects are acceptable. Thank you. Tom Lee class ATL_NO_VTABLE CIt : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CIt, &CLSID_It>, public IDispatchImpl<IIt, &IID_IIt, &LIBID_TESTLib> { public: CIt() { } DECLARE_REGISTRY_RESOURCEID(IDR_IT) // Below macro will destroy the object DECLARE_CLASSFACTORY_SINGLETON(CIt) // <<<< This it it!!! DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CIt) COM_INTERFACE_ENTRY(IIt) COM_INTERFACE_ENTRY(IDispatch) END_COM_MAP() // IIt public: STDMETHOD(Now)(); protected: };