P
PromisedOyster
We have an executable that uses an App.Config file to hold things such
as database connection strings etc.
We now want to write a wrapper DLL around that executable to expose
functionality to integrate with another app.
Therefore we aim to have one new executable talking to the wrapper DLL
that in turn talks to the original app. Although the original app is
an executable, it can be treated like a DLL.
Ideally what I want is for the new executable to use the keys in the
App.config from the original application that is somehow set from the
wrapper DLL.
ie in the new application it will call something like:
WrapperDLL.Init();
The method Init() in wrapper DLL will in turn get the App.Config from
the original application and set it for the new executable:
ie something like:
class WrapperDLL
{
void Init()
{
Configuration c =
ConfigurationManager.OpenExeConfiguration("test.exe");
// Then somehow use this configuration as the current App.Config ??
This is where I am lost
}
}
How best can I achieve this?
as database connection strings etc.
We now want to write a wrapper DLL around that executable to expose
functionality to integrate with another app.
Therefore we aim to have one new executable talking to the wrapper DLL
that in turn talks to the original app. Although the original app is
an executable, it can be treated like a DLL.
Ideally what I want is for the new executable to use the keys in the
App.config from the original application that is somehow set from the
wrapper DLL.
ie in the new application it will call something like:
WrapperDLL.Init();
The method Init() in wrapper DLL will in turn get the App.Config from
the original application and set it for the new executable:
ie something like:
class WrapperDLL
{
void Init()
{
Configuration c =
ConfigurationManager.OpenExeConfiguration("test.exe");
// Then somehow use this configuration as the current App.Config ??
This is where I am lost
}
}
How best can I achieve this?