Results 1 to 2 of 2

Thread: Registry

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2001
    Location
    Vietnam
    Posts
    613

    Registry

    I want to modify the registry on another computer. Does anyone have an example how to use the API below:
    Code:
    Public Declare Function RegConnectRegistry Lib "advapi32.dll" Alias "RegConnectRegistryA" (ByVal lpMachineName As String, ByVal hKey As Long, phkResult As Long) As Long
    Thanks,
    TheBao

  2. #2
    jim mcnamara
    Guest
    Code:
    Enum cbRegSections
        cbHKCurrentUser = HKEY_CURRENT_USER
        cbHKLocalMachine = HKEY_LOCAL_MACHINE
        cbHKClassesRoot = HKEY_CLASSES_ROOT
        cbHKUsers = HKEY_USERS
        cbHKPerformanceData = HKEY_PERFORMANCE_DATA
        cbHKCurrentConfig = HKEY_CURRENT_CONFIG
        cbHKDynData = HKEY_DYN_DATA
    End Enum
    
    Function ConnectRemote(ByVal CompName As String, ByVal regSection As cbRegSections) As Long
    
        Dim retval As Long
        Dim hKey As Long
    
        retval = RegConnectRegistry(CompName, regSection, hKey)
        ConnectRemote = hKey
    End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width