Object contains non-primitive or non-blittable data
-
Hi, As per the following code, I am getting an error in the line i.e. gchRequest = GCHandle.Alloc(Settings, GCHandleType.Pinned); -- Object contains non-primitive or non-blittable data.Please help me anyone if knows byte[] byteData = null; string CH, GET, PATH, XML; m_Client = new MCLClient(); UTF8Encoding utf = new UTF8Encoding(); byte[][] Settings = new byte[4][]; Settings[0] = new byte[aName.Length]; Settings[1] = new byte[aMethod.Length]; Settings[2] = new byte[aPath.Length]; Settings[3] = new byte[aData.Length]; //encode utf.GetBytes(aName, 0, aName.Length, Settings[0], 0); utf.GetBytes(aMethod, 0, aMethod.Length, Settings[1], 0); utf.GetBytes(aPath, 0, aPath.Length, Settings[2], 0); utf.GetBytes(aData, 0, aData.Length, Settings[3], 0); gchRequest = GCHandle.Alloc(Settings, GCHandleType.Pinned); MPACKET Packet = new MPACKET(); //fill packet with send buffer Packet.m_nSize = 10240; Packet.m_pData = gchRequest.AddrOfPinnedObject();