请教调用dll的问题
Fanyi.dll是要调用的使用Delphi做的dll库, Form2show是Delphi代码中的一个过程,以下的代码报错,不知何故?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[DllImport("Fanyi.dll", CallingConvention = CallingConvention.StdCall)]
public static extern Form2show;
private void button1_Click(object sender, EventArgs e)
{
Form2show;
}
}
}