The Mozilla String Guide: http://www.mozilla.org/projects/xpcom/string-guide.html
XPConnect & XPIDL FAQ: http://www.mozilla.org/scriptable/faq.html N Larry wrote:
Hello, I'm trying to port a scriptable Netscape 4.x plugin to Mozilla on the win32 platform and I'm having more than a bit of trouble with the scriptable part. I finally managed to compile an idl file using xpidl but after perusing the XPCOM documentation and various websites, I still can't figure out how to manipulate string parameters. I assume that since I am returning a string value, I can't simply allocate it locally and return a char* but rather need something akin to the COM BSTR and SysAllocString/SysFreeString to do this safely. I've declared an interface method: void GetSomething( in ACString i_Name, [retval] out ACString o_Value); which yields the C++ declaration NS_IMETHOD GetSomething(const nsACString & i_Name, nsACString & o_Value) = 0; Is this the way to go? Are there any code samples that show me how to use this nsACString class? And what library do I have to link with to use it? Do I have to actually build mozilla to get the library...? Grateful for any help... -Larry
_______________________________________________ Mozilla-xpcom mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
