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. Urgent : dll function?

Urgent : dll function?

Scheduled Pinned Locked Moved C#
helpquestionc++
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.
  • E Offline
    E Offline
    E6AD
    wrote on last edited by
    #1

    Dear All, I am trying to call a function from an Intel dll that's originally written in C/C++. It's original prototype is : HIGHGUI_API IplImage* cvvLoadImage( const char* filename ); I have marshalled it as : [DllImport("highgui.dll")] [return : MarshalAs(UnmanagedType.Struct)] unsafe public static extern IplImage * cvvLoadImage(string filename); when I try to run it ,I get the following error.Does anyone know how can I fix that? Error: Cannot take the address or size of a variable of a managed type ('IplImage') I have marshaled the originally struct IplImage into : [StructLayout(LayoutKind.Sequential)] unsafe public struct IplImage { .... }; Best Regards, E.A.

    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