logo       

Re: Marshaling a byte array by ref: msg#00003

windows.devel.jawin

Subject: Re: Marshaling a byte array by ref

Look at http://jawinproject.sourceforge.net/instruction_docs.html under
the "P" instruction. Also, it depends upon what *kind* of byte array you
mean.

A "naked" C byte array from a traditional DLL can be passed in using the
documented method on instruction_docs.html. If you want the native code
to modify your byte array and then get the same reference (results of
native code's operations) back into Java, and there isn't a "getter"
method in your DLL to retrieve this pointer again, you might have a
problem.

I'm not sure about arrays of COM types or Visual Basic SAFEARRAYs. These
can probably be constructed with the correct ordering and padding
(appending or prepending the length of the array if I recall correctly)
but I'm not sure how to do this.

If you are invoking a method that's sitting on top of the COM
architecture, by all means try and use the Jawin Type Browser to
generate the correct code. If it doesn't work, post the generated stub
and we'll see if we can patch it up.

Sean


-----Original Message-----
From: Discussion of Java/Win32/COM integration with Jawin
[mailto:JAWIN@xxxxxxxxxxxxxxxxxxx] On Behalf Of Al Harper
Sent: Tuesday, July 11, 2006 1:53 PM
To: JAWIN@xxxxxxxxxxxxxxxxxxx
Subject: [JAWIN] Marshaling a byte array by ref

Can JAWIN marshall a byte array by ref? If so how?

Al Harper



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise