|
This is a c # call to c ++ to see if it helps you
Use namespace:
using System.Runtime.InteropServices;
using System.Text;
///////////////////////////////////////////////////////// ///////////////////
Put the dll in the corresponding bin directory
Declare the dll:
[DllImport ("msDll.dll")]
public static extern int CalculateStr (StringBuilder szExp, out double pfOut, StringBuilder szErr, int nErrLen);
Instructions:
StringBuilder strT1 = new StringBuilder (100);
double fResult = 0;
int nRet;
StringBuilder szErr = new StringBuilder (30);
strT1.Append ("1 / sin90");
nRet = CalculateStr (strT1, out fResult, szErr, 30);
if (nRet == 1)
{
Response.Write (fResult);
}
else
{
Response.Write (szErr);
}
///////////////////////////////////////////////////////// /// |
|