Saving to the registry

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I save a string (taken from a text box) to a multi string registry
key? At the moment when I save a string it turns the Multi string reg entry
into a string Key entry!
 
Ithaqua said:
How do I save a string (taken from a text box) to a multi string registry
key? At the moment when I save a string it turns the Multi string reg
entry
into a string Key entry!


You can try to pass an array of null-terminated strings to 'SetValue' in
order to write a 'multi_sz' value.
 
If you retrieve the data from the textbox's .Text property it's returned
as a single string and that's what it's creating a string key entry.

If you pass the SetValue an array of strings it will create a
multi-string entry for you. So if it's that important for you to have a
multi-string entry you'll have to parse your string into a string array.

Hope this helps,
Brian Swanson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top