Re: Writing to registry bug
- From: "Bob Butler" <tiredofit@xxxxxxxxxxx>
- Date: Wed, 22 Nov 2006 09:12:14 -0800
<patrickparent@xxxxxxxxx> wrote in message
news:1164214452.483691.159060@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
<cut>
Declare Function RegSetValueEx Lib "Advapi32" Alias "RegSetValueExA"<cut>
(ByVal hKey As Long, ByVal lpValueName As String, ByVal RESERVED As
Long, ByVal dwType As Long, ByVal szData As String, ByVal cbData As
Long) As Long
lResult = RegSetValueEx(keyhand, strValueName, 0&,
REG_DWORD, lData, 4)
Your declaration has "ByVal szData As String" and you are passing a Long
with the value 0 so VB is converting it to "0" and you are writing that to
the registry along with a couple of bytes of random garbage.
--
Reply to the group so all can participate
VB.Net: "Fool me once..."
.
- References:
- Writing to registry bug
- From: patrickparent
- Re: Writing to registry bug
- From: Bob Butler
- Re: Writing to registry bug
- From: patrickparent
- Writing to registry bug
- Prev by Date: Re: Trouble subclassing listview to display unicode (chinese)
- Next by Date: Re: Writing to registry bug
- Previous by thread: Re: Writing to registry bug
- Next by thread: Re: Writing to registry bug
- Index(es):