Peter Parente wrote:
Is it possible to use XPCOM from straight C code?

As I understand it, if someone creates C bindings for it. You'd need some C-to-C++ bridge, since the XPCOM objects are C++ objects and in particular use virtual functions...

Note that either the page at http://developer.mozilla.org/en/docs/XPCOM:Language_Bindings is wrong or I understand incorrectly. ;)

If it's possible to just make calls on XPCOM objects from C, then your example will work if you just get rid of the nsCOMPtr stuff and replace it with manual reference-counting. You might also need to change the NS_GET_IID thing to something else; not sure.

-Boris
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to