很奇怪,我写的两个ATL COM组件在C#当中调用都没有问题,可是调用这个ocx就会崩溃。
调用方法如下:
public class WebForm1 : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
                    MyOcxLib.MyOcxClass pocx = new MyOcxLib.MyOcxClass();
                    string str1 = new string('\0', 100);
                    string str2 = new string('\0', 100);
                    pocx.myfun(str1, str2);//此处就会出错
        }
}
这个ocx是通过引用的办法加入的c#工程当中,不知道这样的处理是否正确,劳烦各位高手指点迷津