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. Managed C++/CLI
  4. Receiving A Byte Array from dll? [modified]

Receiving A Byte Array from dll? [modified]

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++data-structureshelptutorial
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.
  • M Offline
    M Offline
    majidbhutta
    wrote on last edited by
    #1

    Hello All! I have been unable to receive a Byte[] in MC++. Whats the right syntax this is the C# dll method. public byte[] GetPictureBytes(Image _Pic) { byte[] _rtval = null; MemoryStream mstr = new MemoryStream(); _Pic.Save(mstr, ImageFormat.Jpeg); _rtval = mstr.GetBuffer(); return _rtval; } Now i have to call this C# dll method in VC++.NET 2005 the syntax that i m using to call and receive this byte array is as follows but its creating some error. " array^ myImage = gcnew array^(1); myImage = dllobj->GetPictureBytes(_myImage); " OR "array^ myImage = gcnew array^(1); myImage = dllobj->GetPictureBytes(_myImage);" // dllobj is of C# dll Class type that contains metod GetPictureBytes(Image _Pic); // _myImage is Image type i have used some other combinations also to receive the Byte array but cant having some errors. Plz guide me writing correct syntax to receive this Byte array in VC++.Net THNX in Advance -- modified at 5:55 Wednesday 16th August, 2006

    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