Should a DLL store information on a file or on the registry

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Neither is "right" or "wrong", or clearly better without more information from you.

Both require some access rights, though if the reg key is to current user then it could be more likely to be writable than the DLL's own folder. The temp folder should be writable though.

For multiple instances of the DLL running at once, a single, fixed registry key isn't safe, some will set it to 1 while others then set it back to 0. This is also a problem with a single, fixed file name.
 

cyberia

Platinum Member
Oct 22, 1999
2,535
0
0
There is also a performance issue with writing/reading a file. If it is a multi-user heavy used app, it is a major consideration.

Another option is to store the value in a database. Since your app accesses a database, you already have the "plumbing" for database access.