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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. communication problem between native c++ and managed c++ class

communication problem between native c++ and managed c++ class

Scheduled Pinned Locked Moved Managed C++/CLI
c++help
3 Posts 2 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.
  • S Offline
    S Offline
    s196675m
    wrote on last edited by
    #1

    HI I have a native c++ class which is responsible to open and process some files. I want to display the status of the files in StatusBar of my winform. I tried to created delegate and event in native c++ class but it does not allow. It says unmanaged c++ classes not allowed to create managed event. I don't want to change native c++ class to managed c++ class. Is there any other way I can pass status information from native c++ classes to my form class. I will appreciate your thought. thank you.

    M 2 Replies Last reply
    0
    • S s196675m

      HI I have a native c++ class which is responsible to open and process some files. I want to display the status of the files in StatusBar of my winform. I tried to created delegate and event in native c++ class but it does not allow. It says unmanaged c++ classes not allowed to create managed event. I don't want to change native c++ class to managed c++ class. Is there any other way I can pass status information from native c++ classes to my form class. I will appreciate your thought. thank you.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      You'll need at least a managed/ref class wrapper... Something like this maybe? How to: Associate Delegates to Unmanaged Functions[^] Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      1 Reply Last reply
      0
      • S s196675m

        HI I have a native c++ class which is responsible to open and process some files. I want to display the status of the files in StatusBar of my winform. I tried to created delegate and event in native c++ class but it does not allow. It says unmanaged c++ classes not allowed to create managed event. I don't want to change native c++ class to managed c++ class. Is there any other way I can pass status information from native c++ classes to my form class. I will appreciate your thought. thank you.

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        hmm...never mind my last reply - i think I misread your post. Maybe your native class could use a managed class object to handle the event/delegate stuff. Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        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