can we use .net dlls in win32 applicatiuons
-
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
-
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
-
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
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
-
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
Clickety Cops[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
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
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
-
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
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