how to get running instance
-
CComObject::CreateInstance method creates new instance of CComObject. Instead I want to access running instance of class, if there is any. Is it possible? -- modified at 5:48 Tuesday 28th March, 2006
-
CComObject::CreateInstance method creates new instance of CComObject. Instead I want to access running instance of class, if there is any. Is it possible? -- modified at 5:48 Tuesday 28th March, 2006
Try to use QueryInterface to that class Knock out "T" from CAN'T You 'CAN' if you think you 'CAN' :cool:
-
Try to use QueryInterface to that class Knock out "T" from CAN'T You 'CAN' if you think you 'CAN' :cool:
Y, it is one way. But I want to get instance of coclass. ie.
CComObject::CreateInstance
creates new instance . Instead I want running instance if there is already one . May be this is not possible -- modified at 23:23 Wednesday 29th March, 2006
-
Y, it is one way. But I want to get instance of coclass. ie.
CComObject::CreateInstance
creates new instance . Instead I want running instance if there is already one . May be this is not possible -- modified at 23:23 Wednesday 29th March, 2006
go thru http://www.codeproject.com/atl/cpmonikers.asp[^] cheers mil10.
-
CComObject::CreateInstance method creates new instance of CComObject. Instead I want to access running instance of class, if there is any. Is it possible? -- modified at 5:48 Tuesday 28th March, 2006
-
go thru http://www.codeproject.com/atl/cpmonikers.asp[^] cheers mil10.
Let me be reword my problem. In ATL , class CComObject has a static method CreateInstance which gives A pointer to a CComObject<Base> pointer In similar way , is it possible to get pointer to a running CComObject<Base> ? I'm pasting snippet from MSDN to make it more clear.
// Create a local instance of COM object CMyCircle.
double x;
CComObject<CMyCircle>* pCircle;
HRESULT hRes = CComObject<CMyCircle>::CreateInstance(&pCircle);// is there any method to get running instance instead of new one.
_ASSERTE(SUCCEEDED(hRes));-- modified at 4:33 Friday 31st March, 2006