I tried to use the same code now with sdk 2.0 in Firefox 3.6 butit
doesn't work either, can please somebody give me a hand with this? :\
Code:
nsresult res;
nsCOMPtr<nsIThreadManager> tm =
do_GetService(NS_THREADMANAGER_CONTRACTID, &res);
if(tm != NULL){
nsresult rv = tm->NewThread(0, 0, getter_AddRefs(mythread));
if (NS_FAILED(rv)) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIRunnable> r = new GetStartupSettingsTask(&core,
callback);
mythread->Dispatch(r, 0);
}
It fails on the conditional statement, as tm is initiated. res gets
the status code
2147500034 (NS_ERROR_NO_INTERFACE) The question is
why? Before I was using sdk 11.0 and 12.0, but now I'm using 2.0, can
somebody tell me what is the problem here? I can't find a working
solution... I've tried to include multiple versions of interfaces but
without success.
Cheers,
João