Michael Bonfils wrote:

> I've tried to convert to use nsIComponentRegistrar :
> nsCOMPtr<nsIComponentRegistrar> compReg;
> nsresult rv = NS_GetComponentRegistrar(getter_AddRefs(compReg));
> rv  = compReg->CreateInstance(NS_SIMPLEURI_CONTRACTID, nsnull,
> NS_GET_IID(nsIURI), (void**)&url);
> wxASSERT_MSG(NS_SUCCEEDED(rv), wxT("Could not create an instance of the
> url"));
> rv = url->SetSpec(nsCAutoString(utf8_buffer));
> > 'CreateInstance' : is not a member of 'nsDerivedSafe<T>'
>
> maybe i have to use do_Create instead of CreateInstance ?

Yes, use do_CreateInstance instead when using nsCOMPtr.

I strongly suggest you check out
http://developer.mozilla.org/en/docs/XPCOM if you really want to
understand what you're doing in this area (component registration, what
an nsCOMPtr is, and what-not -- good guides for this is all there!)

/Håkan

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to