I actually have the very same problem, and also the problem of passing in an array as a single parameter, and the problem of exposing a member field as an array.

David


Murilo Camões Perrone wrote:
In my XPCOM component, I must use an single-parameter "byte array" , because I must reproduce an existent COM interface whose methods use managed arrays (sngle-parameter arrays are present on those interfaces). The XPIDL language defines that, for conventional arrays, an extra parameter indicating the array length should be used, and this is a problem for me. Exemple: In XPIDL I can define: void BinaryStringToByteArray ( in string BinaryString, _out unsigned long length, [array, size_is (length), retval] out octet data_ ); but I need this: _byte[]_ BinaryStringToByteArray ( in string BinaryString ); I need to use a byte[] compatible with Java and JavaScript native byte arrays. Currently the only solution I found is to use the wrappedJSObject property of an JavaScript defined component, but this does only work if the XPCom client is JavaScript too... Any ideas ? ------
Murilo Perrone
CertiSign
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to