Petar Popara wrote:
nsCOMPtr<nsIServiceManager> svcMgr;
rv = NS_GetServiceManager(getter_AddRefs(svcMgr));
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsISupports> svcPsm;
rv = svcMgr->GetService("@mozilla.org/psm;1", ?What here?, svcPsm)
You need to use GetServiceByContractID. Use NS_GET_IID(nsISupports) as
the IID. The final argument must be getter_AddRefs(svcPsm) when using an
nsCOMPtr.
I have above code in NPP_New() (together with other initialisation code). Do
I have to release above COM pointers (svcMgr & svcPsm)? How do I release
them in NPP_Destroy()?
nsCOMPtr automatically releases the pointer when it goes out of scope.
_______________________________________________
mozilla-crypto mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-crypto