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. IJW or P/Invoke

IJW or P/Invoke

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++comperformance
6 Posts 4 Posters 20 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.
  • M Offline
    M Offline
    Madhu C
    wrote on last edited by
    #1

    I am looking some clarifications for the use of IJW and p/Invoke..... I have a DLL which is written in Visual C++ (NOT a COM component). I am planning to use that from Visual Basic.NET. Infact there is a VB code earlier written to call that DLL. Now the application is being rewritten in VB.NET and I want use that DLL. What are the ways I can use that DLL? I found the following ways (I am not 100% what I found are correct or not) 1) Use P/Invoke in Visual Basic.NET and call the functions in the DLL 2) Recompile the C++ DLL using IJW switch so that it will be a managed one. Since my VB.NET code is a managed one, I can access that..Is this approach correct? or do I need to write wrappers over managed C++ obtained after compiling with IJW switch to use in VB?(I heard that after compiling with IJW you can use only with managed C++ and not with any code written using other languages like VB.NET or C#) Whar is the performance difference between IJW and P/Invoke ? Can anyone give me an answer? Thanks in advance, Madhu.

    N 1 Reply Last reply
    0
    • M Madhu C

      I am looking some clarifications for the use of IJW and p/Invoke..... I have a DLL which is written in Visual C++ (NOT a COM component). I am planning to use that from Visual Basic.NET. Infact there is a VB code earlier written to call that DLL. Now the application is being rewritten in VB.NET and I want use that DLL. What are the ways I can use that DLL? I found the following ways (I am not 100% what I found are correct or not) 1) Use P/Invoke in Visual Basic.NET and call the functions in the DLL 2) Recompile the C++ DLL using IJW switch so that it will be a managed one. Since my VB.NET code is a managed one, I can access that..Is this approach correct? or do I need to write wrappers over managed C++ obtained after compiling with IJW switch to use in VB?(I heard that after compiling with IJW you can use only with managed C++ and not with any code written using other languages like VB.NET or C#) Whar is the performance difference between IJW and P/Invoke ? Can anyone give me an answer? Thanks in advance, Madhu.

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

      Madhu C wrote: Recompile the C++ DLL using IJW switch so that it will be a managed one Very confusing! What's an IJW switch? Nish


      Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

      R 1 Reply Last reply
      0
      • N Nish Nishant

        Madhu C wrote: Recompile the C++ DLL using IJW switch so that it will be a managed one Very confusing! What's an IJW switch? Nish


        Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

        R Offline
        R Offline
        Rama Krishna Vavilala
        wrote on last edited by
        #3

        He is talking about the /clr switch in C++ compiler options. (BTW. He posted the same question to DOTNET mailing list)

        N 1 Reply Last reply
        0
        • R Rama Krishna Vavilala

          He is talking about the /clr switch in C++ compiler options. (BTW. He posted the same question to DOTNET mailing list)

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

          Rama Krishna wrote: He is talking about the /clr switch in C++ compiler options Oh! Thanks. That explains it :-) Rama Krishna wrote: He posted the same question to DOTNET mailing list) I am not a member there Nish


          Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

          M 1 Reply Last reply
          0
          • N Nish Nishant

            Rama Krishna wrote: He is talking about the /clr switch in C++ compiler options Oh! Thanks. That explains it :-) Rama Krishna wrote: He posted the same question to DOTNET mailing list) I am not a member there Nish


            Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

            M Offline
            M Offline
            Madhu _Cheriyedath
            wrote on last edited by
            #5

            I was talking about the /clr switch in C++ compiler options. BTW I got some really good answers about IJW and P/Invoke from DOTNET mailing list. Madhu.

            N 1 Reply Last reply
            0
            • M Madhu _Cheriyedath

              I was talking about the /clr switch in C++ compiler options. BTW I got some really good answers about IJW and P/Invoke from DOTNET mailing list. Madhu.

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

              Madhu _Cheriyedath wrote: I was talking about the /clr switch in C++ compiler options. Thanks. Nish


              Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

              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