php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15635 COM Singleton
Submitted: 2002-02-19 18:23 UTC Modified: 2002-03-21 14:22 UTC
From: tlee at calcon dot net Assigned:
Status: No Feedback Package: COM related
PHP Version: 4.1.1 OS: 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tlee at calcon dot net
New email:
PHP Version: OS:

 

 [2002-02-19 18:23 UTC] tlee at calcon dot net
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:

};

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-11 12:53 UTC] phanto@php.net
does this component work in any other environment ?
'locks the browser' is a very wage fordable description of your problem as the browser is in no relation with your com server. so can you look into your servers error log or try to figure out some more details somehow else.
i use lots of singleton objects here and i have no problems with them.

harald
 [2002-03-21 14:22 UTC] phanto@php.net
No feedback was provided for this bug, so it is being suspended.
If you are able to provide the information that was requested,
please do so and change the status of the bug back to "Open".


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC