Did you add the cdecl or stdcall directive in the pascal code too?

The default is most likely fastcall which is not supported in neither C or C#