I have several programs that must write to HKLM in XP and Windows 7/64 Pro.
The programs work in VB6 but not in VB.Net 2008 on target machines. It does works on our development machine.
Same exact windows.
User is an Administrator.
NOT using Run as.
Both programs are using the same function
Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" _
(ByVal lngRootKey As Long, ByVal lpSubKey As String, phkResult As Long)
Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" _
(ByVal lngRootKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Changed Long to Integer for VB.NET
It works on the developement machine
VB6 works on BOTH machines.
VB.Net gets no data reading and err 5 trying to write.
On our development machine and also on the target machine the VB6 registry entry goes to
I just cannot figure out why VB6 works but .net doesn't and fails only on the target machine not the development machine.