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. Other Discussions
  3. IT & Infrastructure
  4. Mixing Managed and UnManaged Code

Mixing Managed and UnManaged Code

Scheduled Pinned Locked Moved IT & Infrastructure
c++questionlounge
2 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.
  • L Offline
    L Offline
    Like2Byte
    wrote on last edited by
    #1

    I'd like to ask the general community their feelings/experiences pertaining to the use of placing managed code into existing un-managed projects/solutions (specifically, a MFC project). What have your experiences been - Positive or Negative? How much overhead does an un-managed project's code-base incur when managed code is inserted into an existing MFC un-managed solution? Know any good places to start for mixing managed and unmanaged code? Thank you, l2b

    M 1 Reply Last reply
    0
    • L Like2Byte

      I'd like to ask the general community their feelings/experiences pertaining to the use of placing managed code into existing un-managed projects/solutions (specifically, a MFC project). What have your experiences been - Positive or Negative? How much overhead does an un-managed project's code-base incur when managed code is inserted into an existing MFC un-managed solution? Know any good places to start for mixing managed and unmanaged code? Thank you, l2b

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

      I've had nothing but a positive experience mixing managed/unmanaged code. The largest overhead is the .NET framework, depending on how much of it you use. A good place to start is compiling your MFC code with the /clr switch. The only cpp modules that need to be compiled with /clr are the ones that have managed code. You can also control what gets compiled managed/unmanaged at the function level using the #pragma managed/ #pragma unmanaged directives. You'll of course want to understand managed programming and understand C++/CLI, which is esentially a different language than C++. .NET Programming Guide[^] 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