Option Explicit Const REG_BINARY = 3 Const HKEY_CURRENT_USER = &H80000001 Private Declare Function RegCloseKey Lib \"advapi32.dll\" (ByVal hKey As Long) As Long 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 RegSetValueEx Lib \"advapi32.dll\" Alias \"RegSetValueExA\" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long Private Sub Form_Load() Dim Ret As Long RegCreateKey HKEY_CURRENT_USER, \"Navn på nøgle\", Ret RegSetValueEx Ret, \"BinaryValue\", 0, REG_BINARY, &HFFFFFFFF, 4 RegCloseKey Ret End Sub
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.