Click to See Complete Forum and Search --> : icons and character arrays
CreepingDeath
Dec 15th, 2000, 10:54 PM
There are two questions I have. First, how would I go about giving my windows app an icon rather than the ugly DOS program icon?
Second, for some of the registry work I am doing, I need to be able to have some ascii 0's in some of the values? Whenever I try to use a \0 in the middle of a character array, it terminates at that spot. I suppose that should be expected, but is there any way to get the null character in the middle of a registry value?
Any help will be greatly appreciated. Thanks a lot.
-CD
try:
\\0
that escapes the escape key(\) and puts a zero on the spot..
and for your first question,
Which compiler are you using?
CreepingDeath
Dec 16th, 2000, 06:33 PM
Actually, I don't need the string "\0" in the registry value. I need the character '\0' aka the null character. I need it's binary value to be zero. I am using 'RegSetValueEx' to set the key. But it only seems to take in character arrays, so it always terminates when it gets to the null.
About the icon, I was able to find some obscure information about it and finally got it to work. Thanks.
-CD
[Edited by CreepingDeath on 12-16-2000 at 07:38 PM]
HarryW
Dec 18th, 2000, 07:14 AM
I'm not sure if there is a way to put ASCII 0's in a zero-terminated string. Perhaps you could substitute your own character in wherever they occure, something obscure like ¥, and just swap them in/out when you load/save the string. This may not be viable depending what kind of data your string is going to contain.
Sam Finch
Dec 18th, 2000, 07:43 AM
Is there a RegSetValueExW ? that would let you put a unicode string into the registry, then you can cram 2 characters into each unicode character these are null terminated by a short 0, so your 0 will hide next to another character and still be in the registry.
parksie
Dec 18th, 2000, 12:16 PM
Why do you need to put a \0 into your string? I'm sure there must be another way to do it.
CreepingDeath
Dec 18th, 2000, 04:06 PM
Ok, I found out a little more about it. The type of value is REG_MULTI_SZ. It is a series of strings delimited by the null character. This type of value is not supported in Win9x, but it is in NT/2000. Yes, RegSetValueEx exists. When I look at the value in binary, every other byte is a null, but in between strings there are 3 nulls in a row. If there is another way to do it, I would love to know. Is anyone familliar with the NT registry?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.