Re: registry entry or file
r_z_aret_at_pen_fact.com
Date: 08/13/04
- Next message: Severian: "Re: registry entry or file"
- Previous message: Krzysztof Raszczuk: "Re: Moving a window with no titlebar"
- In reply to: Raj: "Re: registry entry or file"
- Next in thread: Severian: "Re: registry entry or file"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 13 Aug 2004 13:03:22 -0400
On Thu, 12 Aug 2004 08:41:02 -0700, Raj
<Raj@discussions.microsoft.com> wrote:
>
>Thanks for reply.
>
>Is there any specific use if I write my data in INI file instead of text
>file. Is there any specific format to follow in INI file.
An ini file _is_ a text file. If you are not sharing the file with any
other application, you can use your own format/syntax. Or you can use
GetPrivateProfileString and relatives. But note that they work with
registry, rather than ini files, under some circumstances. For more on
that, use google to look up threads that include that string and
contributions from me (at least one provides the info while correcting
misinformation from me).
>
>Which directory should I use for such a file. I want to secure data and make
>it read only. Should I copy it to system directory so that other users will
>not have write permission.
Good question. I think the "proper" answer for Win2k and WinXP is in
the user's setting directory. And I _think_ the relevant Win32
function for finding that is SHGetSpecialFolderLocation or
SHGetSpecialFolderPath. I'm quite sure the system directory is the
wrong place.
>
>I appreciate any reference articles on these topics.
>
>Thanks
>
>
>
>"r_z_aret@pen_fact.com" wrote:
>
>> I rather strongly believe in avoiding shared resources, such as the
>> registry, unless necessary. So I strongly favor separate file(s).
>>
>> This question has stirred some lively discussions in the past. I just
>> used google () to look up
>> registry ini
>> and got 129000 hits! That would be a _lot_ to wade through, but you
>> will probably get a good range of opinions quickly. If you want to
>> narrow down the list, I suggest looking for my contributions (yes, I
>> am biased towards my opinion, but I feel justified mentioning this
>> method as a way to find interesting _threads_, including some that
>> prompted me to spout my opinion because they disagree with me).
>>
>>
>> On Wed, 11 Aug 2004 08:17:02 -0700, Raj
>> <Raj@discussions.microsoft.com> wrote:
>>
>> >
>> >I have Dll which would need non-volatile data which is persistent across
>> >reboots. This data is ten 32-bit integer values and 60 character string. This
>> >data is write-once/read-always. This is product data associated with PC.
>> >Assume PC itself is customised product.
>> >
>> >This dll will be distributed in products(laptops or PCs) and used by PC
>> >Applications. Two ways to do it. Either make registry entry specific to my
>> >dll and my dll process can read everytime. Or I can write a file and
>> >distribute this file along with dll.
>> >
>> >Please convince me which is better way to go. Coming to installation, I dont
>> >see any difference. I have to either run installation program once and make
>> >an entry to registry or simply copy the file. Both ways it has to be manual.
>> >Performance is not issue because Dll will be reading just once for first time
>> >when it is loaded.
>> >
>> >Any security issues? Arguebly registry itself is saved on some file(in some
>> >way I am not aware).
>> >
>> >Thanks
>>
>> -----------------------------------------
>> To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
>>
>> Robert E. Zaret, eMVP
>> PenFact, Inc.
>> 500 Harrison Ave., Suite 3R
>> Boston, MA 02118
>> www.penfact.com
>>
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
500 Harrison Ave., Suite 3R
Boston, MA 02118
www.penfact.com
- Next message: Severian: "Re: registry entry or file"
- Previous message: Krzysztof Raszczuk: "Re: Moving a window with no titlebar"
- In reply to: Raj: "Re: registry entry or file"
- Next in thread: Severian: "Re: registry entry or file"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|