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#
  4. can we use .net dlls in win32 applicatiuons

can we use .net dlls in win32 applicatiuons

Scheduled Pinned Locked Moved C#
csharpdelphidata-structurestutorialquestion
6 Posts 3 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.
  • A Offline
    A Offline
    abyclassic
    wrote on last edited by
    #1

    Dear all, I have developed a .NET dll. I wants to use this dll in Win32(Delphi) applications. Is it possible to do the same. The data type of arguments passed to the functions in the dll & returned from it are compatible. The return type is a byte array & the arguments passed are string. But, when i used this dll in a Win32 application(developed using Delphi), EAccessViolation exception occurs. Can anyone suggest me how to use the .net dll in win32 applications? Thanks & regards, Abhilash

    S D 2 Replies Last reply
    0
    • A abyclassic

      Dear all, I have developed a .NET dll. I wants to use this dll in Win32(Delphi) applications. Is it possible to do the same. The data type of arguments passed to the functions in the dll & returned from it are compatible. The return type is a byte array & the arguments passed are string. But, when i used this dll in a Win32 application(developed using Delphi), EAccessViolation exception occurs. Can anyone suggest me how to use the .net dll in win32 applications? Thanks & regards, Abhilash

      S Offline
      S Offline
      spif2001
      wrote on last edited by
      #2

      Take a look at this article: http://www.codeproject.com/dotnet/cominterop.asp[^] I'm in the high-fidelity first class traveling set. And I think I need a Lear jet. -- modified at 9:46 Monday 9th January, 2006

      D 1 Reply Last reply
      0
      • A abyclassic

        Dear all, I have developed a .NET dll. I wants to use this dll in Win32(Delphi) applications. Is it possible to do the same. The data type of arguments passed to the functions in the dll & returned from it are compatible. The return type is a byte array & the arguments passed are string. But, when i used this dll in a Win32 application(developed using Delphi), EAccessViolation exception occurs. Can anyone suggest me how to use the .net dll in win32 applications? Thanks & regards, Abhilash

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Delphi is COM based, so you have to write your .DLL to expose its properties and methods to COM. You can find documentation on what you need to do here[^]. For a bit more friendly discussion, see the link the other poster gave you. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -- modified at 9:23 Monday 9th January, 2006

        A 1 Reply Last reply
        0
        • S spif2001

          Take a look at this article: http://www.codeproject.com/dotnet/cominterop.asp[^] I'm in the high-fidelity first class traveling set. And I think I need a Lear jet. -- modified at 9:46 Monday 9th January, 2006

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Clickety Cops[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          1 Reply Last reply
          0
          • D Dave Kreskowiak

            Delphi is COM based, so you have to write your .DLL to expose its properties and methods to COM. You can find documentation on what you need to do here[^]. For a bit more friendly discussion, see the link the other poster gave you. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -- modified at 9:23 Monday 9th January, 2006

            A Offline
            A Offline
            abyclassic
            wrote on last edited by
            #5

            i tried creating the tlb of the dll. The is created, But again the application gives the same exception. Whether we have to include this tlb also in the delphi(pascal) application? How can i acheieve that. At present i am declaring the functions in the dll in application & using it. Also, when we deploy the application & install it in a target PC, whether it will take care of the registration of the dll in the target PC also. Means, when we run the setup of the application, it must handle all the issues. If i go for a COM+ component, whether i can achieve the same? Thanks & Regards, Abhilash

            D 1 Reply Last reply
            0
            • A abyclassic

              i tried creating the tlb of the dll. The is created, But again the application gives the same exception. Whether we have to include this tlb also in the delphi(pascal) application? How can i acheieve that. At present i am declaring the functions in the dll in application & using it. Also, when we deploy the application & install it in a target PC, whether it will take care of the registration of the dll in the target PC also. Means, when we run the setup of the application, it must handle all the issues. If i go for a COM+ component, whether i can achieve the same? Thanks & Regards, Abhilash

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              i have no idea why that exception is being thrown. There's only about a thousand different causes. Try posting the code where the Exception is thrown. You have to take care of building a Setup project for your application, including any .DLL's it uses and their registration. Since your using a C# class library in your Delphi app, you also have to make sure that the .NET Framework is installed so the .DLL can be loaded and used. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              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