G
Guest
Hi,
I have a general DLL "genDLL.dll",this dll open other dlls by calling
generalDll.openDll("dll1.dll").
I mad a form with got dll name in new,and then this for open the new dll by calling the openDll function.
the problem is when I make more than one instance of this Form from MDI the All form work with same dll even if thay are deferent.
The following Is what I do in MDI form :
1- childForm childForm_1 = new childForm("Dll1.dll");
2- childForm childForm_2 = new childForm("Dll2.dll");
3- childForm childForm_3 = new childForm("Dll3.dll");
************
in childForm
***********
private string dllFileName;
public childForm(string FileName)
{
this.dllFileName = FileName;
}
[DllImport("generalDll.dll")]
extern static int OpenDll(string DllName);
private void MemoryShow_Load(object sender, System.EventArgs e)
{
OpenDll(dllFileName);
}
How to creat new DLL instance?
I have a general DLL "genDLL.dll",this dll open other dlls by calling
generalDll.openDll("dll1.dll").
I mad a form with got dll name in new,and then this for open the new dll by calling the openDll function.
the problem is when I make more than one instance of this Form from MDI the All form work with same dll even if thay are deferent.
The following Is what I do in MDI form :
1- childForm childForm_1 = new childForm("Dll1.dll");
2- childForm childForm_2 = new childForm("Dll2.dll");
3- childForm childForm_3 = new childForm("Dll3.dll");
************
in childForm
***********
private string dllFileName;
public childForm(string FileName)
{
this.dllFileName = FileName;
}
[DllImport("generalDll.dll")]
extern static int OpenDll(string DllName);
private void MemoryShow_Load(object sender, System.EventArgs e)
{
OpenDll(dllFileName);
}
How to creat new DLL instance?