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. MFC APLICATION AND MANAGED CODE

MFC APLICATION AND MANAGED CODE

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++dotnetcomquestion
7 Posts 3 Posters 3 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.
  • I Offline
    I Offline
    imran_rafique
    wrote on last edited by
    #1

    if i creat an application of mfc dll and i want to use its classes in c# how will i use it? plz tell complete steps may i have to use /clr option in mfc dll application if yes why? may i haye to write mfc code in between namespace braces namespace mfcdll { } am i right? r00d0034@yahoo.com

    N 1 Reply Last reply
    0
    • I imran_rafique

      if i creat an application of mfc dll and i want to use its classes in c# how will i use it? plz tell complete steps may i have to use /clr option in mfc dll application if yes why? may i haye to write mfc code in between namespace braces namespace mfcdll { } am i right? r00d0034@yahoo.com

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      One option is to write an __gc wrapper for the unmanaged code Nish


      Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

      R I 2 Replies Last reply
      0
      • N Nish Nishant

        One option is to write an __gc wrapper for the unmanaged code Nish


        Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

        R Offline
        R Offline
        rbc
        wrote on last edited by
        #3

        Hi Nish, I am new to programming and have never heard of a __gc wrapper? Could you tell how I can find out more about __gc wrappers? Thanks

        N 1 Reply Last reply
        0
        • R rbc

          Hi Nish, I am new to programming and have never heard of a __gc wrapper? Could you tell how I can find out more about __gc wrappers? Thanks

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          See this article :- http://www.codeproject.com/managedcpp/cbwijw.asp for an example of __gc wrappers. Regards, Nish


          Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

          1 Reply Last reply
          0
          • N Nish Nishant

            One option is to write an __gc wrapper for the unmanaged code Nish


            Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

            I Offline
            I Offline
            imran_rafique
            wrote on last edited by
            #5

            can u tell me how to wrep csocket class ? plz nish r00d0034@yahoo.com

            N 1 Reply Last reply
            0
            • I imran_rafique

              can u tell me how to wrep csocket class ? plz nish r00d0034@yahoo.com

              N Offline
              N Offline
              Nish Nishant
              wrote on last edited by
              #6

              You don't need to wrap CSocket. Here is how you can use CSocket in an MC++ application using IJW

              AfxSocketInit();
              CSocket s;
              s.Create();
              String* cmd = "GET /\r\n\r\n";
              String* url = "www.google.com";
              if(s.Connect((CString)url,80))
              {
              s.Send((CString)cmd,cmd->Length);
              char buf[127];
              while(int n = s.Receive(buf,128))
              {
              buf[n]=0;
              System::Console::WriteLine(buf);
              }
              }
              s.Close();

              Nish


              Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

              I 1 Reply Last reply
              0
              • N Nish Nishant

                You don't need to wrap CSocket. Here is how you can use CSocket in an MC++ application using IJW

                AfxSocketInit();
                CSocket s;
                s.Create();
                String* cmd = "GET /\r\n\r\n";
                String* url = "www.google.com";
                if(s.Connect((CString)url,80))
                {
                s.Send((CString)cmd,cmd->Length);
                char buf[127];
                while(int n = s.Receive(buf,128))
                {
                buf[n]=0;
                System::Console::WriteLine(buf);
                }
                }
                s.Close();

                Nish


                Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                I Offline
                I Offline
                imran_rafique
                wrote on last edited by
                #7

                if u could tell that if i want to inherit a class from csocket that might be c# class how to do it ? relpy in the same way plz sketch a little code for that. thanks for above code you dont imagine how much it solve mine promblem. r00d0034@yahoo.com

                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