Solved

DLL's, Interop and App.Config.

Posted on 2009-06-29
1
1,012 Views
Last Modified: 2013-11-08
I need to read the value of an app.config file from a .NET DLL through Interop from a VB6 app.
The DLL is part of a larger winform app - but I am just using the DLL for the Interop.
But of course you cannot read an app.config from just a DLL - it needs to be in an app with an exe file associated. I get nothing when I try and read the app.config using the usual .NET routines in this COM Interop situation.
So, how can this be done in real life?
Can I send my setting value through the interop into DLL for the .NET DLL to store this where it can be read as if the DLL had an app.config?
NOTE: I have tried reading froam the app directory but in Interop this appears to be the VB6 runtime directory.

0
Comment
Question by:BrianGilbert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
Woodz earned 125 total points
ID: 24736608
Have you tried using the ConfigurationManager.OpenExeConfiguration method, specifying the path to the config file?
0

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question