Board index » delphi » Registry HELP!!!

Registry HELP!!!

Hi,
  I'm sort of new to Delphi, but finding my way around... I am having
trouble in one regard... I want to create a new file type (done) for my
use, and then assign various attributes through the registry...
  I am using Delphi 2.0 and here's the basic problem:
When I use OpenKey etc etc, it creates a default value in the key I am
creating. Then, I am using WriteString to put a default value, and what
happens to the registry looks like this:
  (Default)   (Value Not Set)
  (Default)   "my filetype"
  Is there a method which will simply replace the (value not set) with
"my filetype" and avoid the double/identically named entries problem, or
is this arising because I am using the OpenKey method? If so,how do I
get around this?
Any help will be appreciated...Mark La Vigne
 

Re:Registry HELP!!!


On Sun, 22 Nov 1998 04:05:13 -0700, "Mark T. La Vigne"

Quote
<mlavi...@n-link.com> wrote:
>When I use OpenKey etc etc, it creates a default value in the key I am
>creating. Then, I am using WriteString to put a default value, and what
>happens to the registry looks like this:
>  (Default)   (Value Not Set)
>  (Default)   "my filetype"
>  Is there a method which will simply replace the (value not set) with
>"my filetype" and avoid the double/identically named entries problem, or
>is this arising because I am using the OpenKey method? If so,how do I
>get around this?

Hi Mark, don't know if I understand this correct, but each key has a
default value which is accessed by WriteString('','contents'), where
the empty value name specifies the default value and the 'contents'
spcifies the assigned value. This would replace the "Value not set".
You can also use an own value name like this: WriteString('my
filetype','mft') which would appear as
my filetype           mft

in the registry.
Is this what you wanted to know?
- Ulli -

The Coder's Knowledge Base
http://www.netalive.org/ckb

Other Threads