Registry 
Author Message
 Registry

Hi!
Can somebody tell me, how can I use RegCreateKey (& Co.) in Windows NT. I
get or crash of VB or Error 87.
(But in C++ goes wonderful.)
Oleg



Sun, 23 Feb 2003 18:28:54 GMT  
 Registry

Private Const HKEY_CLASSES_ROOT = &H80000000
Private Const HKEY_CURRENT_CONFIG = &H80000005
Private Const HKEY_CURRENT_USER = &H80000001
Private Const HKEY_DYN_DATA = &H80000006
Private Const HKEY_LOCAL_MACHINE = &H80000002

Private Declare Function RegCreateKey Lib "advapi32.dll" Alias
"RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As
Long) As Long
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA"
(ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long

Private Sub Form_Load()
    Dim RetKey As Long

    RegOpenKey HKEY_CURRENT_USER, "", RetKey
    RegCreateKey RetKey, "Software\Test", RetKey
End Sub

Andy


Quote:
> Hi!
> Can somebody tell me, how can I use RegCreateKey (& Co.) in Windows NT. I
> get or crash of VB or Error 87.
> (But in C++ goes wonderful.)
> Oleg



Sun, 23 Feb 2003 21:12:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling Registry.LocalMachine, Registry.CurrentUser by Registry.regHive?

2. REGISTRY How can I read a registry key?

3. Registry Problems Help Please! - registry.bas (0/1)

4. Registry Problems Help Please! - registry.bas (1/1)

5. Read Registry Keys and Trees / API Call for Registry access

6. enumerate registry entries using win32api registry functions

7. enum registry subkeys using winAPI32 registry functions

8. Importing/Exporting registry information to/from a registry file

9. How to export the whole registry or a part of keys in registry?

10. Registry security: Could not read key from registry; Interface not registered

11. Registry security: Could not read key from registry; Interface not registered

12. Error Accessing the System Registry! Fix for this and other registry troubles!

 

 
Powered by phpBB® Forum Software