No, it failed on the SetB with domain error when using Int64. Set fails with the domain error also.
On 10/12/2010 22:26, bill lam wrote: > Does it work if passing as int64[] ? > > Втр, 12 Окт 2010, David Mitchell писал(а): >> Some random notes: >> >> Function Get(jname As String, v) As Long >> Member of JDLLServerLib.JDLLServer >> Get variant value from J variable. >> >> Function GetB(jname As String, v) As Long >> Member of JDLLServerLib.JDLLServer >> Get variant value from J variable (BSTR). >> >> Function GetM(jname As String, jtype As Long, jrank As Long, jshape As Long, >> jdata As Long) As Long >> Member of JDLLServerLib.JDLLServer >> Get J variable description and memory addresses of shape and data. >> >> === >> >> http://www.jsoftware.com/jwiki/Guides/.NET%20Interop >> >> === >> >> I think >> >> Console.WriteLine("Orriginal int array value : " + >> (IntArrayToString(intArray))); >> Console.WriteLine("J returned int array value : " + >> (IntArrayToString((int[])intArray))); >> >> should be >> >> Console.WriteLine("Orriginal int array value : " + >> (IntArrayToString(intArray))); >> Console.WriteLine("J returned int array value : " + >> (IntArrayToString((int[])intArrayObj))); >> >> === >> >> Here is what I get with C# 2010 Express and J602-64: >> >> IntArray >> 34359738372 68719476751 180388626455 111164048 113747712 111035888 >> >> hfd IntArray >> 0800000004 >> 100000000F >> 2A00000017 >> 0006A03A90 >> 0006C7A700 >> 00069E45F0 >> >> The 32 bit C# int values look like they have been packed into 64 bit J >> integers >> (with garbage fill at the end.) >> >> -- >> David Mitchell >> >> >> On 9/29/2010 16:43, Martin Pelletier wrote: >>> Here, I made a little Visual Studio project to demonstrate the issue. If the >>> forwarding list allows attachments, then it's TestJApp.rar. If not, I will >>> follow up with a link. >>> >>> Those who have a 64-bit machine will be able to run it and see what I mean. >>> Essentially, follow the Main function in Program.cs. Insert a breakpoint on >>> the >>> last line (Console.ReadLine), where you will be able to test the resulting >>> value >>> in J, declared as "IntArray". >>> >>> Thanks for looking into this! >>> >>> Martin Pelletier >>> >>> >>> >>> ---------------------------------------------------------------------- >>> For information about J forums see http://www.jsoftware.com/forums.htm >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
