Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 246829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:12:18+00:00 2026-05-11T21:12:18+00:00

I’ve been working on a .NET library. Of course .NET has a good way

  • 0

I’ve been working on a .NET library. Of course .NET has a good way of working with configurations, and therefore I can document to library users what they should put in their app.config.

However I’ve also to expose the library as a COM object, for legacy support. Some users of the library will be VB6 applications, which doesn’t have a app.config concept.

I know I can “fudge” the file using OpenExeConfiguration, along with naming, but that causes me other issues.

Is there a common way to initialise your COM based library? Worst case, I can expose an initialise method, which takes all of the initialisation parameters as individual parameters, but I fear that this makes it difficult to add new initialisation parameters, as it results in breaking the API interface.

I guess I’m thinking of passing something like an Array of key, value pairs, but before I do this, is there a “standard” way that I’m not considering?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:12:18+00:00Added an answer on May 11, 2026 at 9:12 pm

    Hmmm, check your assumptions.

    The app.config has nothing to do with whether VB6 is used in the exe. The app.exe.config thing is a .NET convention. When .NET code is loaded into an exe, it looks in .config for config settings. It does not matter if VB6 was used to create the exe.

    For example, if you build a COM component in .NET, then host it in dllhost.exe, your .NET logic will read its configuration from a file called dllhost.exe.config, located in the same dir as dllhost.exe (which is usually %windir%\system32). The fact that the dllhost.exe binary has no knowledge of the .config file is irrelevant.

    Aside from that, your plan to use a key/value pair for init is good. It is easy to use, flexible, extensible. You may want to do both – the config file and the Init() method, to allow Init to override things as necessary. In many cases the .config file is accessible to admins only, and not changeable. So you may need some way to provide user-definable settings, outside of the .exe.config.

    See also: How can I debug a VB6 project that has a .NET interop component?

    • answers to that question point out that when debugging, you should use vb6.exe.config for your config file, whereas when running you need app-name.exe.config .
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
In my XML file chapters tag has more chapter tag.i need to display chapters
I have an array which has BIG numbers and small numbers in it. I
I have been unable to fix a problem with Java Unicode and encoding. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.