H
H. van Kooten via .NET 247
Hello,
I've got the following code:
namespace Test1
{
public struct stTest
{
public const string sDll = "C:\\Test1\\Test1.dll";
[DllImport(sDll)]
public static extern short Test1_Show(string Text);
[DllImport(sDll)]
public static extern short Test1_Add(string Text);
[DllImport(sDll)]
public static extern short Test1_Hide();
}
}
This all works, but I want the path to be changeable, something like:
public string sDll = ConfigurationSettings.AppSettings["DLL"]
but only constants are aloud.
The problem is, there are more Test1.dll's on the same PC and I want to switch between them.
Tnx,
I've got the following code:
namespace Test1
{
public struct stTest
{
public const string sDll = "C:\\Test1\\Test1.dll";
[DllImport(sDll)]
public static extern short Test1_Show(string Text);
[DllImport(sDll)]
public static extern short Test1_Add(string Text);
[DllImport(sDll)]
public static extern short Test1_Hide();
}
}
This all works, but I want the path to be changeable, something like:
public string sDll = ConfigurationSettings.AppSettings["DLL"]
but only constants are aloud.
The problem is, there are more Test1.dll's on the same PC and I want to switch between them.
Tnx,