Re: RegCreateKeyEx help
- From: Tim Roberts <spamtrap@xxxxxxxxxx>
- Date: Sun, 19 Mar 2006 00:40:07 GMT
"Andy Kennedy" <spamtrap@xxxxxxxxxx> wrote:
I am looking for help regarding comment on RegistryText
line.
szStringValue db "Some String" ,0
RegistryText db "This is our text. Cool, huh?" ,0
; Only This is our [shows in reg]
; For some reason only 12 chars are displayed ?
Not so hard to figure out:
invoke SetRegKeysz , ADDR RegistryText, ADDR szKeyName,
ADDR szStringValue, SIZEOF szStringValue
Look what you are passing as the size of the string: "SIZEOF
szStringValue". That happens to be 12 bytes. I suspect you really wanted
"SIZEOF RegistryText" here.
Many registry strings are of type REG_MULTI_SZ, which consists of multiple
zero-terminated strings, where the end is denoted by two 0 characters.
Thus, passing the string length into a registry routine is generally good
practice.
However, it is easy to find a string's length with the "repne scasb"
instruction.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.
- Follow-Ups:
- Re: RegCreateKeyEx help
- From: Andy Kennedy
- Re: RegCreateKeyEx help
- References:
- RegCreateKeyEx help
- From: Andy Kennedy
- RegCreateKeyEx help
- Prev by Date: Re: FS and GS
- Next by Date: HLA v1.81 is now available
- Previous by thread: RegCreateKeyEx help
- Next by thread: Re: RegCreateKeyEx help
- Index(es):