How to call DLL in C# .Net

I have created a DLL in .net.I try use this dll but the next error occurs:“External function not found”

The DLL contains a class “ClassX” and a function “FunctionY”

I insert the dll in “C:\lotus\domino” in the server and I try use it in a server agent.

The declaration: Declare Function FunctionY Lib “c:\lotus\domino\NameDLL.dll” Alias “FunctionY” (x As String, y As String, z As String, b As String) As Long

And I use it: s = FunctionY(“…”,“…”,“…”,“…”)

Is possible use a .NET dll? I have used C function but I am not sure if is possible with C# NET dll.

Thanks in advanced

Subject: How to call DLL in C# .Net

I don’t think your approach is going to work.

C# compiles to IL (Intermediate Language), and not to native bytecode.

Lotus Notes can only call dll’s that contain native bytecode (as generated by C,C++ and VB6).

Greetz,

Jeroen.

Subject: RE: How to call DLL in C# .Net

Ok thanks you.

Finally I resolved this, creating a console application in .net tha use the dll and I call the “.exe” from Domino agent with the command shell