c#代码
namespace VideoCommiTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void menuItem1_Click(object sender, EventArgs e)
{
Application.Exit();
}
[DllImport("VideoMonitor\\a.dll")]
public static extern int InstanceVCIP(int nUserID, string szPwd, int nMode);
[DllImport("VideoMonitor\\a.dll")]
public static extern bool UpdateWindowVCIP(int nType);
[DllImport("VideoMonitor\\a.dll")]
public static extern void ExitVCIP();
private void button1_Click(object sender, EventArgs e)
{
int nID = 200001000;
string szPwd = "12345";
int nMode = 0;
InstanceVCIP(nID, szPwd, nMode);
}
}
}
请大家指教一下,我要怎么样退出dll而不会退出调用的c# exe
2 个解决方案
#1
PostQuitMessage MFC当中没问题吗,这个API就是会退程序的,建议用DESTORYWINDOW
#2
Application.Exit();程序就彻底结束了
用this.close();
用this.close();
#1
PostQuitMessage MFC当中没问题吗,这个API就是会退程序的,建议用DESTORYWINDOW
#2
Application.Exit();程序就彻底结束了
用this.close();
用this.close();