On 12/23/15 8:09 AM, 罗勇刚(Yonggang Luo) wrote:
>No, js-ctypes does not have any support for calling methods on C++
>classes. In fact, that functionality was WONTFIXed a while back:
>https://bugzilla.mozilla.org/show_bug.cgi?id=505907.
OK, I've done it with my own patch, indeed, I just want to calling C APIs
with
XPCOM pointers. So I implemented the following function to deal with my
situation:
[...]
+ /**
+ * getPointerForInterface
+ *
+ * Returns string representation of the pointer for a instance of the
interface
+ *
+ * @param aInstance - The instance of the interface
+ * @param aIID - IID of interface requested
+ * @return ACString in hex format with "0x" prepended, or empty if the
instance have no aIID
+ */
+ ACString getPointerForInterface(in nsISupports aInstance,
+ in nsIIDRef aIID);
Interesting. How does your code work in practice?
Cameron Kaiser
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform