Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to use my c# class library dll with other languages but it doesn't work well.
How can I deploy it.

What I have tried:

I used NuGet Gallery | Unmanaged Exports (DllExport for .Net) 1.2.7[^] reference it works if I use basic operations like sum or multiply. But don't work with complex operations.
And I used [^] Comvisible attribute but it doesn't show anything.
I choosed -->Properties-->Build-->Register for COM Interop

C#
   [ComVisible(true), InterfaceType(ComInterfaceType.InterfaceIsDual), Guid("AFCDA4B7-4925-4D57-8695-A9B916E220FA")]
   public interface IEXTERN
   {
       [ComVisible(true)]
       int Cikar();
   }

[ComVisible(true), ClassInterface(ClassInterfaceType.None), Guid("7E846187-31E1-4CEE-99D4-B5CC10617191")]
   public class EXTERN:IEXTERN
   {
       [ComVisible(true)]

       public int Cikar()
       {
           return 1;
       }
   }
Posted
Updated 3-Apr-17 2:36am
Comments
SImon Dolby 3-Apr-17 4:21am    
What languages are you trying to use the dll with?
amagitech 3-Apr-17 5:07am    
delphi

For any .net framework languages you just build the DLL.

Then navigate to the build output folder and copy into the directory of the program you're trying to use the dll in. Then import the library in the solution explorer. Then add an imports to the top of the class.
 
Share this answer
 
Comments
amagitech 3-Apr-17 8:36am    
It's for .net applications not for all languages.
It fixed itself with
Regasm
command.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900