Re: IXMLHTTPRequest AJAX trace
Igor,
I implemented IClassFactory in my class and my class now inherits from
these classes
///////////////////////
class CCustomXMLHTTPRequest :
public IDispatchImpl<ICustomXMLHTTPRequest,
&IID_ICustomXMLHTTPRequest, &LIBID_IEEnumWindowsLib>,
public CComObjectRoot,
public CComCoClass<CCustomXMLHTTPRequest,&CLSID_CustomXMLHTTPRequest>,
public IXMLHTTPRequest,
public IClassFactory
////////////////////////
and the COM_MAP becomes
/////////////////////////
BEGIN_COM_MAP(CCustomXMLHTTPRequest)
COM_INTERFACE_ENTRY(ICustomXMLHTTPRequest)
COM_INTERFACE_ENTRY2(IDispatch, ICustomXMLHTTPRequest)
COM_INTERFACE_ENTRY2(IClassFactory,ICustomXMLHTTPRequest)
END_COM_MAP()
////////////////////////
I also override the virtual functions of IClassFactory which are:
//////////////////////
//IClassFactory
STDMETHODIMP CCustomXMLHTTPRequest::CreateInstance(IUnknown *pUnkOuter,
REFIID riid, void **ppvObject)
{
if(pUnkOuter != NULL)
return ResultFromScode(CLASS_E_NOAGGREGATION);
return QueryInterface(riid, ppvObject);
}
STDMETHODIMP CCustomXMLHTTPRequest::LockServer(BOOL fLock)
{
return NOERROR;
}
/////////////////////
and modified CLSCTX_LOCAL_SERVER to CLSCTX_INPROC_SERVER, however,
doing all this doesn't seem to get me anywhere. Am I doing what you
meant by implementating IClassFactory? Do I still miss something?
Please advice. Thanks a lot.
Regards,
Paulino