Solved

Alternative for "GetSetting" and "SaveSetting"

Posted on 2004-10-01
3
658 Views
Last Modified: 2012-05-07
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
Comment
Question by:riyasjef
3 Comments
 

Assisted Solution

by:reapesuk
reapesuk earned 100 total points
Comment Utility
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
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 300 total points
Comment Utility
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
 
LVL 32

Assisted Solution

by:Erick37
Erick37 earned 100 total points
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

728 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

10 Experts available now in Live!

Get 1:1 Help Now