Author Topic: Configuration file with DLL  (Read 1449 times)

0 Members and 1 Guest are viewing this topic.

GEURT

  • Guest
Configuration file with DLL
« on: November 27, 2011, 03:22:16 AM »
Morning,
I had a need for a configuration file that my DLL can access and specifically in xml format. I did not want to develop a registry version nor the older .ini version for personal preferences.

Lots of research had plenty of config files attached to an .exe file , but no config files for a DLL and according to many sources, not possible. Well I chanced on this http://www.codeproject.com/Tips/199441/DLL-with-configuration-file.aspx at CodeProject and it works a charm.

Hope it can help others as well.

Cheers

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: Configuration file with DLL
« Reply #1 on: November 28, 2011, 12:15:30 PM »
Another option is using "Settings".
If you are using Visual Studio go to your project properties page.
There should be a "Settings" tab.
You can add settings of various types there.
Visual Studio handles the heavy lifting but you'll get a settings file that works with your dll.
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions

BlackBox

  • King Gator
  • Posts: 3770
Re: Configuration file with DLL
« Reply #2 on: November 28, 2011, 01:32:29 PM »
Very helpful; Thanks for sharing. :beer:
"How we think determines what we do, and what we do determines what we get."