I have property of "string" type in my plugin:
attribute string myProp;
I have getter/setter functions:
NS_IMETHODIMP nsMyPlugin::GetMyProp(char * *aMyProp)
{
*aMyProp = m_MyProp;
return NS_OK;
}
NS_IMETHODIMP nsMyPlugin::SetMyProp(const char * aMyProp)
{
//Which function I should use to clone aMyProp here:
//m_MyProp = nsMemory::Clone(aMyProp);
m_MyProp = (char*)aMyProp;
return NS_OK;
}
Which function I should use to clone aMyProp? I have tried to use
nsMemory::Clone(), but got "unresolved external" error. That mean I need to
include some Mozilla .lib in my plugin project? Which one? Will my plugin be
able to allways find corresponding Mozilla dll?
If I use "new" keyword for reserving memory for my property (aMyProp),
will Mozilla/Firefox be able to properly free memory?
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom