View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.dotnet.languages.csharp
Tasos Vogiatzoglou Tasos Vogiatzoglou is offline
external usenet poster
 
Posts: 1
Default How to call functions of a DLL in Excel and in a .net project

1) You have to declare the functions of the dll in a vba macro in order
to do that. For example :
Declare Function DoCalculation Lib "YourDll" (ByVal value As Long) As
Long

2) You have to use PInvoke, .NET's mechanism for calling unmananaged
Dlls.
For a comprehensive reference you can check :
http://msdn2.microsoft.com/en-us/lib...3k(VS.80).aspx

Regards,
Tasos