public int decode(wire obj, byte[] data, int size) { int len = bufflen; IntPtr st = query(obj._name()); while (bufflen < size) { bufflen *= 2; } if (bufflen != len) { buff = Marshal.ReAllocHGlobal(buff, (IntPtr)bufflen); } Marshal.Copy(data, 0, buff, size); return(obj._decode(buff, size, st)); }
public int decode(wire obj, byte[] data, int size) { int ret; IntPtr st = query(obj._name()); while (buffsize < size) { buffsize *= 2; } IntPtr buff = Marshal.AllocHGlobal(buffsize); Marshal.Copy(data, 0, buff, size); ret = obj._decode(buff, size, st); Marshal.FreeHGlobal(buff); return(ret); }
public int decode(wire obj, IntPtr data, int size) { IntPtr st = query(obj._name()); return(obj._decode(data, size, st)); }