Hi all,
I have a problem with loading the Delphi 7 dll in to my C# project! The dll delphi structure is as follows:
ShortString myfunction(shortstring par1, shortstring par2, shortstring par1);
I read somwhere that C# represenatation of ShortString is byte array so I did the following:
[DllImport("xxyyyykg.dll", EntryPoint = "NewLic", CallingConvention = CallingConvention.StdCall, ExactSpelling =
true, CharSet = CharSet.Ansi)]
public static extern byte [] NewLic(byte[] par1, byte[] par2, byte[] par3);
byte [] output= NewLic(par1, par2, par3);
but I get thye following error message:
Cannot marshal 'return value': Invalid managed/unmanaged type combination.
Thanks in advance,