Click here to Skip to main content
16,017,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRegistry vs .Ini files. Pin
Anurag Gandhi31-May-07 7:37
professionalAnurag Gandhi31-May-07 7:37 
AnswerRe: Registry vs .Ini files. Pin
David Crow31-May-07 7:57
David Crow31-May-07 7:57 
GeneralRe: Registry vs .Ini files. Pin
Anurag Gandhi31-May-07 8:00
professionalAnurag Gandhi31-May-07 8:00 
QuestionRe: Registry vs .Ini files. Pin
David Crow31-May-07 8:15
David Crow31-May-07 8:15 
AnswerRe: Registry vs .Ini files. Pin
Anurag Gandhi31-May-07 8:17
professionalAnurag Gandhi31-May-07 8:17 
GeneralRe: Registry vs .Ini files. Pin
Maximilien31-May-07 8:45
Maximilien31-May-07 8:45 
GeneralRe: Registry vs .Ini files. Pin
David Crow31-May-07 8:45
David Crow31-May-07 8:45 
GeneralRe: Registry vs .Ini files. Pin
Matthew Faithfull31-May-07 8:25
Matthew Faithfull31-May-07 8:25 
When I faced a similar problem a few years ago I went for a binary file with fixed size records. Essentially you lay out your configuration settings in a struct and then read and write them as a simple binary record to an offset in the file based on size * record_number. I needed multiple records that could be read and written simultaneously. I had multiple copies of the software sharing the file over a network so I also used partial file locking to lock the individual records to prevent corruption. It all depends what sort of configuration data you want to store.
Obviously this method doesn't lead to portable or human readable/editable config information.Frown | :( If this is important you could use an ini file read once on startup and written once on shutdown with the same data. This way you get configuration backup and crash corruption protection as well Big Grin | :-D

Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: Registry vs .Ini files. Pin
Anurag Gandhi31-May-07 8:35
professionalAnurag Gandhi31-May-07 8:35 
AnswerRe: Registry vs .Ini files. Pin
#realJSOP1-Jun-07 3:21
professional#realJSOP1-Jun-07 3:21 
QuestionAnyone know of a VS2005 add-in to do this? Pin
Stick^31-May-07 6:45
Stick^31-May-07 6:45 
QuestionRe: Anyone know of a VS2005 add-in to do this? Pin
David Crow31-May-07 8:13
David Crow31-May-07 8:13 
AnswerRe: Anyone know of a VS2005 add-in to do this? Pin
Stick^31-May-07 8:46
Stick^31-May-07 8:46 
QuestionConvert a number in Cstring and then CString in number? Pin
Immunity1831-May-07 6:40
Immunity1831-May-07 6:40 
AnswerRe: Convert a number in Cstring and then CString in number? [modified] Pin
Roger Stoltz31-May-07 6:52
Roger Stoltz31-May-07 6:52 
GeneralRe: Convert a number in Cstring and then CString in number? Pin
Immunity1831-May-07 8:13
Immunity1831-May-07 8:13 
GeneralRe: Convert a number in Cstring and then CString in number? Pin
Immunity1831-May-07 8:17
Immunity1831-May-07 8:17 
GeneralRe: Convert a number in Cstring and then CString in number? Pin
Roger Stoltz31-May-07 8:19
Roger Stoltz31-May-07 8:19 
GeneralRe: Convert a number in Cstring and then CString in number? Pin
jmjack8823-Dec-09 21:02
jmjack8823-Dec-09 21:02 
Questiongetting the class members to pop up? Pin
ldsdbomber31-May-07 6:03
ldsdbomber31-May-07 6:03 
AnswerRe: getting the class members to pop up? Pin
David Crow31-May-07 6:11
David Crow31-May-07 6:11 
GeneralRe: getting the class members to pop up? Pin
ldsdbomber31-May-07 6:25
ldsdbomber31-May-07 6:25 
GeneralRe: getting the class members to pop up? Pin
David Crow31-May-07 6:31
David Crow31-May-07 6:31 
GeneralRe: getting the class members to pop up? Pin
Vaclav_31-May-07 16:36
Vaclav_31-May-07 16:36 
QuestionUnicode setting bby default in IDE Pin
tom groezer31-May-07 5:10
tom groezer31-May-07 5:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.