Page 1 of 1

How to write new C++ XPCOM component?

Posted: 2021-04-18, 04:20
by djgpp
I want to use a piece of C++ code on JavaScript and I know the preferred way to do it is via XPCOM. I have read a bit on the internet but it's still not very clear to me.

Re: How to write new C++ XPCOM component?

Posted: 2021-04-18, 07:52
by New Tobin Paradigm
I don't know why you think we have any more technical knowledge than can be obtained by yourself on your own.

We collectively have experience but not every individual has the same experience as another. I believe none of us have written a cpp xpcom component from scratch though but some have worked with them even heavily modified one. I, however, have written a javascript xpcom component from scratch before though.. Once.

But back to the point, we all have access to everything that can be known or attained whether our individual skill set lets us to take effective advantage of it at any particular time or if we have had to do it yet is another question.

Personally, I am pretty useless with cpp. It doesn't click for me and Mozilla cpp is a unique thing sometimes.

Also, being conceptually vague is only going to result in conceptual and theoretical answers.

Re: How to write new C++ XPCOM component?

Posted: 2021-04-18, 20:10
by Kris_88
djgpp wrote:
2021-04-18, 04:20
I know the preferred way to do it is via XPCOM.
You can use ctypes instead.

Re: How to write new C++ XPCOM component?

Posted: 2021-04-19, 02:04
by New Tobin Paradigm
You can but it is sloppy and if the scale of what they want to accomplish is what I think it is.. It won't be sufficient.