[ djuka233 @ 28.05.2010. 13:47 ] @
DLL je napravljen u Delphi-u, i kao parametre u funkciji koristi Custom Delphi type-ove. Definicija funkcije: Code: function GetAttrbControls( Code : PChar; InputList: TItemList; var Values : TValArray): Boolean; stdcall; export; Definicija tipova: Code: type TItem = packed record Code : PChar; ItemValue: Variant; end; TItemList = array of TItem; TValArray = array of PChar; Trebalo bi da je nekako ovako, ali nešto je pogrešno: Code: [StructLayout(LayoutKind.Sequential)] public class Input { public string Code; public object ItemValue; }; [DllImport("Filename.dll", EntryPoint = "GetValues", CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] public static extern bool GetValues(string Code, Input[] InputList, ref StringBuilder[] Values); |