|
-
January 23rd, 2009, 05:05 PM
#16
Re: Config.xml
sher what about forgeting XML like config file and writing it to a simple text file because your configuration is not so complicated.
Please rate my post if it was helpful for you.  Java, C#, C++, PHP, ASP.NET
SQL Server, MySQL
DirectX
MATH Touraj Ebrahimi
[toraj_e] [at] [yahoo] [dot] [com]
-
January 25th, 2009, 11:01 PM
#17
Re: Config.xml
 Originally Posted by toraj58
sher what about forgeting XML like config file and writing it to a simple text file because your configuration is not so complicated.
I too prefer something simple rather than going for complicated coding. What do you suggest about a .ini file?
-
January 26th, 2009, 09:11 AM
#18
Re: Config.xml
Please rate my post if it was helpful for you.  Java, C#, C++, PHP, ASP.NET
SQL Server, MySQL
DirectX
MATH Touraj Ebrahimi
[toraj_e] [at] [yahoo] [dot] [com]
-
January 26th, 2009, 11:10 PM
#19
Re: Config.xml
 Originally Posted by shers
my project name is bm. It is a dll project.
that is your "problem"
dlls cannot have xml settings files. The settings you create are compiled into the dll, which is why everything works on another machine without the config file.
Think about the logic of this for a second.. Dlls are supposed to encapsulate some common functionality. Ergo, why would they have settings? Everything they need should be provided at the time of calling. You'd be annoyed if you had to create an ini file specifying the source and destiantion path every time you used the file.copy command in the .net core dll wouldn't you?
-
January 27th, 2009, 12:28 AM
#20
Re: Config.xml
 Originally Posted by cjard
that is your "problem"
dlls cannot have xml settings files. The settings you create are compiled into the dll, which is why everything works on another machine without the config file.
Think about the logic of this for a second.. Dlls are supposed to encapsulate some common functionality. Ergo, why would they have settings? Everything they need should be provided at the time of calling.
You must be right.
Please see this link and read the section
Changing the Value of a Setting Between Application Sessions
http://msdn.microsoft.com/en-us/libr...69(vs.80).aspx
This is for exe.
You'd be annoyed if you had to create an ini file specifying the source and destiantion path every time you used the file.copy command in the .net core dll wouldn't you?
So what's the solution?
-
January 27th, 2009, 04:14 AM
#21
Re: Config.xml
I gave you it already.. Rethink your program so your DLL doesnt need settings! It's the program that should have settings.. DLLs should be suitably generic so that they do not need them, no?
Tell us more about your DLL and what setting youre trying to make. You said something about "default directory the user picks"? In what context do you mean?
-
January 27th, 2009, 11:45 PM
#22
Re: Config.xml
The app is pointed to a certain location in the shared network, as there are some images in some organised folders. The main purpose of this app is to display these images to the users like a library. This is a COM application where it is linked to AutoCAD. This dll will be loaded into AutoCAD and executed using commands. The network share drive I mentioned earlier may be subject to change in future. So if there is a config or ini file, then the person in charge can change the location without tampering the code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|