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 / C++ / MFC
  4. Calling .NET DLL from MFC App

Calling .NET DLL from MFC App

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++question
9 Posts 5 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
    Shivarudrayya H
    wrote on last edited by
    #1

    Hi Friends, I want to develop a dll in .Net to send email (using namespace System.Web.Mail),then i want to call it in MFC application. So i want to know whether is it possible to call .Net dll in MFC App?? If yes,let me know in detail. Thanx in advance..

    Reagards Shiva

    S J J H 4 Replies Last reply
    0
    • S Shivarudrayya H

      Hi Friends, I want to develop a dll in .Net to send email (using namespace System.Web.Mail),then i want to call it in MFC application. So i want to know whether is it possible to call .Net dll in MFC App?? If yes,let me know in detail. Thanx in advance..

      Reagards Shiva

      S Offline
      S Offline
      Saurabh Garg
      wrote on last edited by
      #2

      Google search for calling managed dll from native[^] gives this http://support.microsoft.com/kb/828736[^] -Saurabh

      S 1 Reply Last reply
      0
      • S Saurabh Garg

        Google search for calling managed dll from native[^] gives this http://support.microsoft.com/kb/828736[^] -Saurabh

        S Offline
        S Offline
        Shivarudrayya H
        wrote on last edited by
        #3

        True, But I am using MS Visual Studio 6.0. How to do it in that? any idea..?

        Reagards Shiva

        S 1 Reply Last reply
        0
        • S Shivarudrayya H

          True, But I am using MS Visual Studio 6.0. How to do it in that? any idea..?

          Reagards Shiva

          S Offline
          S Offline
          Saurabh Garg
          wrote on last edited by
          #4

          Well you cannot create a managed dll in VC++ 6.0 so you have to use at least VC 2002 for that purpose. Once you create a managed dll it can consumed from any COM compatible language. So you can call it from VC++ 6.0. -Saurabh

          1 Reply Last reply
          0
          • S Shivarudrayya H

            Hi Friends, I want to develop a dll in .Net to send email (using namespace System.Web.Mail),then i want to call it in MFC application. So i want to know whether is it possible to call .Net dll in MFC App?? If yes,let me know in detail. Thanx in advance..

            Reagards Shiva

            J Offline
            J Offline
            Javed Akhtar Ansari
            wrote on last edited by
            #5

            You can do this. you just need to add a reference to the dll in the Proect\Property window under the COmmon Property\Refernece link. Click to the add new reference button and browse to the you .net dll. You can now use your dll in MFC. You should use gcnew insteasd of new for creating an object to a managed class.

            Javed A Ansari Software Developer Hyderabad, India

            S 1 Reply Last reply
            0
            • J Javed Akhtar Ansari

              You can do this. you just need to add a reference to the dll in the Proect\Property window under the COmmon Property\Refernece link. Click to the add new reference button and browse to the you .net dll. You can now use your dll in MFC. You should use gcnew insteasd of new for creating an object to a managed class.

              Javed A Ansari Software Developer Hyderabad, India

              S Offline
              S Offline
              Shivarudrayya H
              wrote on last edited by
              #6

              I am using MS Visual Studio 6.0. There is no such options?

              Reagards Shiva

              1 Reply Last reply
              0
              • S Shivarudrayya H

                Hi Friends, I want to develop a dll in .Net to send email (using namespace System.Web.Mail),then i want to call it in MFC application. So i want to know whether is it possible to call .Net dll in MFC App?? If yes,let me know in detail. Thanx in advance..

                Reagards Shiva

                J Offline
                J Offline
                jhwurmbach
                wrote on last edited by
                #7

                Shivarudrayya H wrote:

                So i want to know whether is it possible to call .Net dll in MFC App?? If yes,let me know in detail.

                Yes, it is. See here[^]

                Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all.
                Douglas Adams, "Dirk Gently's Holistic Detective Agency"

                1 Reply Last reply
                0
                • S Shivarudrayya H

                  Hi Friends, I want to develop a dll in .Net to send email (using namespace System.Web.Mail),then i want to call it in MFC application. So i want to know whether is it possible to call .Net dll in MFC App?? If yes,let me know in detail. Thanx in advance..

                  Reagards Shiva

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #8

                  See this[^] thread.

                  S 1 Reply Last reply
                  0
                  • H Hamid Taebi

                    See this[^] thread.

                    S Offline
                    S Offline
                    Shivarudrayya H
                    wrote on last edited by
                    #9

                    I am using Visual Studio VC++ 6.0. But that artical is specific to Visual Studio 2005..!!

                    Reagards Shiva

                    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