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. #pragma managed/umanaged

#pragma managed/umanaged

Scheduled Pinned Locked Moved Managed C++/CLI
c++csharpvisual-studiowinformslinux
2 Posts 2 Posters 2 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.
  • P Offline
    P Offline
    Paul Ingles
    wrote on last edited by
    #1

    I'm starting to get back into trying VS.NET with regards to Managed C++. Originally I found the IDE pretty clumsy (since everything I had known and fought to learn in VS6 had moved or morphed :) but its starting to get a little easier to understand. I noticed that you can specify regions of code to be managed and unmanaged using the pragma directive, and was wondering how rigorously other developers used them? Do you explicity add the unmanaged command to the top of your classes, and then if a function does call managed code, this is then declared managed before unmanaging it afterwards? I was considering going all out C#, but there does seem to be quite a slow-down (and I'm still pining for the Doc/View architecture and Windows forms equivalent support for GUI extensions). I'm still debating over weather to use a .NET assembly for data access, and then make use of C++'s interoperability to develop a largely MFC based client, but calling into managed classes for accessing data. I presume its possible to use managed extensions with ATL too -- I'll probably end up doing one or two shell extensions, and possibly a few Office add-ins :) Thanks, Paul -- Paul "It's always the last drink that kills you." [a wise man] MS Messenger: paul@oobaloo.co.uk Sonork: 100.22446

    A 1 Reply Last reply
    0
    • P Paul Ingles

      I'm starting to get back into trying VS.NET with regards to Managed C++. Originally I found the IDE pretty clumsy (since everything I had known and fought to learn in VS6 had moved or morphed :) but its starting to get a little easier to understand. I noticed that you can specify regions of code to be managed and unmanaged using the pragma directive, and was wondering how rigorously other developers used them? Do you explicity add the unmanaged command to the top of your classes, and then if a function does call managed code, this is then declared managed before unmanaging it afterwards? I was considering going all out C#, but there does seem to be quite a slow-down (and I'm still pining for the Doc/View architecture and Windows forms equivalent support for GUI extensions). I'm still debating over weather to use a .NET assembly for data access, and then make use of C++'s interoperability to develop a largely MFC based client, but calling into managed classes for accessing data. I presume its possible to use managed extensions with ATL too -- I'll probably end up doing one or two shell extensions, and possibly a few Office add-ins :) Thanks, Paul -- Paul "It's always the last drink that kills you." [a wise man] MS Messenger: paul@oobaloo.co.uk Sonork: 100.22446

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      Generally I leave my code managed unless there is a good reason not to (performance, easier interop, etc.)

      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