I�m trying to create an application on Macintosh platform (MacOS 9.1) 
with Mozilla XPCOM. I'm using the "link order" of PPBrowser project (I 
tried to build a project only with my files and the mozilla shared 
libraries, but it didn't work)

I wrote a code like this:
...
static NS_DEFINE_CID(kURICID,NS_STANDARDURL_CID);
static NS_DEFINE_CID(kChildCID,NS_CHILD_CID);
...
rv = NS_InitXPCOM(nsnull,nsnull);
if(NS_FAILED(rv))
  printf("failed on init");

nsComponentManager::Initialize();
nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup,nsnull);
nsComponentManager::RegisterComponentLib(kChildCID, 0 , 0, 
"widget.shlb", 0, 0);
...
nsCOMPtr<nsIURI> pURI  = do_CreateInstance(kURICID);
nsCOMPtr<nsIWidget> pWidget = do_CreateInstance(kChildCID);
...

After this point, the pURI and pWidget pointers have NULL value, and I 
can�t access the methods within the classes like:

pURI->SetSpec("file://somefile.html");

Could you help me please?
Thanks


Sidnei Frank


Reply via email to