Hi All,
This is a problem which is eating my head from several days.
I have a structure which contains an array of elements as
public byte[] pinNumbers;
To use it in my C# class i need to marshall it as
[MarshalAs(Unman agedType.ByValA rray, ArraySubType = UnmanagedType.U 1, SizeConst = 6)]
public byte[] pinNumbers;
But here using this marshalling technique , I was forced to pass a fixed size for the array as SizeConst = 6,
but now i have several arrays which are dynamic arrays whose sizeconst has to be determined at the runtime.
How can i Marshal dynamic arrays using any marshalling technique ?
please provide me with a solution as i have tried a lot to marshal arrays using other marshalling styles as well.
Thanks
Eric Haas
This is a problem which is eating my head from several days.
I have a structure which contains an array of elements as
public byte[] pinNumbers;
To use it in my C# class i need to marshall it as
[MarshalAs(Unman agedType.ByValA rray, ArraySubType = UnmanagedType.U 1, SizeConst = 6)]
public byte[] pinNumbers;
But here using this marshalling technique , I was forced to pass a fixed size for the array as SizeConst = 6,
but now i have several arrays which are dynamic arrays whose sizeconst has to be determined at the runtime.
How can i Marshal dynamic arrays using any marshalling technique ?
please provide me with a solution as i have tried a lot to marshal arrays using other marshalling styles as well.
Thanks
Eric Haas
Comment