Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to convert a byte array from ActiveX control to an Array object

Reply
Thread Tools

How to convert a byte array from ActiveX control to an Array object

 
 
Lei Lei Shi
Guest
Posts: n/a
 
      07-26-2007
Hello Everyone,

In my javascript, an ActiveX control returns a byte array, say block. But by
any means I just can not access it. The typeof operator says its time is
unknown, any call to this object will fail, either toArray or toString. Of
course, indexing by [] will fail. Then I tried type casting in the way I
know:

var test = (Object) block;
var test = (Array) block;
var test = (byte[]) block;
var test = (Object[]) block;
var test = (String)block;

But seems javascript doesn't support casting in that way. So I tried to
contruct object from that:

var test = new Object(block);
var test = new Array(block);
var test = new String(block);

But none of above let me access the bytes inside the array.

Is there anyone successed in getting a byte array from an ActiveX control?

Thanks,
Lei Lei Shi

 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      07-26-2007
Lei Lei Shi wrote:
> Hello Everyone,
>
> In my javascript, an ActiveX control returns a byte array, say block.
> But by
> any means I just can not access it. The typeof operator says its time is
> unknown, any call to this object will fail, either toArray or toString. Of
> course, indexing by [] will fail. Then I tried type casting in the way I
> know:
>
> var test = (Object) block;
> var test = (Array) block;
> var test = (byte[]) block;
> var test = (Object[]) block;
> var test = (String)block;
>
> But seems javascript doesn't support casting in that way. So I tried to
> contruct object from that:
>
> var test = new Object(block);
> var test = new Array(block);
> var test = new String(block);
>
> But none of above let me access the bytes inside the array.
>
> Is there anyone successed in getting a byte array from an ActiveX control?


You will likely get the help you need in a Javascript newsgroup.

--
Lew
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
convert form byte[4] to Int32 while retaining the binary value of the byte array jeff@foundrymusic.com C++ 20 09-07-2009 08:54 PM
ActiveX control in python vs ActiveX control in vb 6 (piece of code) vml Python 0 08-22-2007 09:57 AM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
Converting a Primative byte array to a Byte array object Kirby Java 3 10-08-2004 03:01 AM



Advertisments