Solved

DLL's, Interop and App.Config.

Posted on 2009-06-29
1
996 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
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now