[Jslib] Accessing Components:
Tom Reinhardt
tomr@mems-exchange.org
Wed, 17 Oct 2001 15:59:05 -0400
I'm a relative newbie to XPCOM, XPConnect, etc. I have some experience
with COM, however, so I have a feeling for 'components' and component
models. Anyway, I'm trying to use XPConnect, as in the various
examples. When I attempt to create an object, as in:
var obj =
Components.classesByID["{c07e81e0-ef12-11d2-92b6-00105a1b0d64}"]; (for
example),
I get a "Permission denied to get property UnknownClass.classesByID"
I note in one sample, that a
netscape.security.PriviledgeManager.enablePriviledge("UniversalXPConnect");
form is used. But, attempting to do this yields another complaint ...
something about that component not having that property.
I'm sure that I'm missing something fundamental here. I'm thinking of
something like a missing CoInitialize() or th eXPCom equivalent. Note,
this is running on the latest Mozilla (.5) build.
Any assistance would be greatly appreciated.
Thanks,
TomR