c# - Is it possible to create a 6400 byte integer? -


i have function can't alter because of protection , abstraction, , declared this:

getdevicelonginfo(int, int, ref int); 

in "ref int" argument passed said give 6400 bytes of information.

my question is, how can information in variable if choice have give function int32? can allocate more memory int32? possible achieve in way?

edit: can tell function uses ref int dump values in it, int size (size of information) not fixed, depends on option chosed in second parameter. can't @ function see how uses ref.

you can allocate int[] , pass function. hack don't see why should not safe.

var array = new int[6400 / sizeof(int)]; getdevice(..., ref array[0]); 

the array pinned clr duration of call.

note, ref called managed pointer clr. marshaled passing pointer , pinning object points to. int[] passed in same way (a pointer first element passed).


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -