|
-
Dec 15th, 2000, 11:54 PM
#1
Thread Starter
Junior Member
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
-
Dec 16th, 2000, 08:27 AM
#2
try:
\\0
that escapes the escape key(\) and puts a zero on the spot..
and for your first question,
Which compiler are you using?
-
Dec 16th, 2000, 07:33 PM
#3
Thread Starter
Junior Member
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]
-
Dec 18th, 2000, 08:14 AM
#4
Frenzied Member
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.
Harry.
"From one thing, know ten thousand things."
-
Dec 18th, 2000, 08:43 AM
#5
Frenzied Member
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.
If it wasn't for this sentence I wouldn't have a signature at all.
-
Dec 18th, 2000, 01:16 PM
#6
Monday Morning Lunatic
Why do you need to put a \0 into your string? I'm sure there must be another way to do it.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 18th, 2000, 05:06 PM
#7
Thread Starter
Junior Member
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|