Problem with passing a Byte[] array.

Using (or providing) Microsoft.NET Classes

Problem with passing a Byte[] array.

Postby norbertjurkiewicz84 on Thu Aug 30, 2012 9:22 pm

Hi all,

I have the following problem and I'm hoping it's something I'm overlooking.

On one of my machines it works perfect and not at all on another.

I have a method that requires me to pass a Byte[] array.

This works on one machine and fails on another.
Code: Select all
context.Initialize⊂data


The one it fails on, I need to do something like this.
Code: Select all
 ConvertToByteArray←{
     arr←Array.CreateInstance System.Byte(⍴⍵)
     data←(⍳⍴⍵),¨⍵
     _←{0::⍵ ⋄ arr.Set ⍵}¨data
     arr
 }

   arr←ConvertToByteArray data
   context.Initialize arr


Can anyone shed light on why it works on one system and not the other.
(It's the little things that make the difference :-)
User avatar
norbertjurkiewicz84
 
Posts: 62
Joined: Mon Nov 01, 2010 7:26 pm

Re: Problem with passing a Byte[] array.

Postby StefanoLanzavecchia on Mon Sep 03, 2012 10:18 am

Sorry if my answer looks trivial, but given the information you share I didn't come up with anything better...
Might the actual
Code: Select all
data
depend on the machine? Have you checked its []DR where it works and where it fails?
User avatar
StefanoLanzavecchia
 
Posts: 109
Joined: Fri Oct 03, 2008 9:37 am


Return to Microsoft.NET

Who is online

Users browsing this forum: No registered users and 1 guest