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. How to call C# public function from inside Managed C++

How to call C# public function from inside Managed C++

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++helptutorialquestion
2 Posts 1 Posters 4 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.
  • A Offline
    A Offline
    Albert Pascual
    wrote on last edited by
    #1

    I have a C# front end DLL with a namescape FrontEnd From managed C++ I run the Dll and it works all good. Now I want to call a public function of one of the classes. In Managed C++ I have: FrontEnd::MyClass * pMyclass; That works fine but I cannot call any public class: pMyclass::MypublicFunction(arg1, arg2); Compiler error: error C2039: MypublicFunction: is not a member of 'FrontEnd::pMyclass' Any idea? Al

    A 1 Reply Last reply
    0
    • A Albert Pascual

      I have a C# front end DLL with a namescape FrontEnd From managed C++ I run the Dll and it works all good. Now I want to call a public function of one of the classes. In Managed C++ I have: FrontEnd::MyClass * pMyclass; That works fine but I cannot call any public class: pMyclass::MypublicFunction(arg1, arg2); Compiler error: error C2039: MypublicFunction: is not a member of 'FrontEnd::pMyclass' Any idea? Al

      A Offline
      A Offline
      Albert Pascual
      wrote on last edited by
      #2

      Fixed! namespace FrontEnd must be reserved. I changed the name and it works just fine!! Now I can create C# front ends and still use MC++ for my programs!! Awesome. I am still waiting for Microsoft to create a UI for Forms for MC++ Al:mad:

      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