Hi all,
I have a Delphi built DLL contaning a function which takes a argument having data type as double. I need to call this function from C# code.Here is the code:-
[DllImport("C:\\Smhita20\\Dmp.dll",CallingConvention = CallingConvention.StdCall)]
public static extern void PRINT_DOC(Double x, Double y, string printText, Int32 scriptCode);
And function call is like:-
Dmp.PRINT_DOC(X, Y, strTextToPrint, iScriptCode);
where, X & Y are double & strTextToPrint,iScriptCode are string & Int32 resp.
While calling the function I am getting the exception "PInvokeStackImbalance was detected".More info on this says that managed PInvoke signature does not match the unmanaged target signature.
Int32 & string data types are working for other dll function calls.But I am not sure about what to use for double? I tried float also but same error is coming.
Any help would be appreciated.Thanks.
Regards,
Saurabh.