Jeg orker ikke at få min NT 4 maskine med VB6 startet op.
Men følgende virker i Access 2000 VBA og bør virke stort se uændret i VB6:
Public Const HKEY_CLASSES_ROOT = &H80000000 Public Const HKEY_CURRENT_CONFIG = &H80000005 Public Const HKEY_CURRENT_USER = &H80000001 Public Const HKEY_LOCAL_MACHINE = &H80000002 Public Const HKEY_USERS = &H80000003
Public Const KEY_QUERY_VALUE = 1
Public Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Function RegKeyExists(hKey As Long, sKeyPath As String) As Boolean Dim lResult As Long Dim hSubkey As Long lResult = RegOpenKeyEx(hKey, sKeyPath, 0, KEY_QUERY_VALUE, hSubkey) If hSubkey <> 0 Then RegKeyExists = True RegCloseKey hKey Else RegKeyExists = False End If End Function
Sry for ventetiden.. jeg har haft en smule travlt..
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.