Re: Retrieve 2D Variant Array
Robert Hastings <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <001601c4b66b$3e192e10$6400a8c0@seraph> |
You might try dumping the return to System.out to see what type it is? From groping the code, my guess is that your just getting one dimension of the result and the type is double[] There are a couple of places in the C++ code that mention that multi-dimension SAFEARRAYs are not supported. If the COM server is returning a multi-dimension SA then you have a couple of options. If you're a C++ coder you might be able to add support yourself. I think I tracked it down to Transform.cpp, but without running it I can't be sure. You could try another opensouce tool. You could sponsor someone to fix it. You could try a comercial tool. Robert ----- Original Message ----- From: "rick ong" <[email protected]> To: <[email protected]> Sent: Tuesday, October 19, 2004 8:43 PM Subject: Re: [JAWIN] Retrieve 2D Variant Array > This is what i have tried: > > Variant[][] obj = new Variant[10][]; > obj = (Variant [][])parentObj.get("Data"); > > However, it gives me a ClassCastException Error. From the documentation of > the COM object, the size of 1st dimension is 10, while the second dimension > is unknown. It should be storing double values. > > Is there anything i am missing here? Thanks. > > Rick > > >From: Roger I Martin PhD <[email protected]> > >Reply-To: Discussion of Java/Win32/COM integration with Jawin > ><[email protected]> > >To: [email protected] > >Subject: Re: [JAWIN] Retrieve 2D Variant Array > >Date: Tue, 19 Oct 2004 11:29:23 -0400 > > > >Abhishek J Ratani wrote: > > > >>I would suggest you to use JNIWrapper since their support is much stronger > >>and it just costs very little. I had tried to use this newsgroup and use > >>jawin, but nobody responded to my two e-mails. > >> > >>But who knows, they might respond to you. > >> > >>AJ > >> > >> > >> > >I'll try to get active again. Been traveling too much and my other > >projects are more interesting. However, there may be something I need > >Jawin for coming up. > > > >You have example you can show? > > > >There are limitations with the marshaling that can only be over come by > >a rewrite(I didn't write the original). I've talked of rewriting but > >every time I look at ATL and COM code my skin starts to itch. Either > >increases or decreases in the dynamic dimension of objects on the > >argument byte array are not handled by Jawin. Return from a function, yes. > > > >I'm out tomorrow but should be back Thursday,Friday. If you have a tlb > >that can be used as an example that would be great. > > > >Cheers, > > > >Roger > > _________________________________________________________________ > Find it on the web with MSN Search. http://search.msn.com.sg/ >