Hello,
Awhile ago I asked you another question(Click here to view the question).
This is my problem when using that source file you gave me:
public unsafe struct tPacket_5000_E
{
public Int16 size;
public Int16 opcode;
public byte securityCount;
public byte securityCRC;
public byte flag;
fixed byte blowfish[8]; //Please NOTE THIS
public Int32 seedCount;
public Int32 seedCRC;
public fixed Int32 securityseed[19];
};
The struct is marked as "Unsafe" ,because of the blowfish array.I couldn't find any other way to declare an array inside structure.
The problem: When I parse the packet into that structure,the function doesn't put anything in blowfish[8],it's like it doesnt exist.Instead it puts the bytes in seedCount and seedCRC instead in blowfish or securityseed. They are always empty
This is my code:
tPacket_5000_E packet = new tPacket_5000_E();
packet = (tPacket_5000_E)CDynamicCastHelper.CastIntoFields(packet, data2, CastOptions.ReverseDWord | CastOptions.ReverseDWord);
Why it doesn't work for arrays? Is it ,because it's unsafe?
Thanks in advance!