问题描述
调用dll文件,在计算器页面点等号之后就收到网页无法显示的提示了,cs文件代码如下:usingSystem;usingSystem.Configuration;usingSystem.Data;usingSystem.Linq;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.HtmlControls;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Xml.Linq;usingSystem.Runtime.InteropServices;usingSystem.Text;usingSystem.Globalization;publicpartialclass_Default:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}[DllImport("D:\Re_数据链接库文件\WebSite\WebSite7\mydll.dll",EntryPoint="mycalcu",CharSet=CharSet.Ansi,CallingConvention=CallingConvention.StdCall)]//[DllImport("mydll.dll")]publicstaticexternStringBuildermycalcu(StringBuilderdesti,StringBuilders1,StringBuilders2,StringBuilders3);//publicstaticexternInt32mycalcu(strings1,char[]s2,char[]s3);//publicstaticexternInt32mycalcu(IntPtrs1,IntPtrs2,IntPtrs3);[DllImport("D:\Re_数据链接库文件\WebSite\WebSite7\mydll.dll",EntryPoint="mydll_add",CharSet=CharSet.Ansi,CallingConvention=CallingConvention.StdCall)]publicstaticexternInt32mydll_add(Int32n,Int32m);protectedvoidButton1_Click(objectsender,EventArgse){byte[]bb=newbyte[333];StringBuilders1=newStringBuilder(3000);s1.Append(TextBox1.Text.Trim());StringBuilders2=newStringBuilder(600);s2.Append(TextBox5.Text.Trim());StringBuilders3=newStringBuilder(20);//s3.Append(TextBox3.Text);s3.Append(RadioButtonList2.SelectedItem.Value.ToString());//Button1.Text=s1.ToString();//Button1.Text=Convert.ToString(mydll_add(88,100));//Console.ReadLine();StringBuilders4=newStringBuilder(3000);s4.Append(s3);//TextBox4.Text=s3.ToString();//TextBox4.Text=mydll_add(3,5).ToString();TextBox4.Text=mycalcu(s4,s1,s2,s3).ToString();//b1=System.Text.Encoding.Default.GetBytes("88.000008");//b2=System.Text.Encoding.Default.GetBytes("0.000008");//b3=System.Text.Encoding.Default.GetBytes("0.000008");//TextBox4.Text=s1.ToString();//StringBuilders4=newStringBuilder(344);//s4.Append(mycalcu(refb1,refb2,refb3).ToString());/*Encodinge1=Encoding.GetEncoding(936);byte[]b1=e1.GetBytes("999+22");byte[]b2=e1.GetBytes("0.009");byte[]b3=e1.GetBytes("0999+22");mycalcufun=(mycalcu)//Button1.Text=mydll_add(99999,8).ToString();Console.ReadLine();Console.Write(mycalcu(s1,s2,s3));Console.ReadLine();Console.Write(s1);Console.ReadLine();*/}protectedvoidTextBox4_TextChanged(objectsender,EventArgse){//this.TextBox4.Text=TextBox1.Text;}protectedvoidButton37_Click(objectsender,EventArgse){TextBox1.Text="";TextBox4.Text="";TextBox5.Text="";}protectedvoidButton38_Click(objectsender,EventArgse){TextBox1.Text+="pi";}protectedvoidButton11_Click(objectsender,EventArgse){TextBox1.Text+="e";}protectedvoidButton15_Click(objectsender,EventArgse){TextBox1.Text+="(";}protectedvoidButton16_Click(objectsender,EventArgse){TextBox1.Text+=")";}protectedvoidButton2_Click(objectsender,EventArgse){TextBox1.Text+="sin(";}protectedvoidButton3_Click(objectsender,EventArgse){TextBox1.Text+="cos(";}protectedvoidButton4_Click(objectsender,EventArgse){TextBox1.Text+="tan(";}protectedvoidButton5_Click(objectsender,EventArgse){TextBox1.Text+="cot(";}protectedvoidButton6_Click(objectsender,EventArgse){TextBox1.Text+="arcsin(";}protectedvoidButton7_Click(objectsender,EventArgse){TextBox1.Text+="arccos(";}protectedvoidButton8_Click(objectsender,EventArgse){TextBox1.Text+="arctan(";}protectedvoidButton9_Click(objectsender,EventArgse){TextBox1.Text+="arccot(";}protectedvoidButton13_Click(objectsender,EventArgse){TextBox1.Text+="ln(";}protectedvoidButton12_Click(objectsender,EventArgse){TextBox1.Text+="log(";}protectedvoidButton14_Click(objectsender,EventArgse){TextBox1.Text+="^";}protectedvoidButton32_Click(objectsender,EventArgse){TextBox1.Text+="factorial(";}protectedvoidButton34_Click(objectsender,EventArgse){TextBox1.Text+="ceil(";}protectedvoidButton33_Click(objectsender,EventArgse){TextBox1.Text+="floor(";}protectedvoidButton17_Click(objectsender,EventArgse){TextBox1.Text+="0";}protectedvoidButton18_Click(objectsender,EventArgse){TextBox1.Text+=".";}protectedvoidButton19_Click(objectsender,EventArgse){TextBox1.Text+="1";}protectedvoidButton20_Click(objectsender,EventArgse){TextBox1.Text+="2";}protectedvoidButton21_Click(objectsender,EventArgse){TextBox1.Text+="3";}protectedvoidButton22_Click(objectsender,EventArgse){TextBox1.Text+="4";}protectedvoidButton23_Click(objectsender,EventArgse){TextBox1.Text+="5";}protectedvoidButton24_Click(objectsender,EventArgse){TextBox1.Text+="6";}protectedvoidButton25_Click(objectsender,EventArgse){TextBox1.Text+="7";}protectedvoidButton26_Click(objectsender,EventArgse){TextBox1.Text+="8";}protectedvoidButton27_Click(objectsender,EventArgse){TextBox1.Text+="9";}protectedvoidButton36_Click(objectsender,EventArgse){TextBox1.Text="";}protectedvoidButton28_Click(objectsender,EventArgse){TextBox1.Text+="+";}protectedvoidButton29_Click(objectsender,EventArgse){TextBox1.Text+="-";}protectedvoidButton30_Click(objectsender,EventArgse){TextBox1.Text+="*";}protectedvoidButton31_Click(objectsender,EventArgse){TextBox1.Text+="/";}protectedvoidButton35_Click(objectsender,EventArgse){if(TextBox1.Text.Length!=0){TextBox1.Text=TextBox1.Text.Remove(TextBox1.Text.Length-1);}}protectedvoidButton41_Click(objectsender,EventArgse){TextBox1.Text+="exp(";}protectedvoidTextBox1_TextChanged(objectsender,EventArgse){}protectedvoidTextBox5_TextChanged(objectsender,EventArgse){}protectedvoidRadioButtonList2_SelectedIndexChanged(objectsender,EventArgse){}}