Re: Binary data to javaScript

Shaun Savage <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpcom
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
OK now I am getting something into the XPCOM, the problem is I don;t 
know what.

in JavaScaript

var nary = new Array();
nary[0] = document.images[0];
var ocnt = [];

  comp.func(nary,1, oary, ocnt);

when I break in the func I see a pointer to something.  but I don't any 
other pointers in the memory "x/20 img"

I don;t even know what question I should ask now.  I want to get access 
to the image data in a .gif and .png in a <img > html document

Shaun


Christof Meerwald wrote:
> On Sat, 06 Jul 2002 23:12:20 -0700, Shaun Savage wrote:
> 
>>How do you get binary data from XPCOM to JavaScript.
> 
> 
> You have to use an octet array:
> 
> void func([array, size_is(length)] in octet data, in unsigned long length,
>           [array, size_is(out_len)] out octet out_data,
> 	  out unsigned long out_len);
> 
> 
> 
>>I am tring to do it as a string (in idl).
> 
> 
> A XPCOM string is always zero-terminated and ASCII only (7 bits).
> 
> 
> bye, Christof
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.