ShaunO
5/14/2007 7:26:00 AM
Hi,
I am trying to call an old Delphi .dll
// DELPHI definition (should return an array of 256 chars)
function DiskSaveFooter(missionname,qlffilename,id:pchar):TCharArray; export;
// My C# definition
[DllImport("qn.dll",
CharSet=CharSet.Ansi,CallingConvention=CallingConvention.StdCall)]
public static extern char[] DiskSaveFooter(string missionname, string
qlffilename, string id);
// My C# Implementation
char []b = new char[256];
b = qn.DiskSaveFooter("mis1", "", "000:000");
I get the ERROR: Cannot marshal 'return value': Invalid managed/unmanaged
type combination.
Any suggestions please?