Re: Marshaling a byte array by ref
"Mcnamara, Sean D" <[email protected]> Tue, 11 Jul 2006 14:40:03 -0400
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <57F935D6BB6B2543AF5D835DCE7CAF27024FA165@MD61EX100.ad.honeywell-tsi.com> |
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:[email protected]] On Behalf Of Al Harper Sent: Tuesday, July 11, 2006 1:53 PM To: [email protected] Subject: [JAWIN] Marshaling a byte array by ref Can JAWIN marshall a byte array by ref? If so how? Al Harper