I'm new to XPCOM.  I need to pass an object of nsAString type as a method parameter.  I have trouble initializing it.  I tried:
#include "nsEmbedString.h"
NS_IMETHODIMP cxdmpl::Start()
{
 nsEmbedString attr("src");
 nsEmbedString value("c.jpg");
 mElm->SetAttribute(attr, value);
 return NS_OK;
}
But got:
No constructor could take the source type, or constructor overload resolution was ambiguous
I cast the string to char_type*, but got:
'char_type' : undeclared identifier
 
I spent hours for the simple task, where can I get information for Mozilla 1.6 XPCOM programming?  The source code doesn't have a sample for my problem.  Maybe I need a class other than nsEmbedString?
 
Thank you very much for any kind of help,
 
Michael
 

Reply via email to