On Fr, 2015-12-11 at 17:15 -0200, luciano de souza wrote:
> Hello all,
>
> I want to use a DLL writen in Pascal to provide functions for a Excel VBA
> code:
>
> The example code of my DLL is:
> library CE;
> {$mode objfpc}
>
> uses
> Sysutils;
>
> function level(x1, x2: integer): integer; cdecl; export;
> begin
> result := x1 + 2*x2;
> end;
>
>
> exports
> level name 'level';
> end.
If you're on windows the declaration "cdecl" should be "stdcall".
HTH,
Marc
--
Marc Santhoff <[email protected]>
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal