i'm trying to use dll written in c# but, i don't know how to do it .
can anyone help me?
thx
samchanfs wrote:i'm trying to use dll written in c# but, i don't know how to do it .
can anyone help me?
thx
Declare {Sub | Function} Name Lib "Libname" [Alias "Aliasname"] [Parameter] [As Type]
__declspec(dllexport) double add2numbers(double a, double b)
{
return a + b;
}
?add2numbers@@YANNN@Z
Declare Function addnumbers Lib "path\filename.dll" Alias "?add2numbers@@YANNN@Z" (ByVal a As Double,ByVal b As Double) As Double
Function Add(a As double,b As Double) As Double
Add = addnumbers(a,b)
End Function
samchanfs wrote:I can't find the Aliasname in C# dll and when i use the function it have an error at this code
Declare Function myFirstDll Lib "c:/testdll.dll" Alias "myFirstDll" (ByVal a as string) As String
it was show me an error "basic runtime error sub-procedure or function procedure not defined"
Edit: I guess I should be a bit more constructive. So please look in the External Programs subforum of the Macro forum for some ideas how to work with C# |
extern "C" __declspec(dllexport) double add2numbers(double a, double b)
{
return a + b;
}
Users browsing this forum: No registered users and 18 guests