Código:
El valor que tiene MainKey es -2147483646 , y creo que ahí es donde radica el problema.Public Function RegGetValue$(MainKey&, SubKey$, value$) ' MainKey must be one of the Publicly declared HKEY constants. Dim sKeyType& 'returns the key type. This function expects REG_SZ or REG_DWORD Dim ret& 'returned by registry functions, should be 0& Dim lpHKey& 'return handle to opened key Dim lpcbData& 'length of data in returned string Dim ReturnedString$ 'returned string value Dim fTempDbl! If MainKey >= &H80000000 And MainKey <= &H80000006 Then ' Open key ret = RegOpenKeyExA(MainKey, SubKey, 0&, KEY_READ Or KEY_WOW64_64KEY Or KEY_WOW64_32KEY, lpHKey)
Lo tengo declarado y asignado a su valor de la siguiente forma:
MainKey = &H80000002 (que corresponde con HKEY_LOCAL_MACHINE)
Si alguien puede ayudarme quedaría muy agradecido