I'm having issues importing a Delphi native dll to .net. I'm getting System.EntryPointNotFoundException.
Here's my delphi dll:
procedure ProcedimientoEncriptar(texto,clave,resultado:PChar); export stdcall;
var ...
begin
....
....
end;
exports
ProcedimientoEncriptar ;
And here's my DllImport on .Net (C#) code:
[DllImport("CryptoDLL.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto)]
public static extern void ProcedimientoEncriptar([MarshalAs(UnmanagedType.LPStr)]string texto, [MarshalAs(UnmanagedType.LPStr)]string clave, [MarshalAs(UnmanagedType.LPStr)] StringBuilder resultado);
Any help would be appreciated, Diego.
functionis meant to have a return value. But yours doesn't. And your C# code hasvoidreturn. Is your Delphi code reallyfunction? Isn't itprocedure. Your Delphi code in the question doesn't compile. Please use copy/paste when putting code in questions. Don't post fake code.procedurebut i changed it for testing purposes (i tried returning aPChar).PCharUnicode or not?