• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 677
  • Last Modified:

Alternative for "GetSetting" and "SaveSetting"

Hi

      I am using VB6. How can we store some data with in our application without writing it either to registry or to any external file?Presently i am using  "GetSetting" and "SaveSetting"
functions. Is there any alternative method to do the same. my need is to store some secure strings safely within the application, also while running the application i need to modify the string and update it safely back.
Thanks in Advance
Riyasjef
0
riyasjef
Asked:
riyasjef
3 Solutions
 
reapesukCommented:
I actually don't know of any way of storing and modifying data that would be still available once your program has terminated.

Obviously, you can store CONSTANT values by using CONST sValue as string ="my settings"

But you cannot write to a CONSTANT.

Why, can't you save the settings to an ini file for example in your programs install directory and encrypt the data? This way the settings are secure.

Jim
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
You can store the values in your EXE either as hardcoded values or as part of a resource file, but then you won't be able to modify them.

If you need the strings to be "secure" then you can encrypt them before writing them to the registry or to a file.  You can use something like MD5:

http://www.freevbcode.com/ShowCode.asp?ID=3779

~IM
0
 
Erick37Commented:
Although it is *possible* to store data at the end of your executable file it is not a good idea.  If you ever do an upgrade or version change all of the data will be erased.  You would need to encrypt it anyway to secure the information.

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now