Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Object contains non-primitive or non-blittable data

Object contains non-primitive or non-blittable data

Scheduled Pinned Locked Moved C#
helpxml
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dashprasannajit
    wrote on last edited by
    #1

    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();

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups