Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

REG_BINARY-Wert in die Regsitry schreiben

Empfohlene Antworten

Hallo,

ich versuche einen REG_BINARY-Wert in die Regsitry zu schreiben, es kommt aber der falsche Wert in der Registry an.

Private Sub Command1_Click()

Dim v As String

v = "06,00,00,00,00,00,00,00,ff,ff,ff,ff,00,00,00,00"

' = CInt(v)

WriteBinaryToRegistry HKEY_CURRENT_USER, _

"Software\Intergraph\AOMClient\GeoMedia Professional\06.01\PreferenceSet", _

"ConfirmDeletions", v

End Sub

Private Function WriteBinaryToRegistry(Hkey As REG_TOPLEVEL_KEYS, strPath As String, strValue As String, binData As Variant) As Boolean

Dim bAns As Boolean

On Error GoTo ErrorHandler

Dim keyhand As Long

Dim r As Long

r = RegCreateKey(Hkey, strPath, keyhand)

If r = 0 Then

r = RegSetValueEx(keyhand, strValue, 0, _

REG_BINARY, binData, Len(binData))

r = RegCloseKey(keyhand)

End If

WriteBinaryToRegistry = (r = 0)

Exit Function

ErrorHandler:

WriteBinaryToRegistry = False

Exit Function

Das funktioniert soweit, nur steht in der Registry hinterher der Falsche wert für „v“

08,40,00,00,00,00,00,00,20,f4,13,00,00,00,00,00,bc,b5,\

20,00,14,10,1a,00,01,00,00,80,4c,db,1b,00,b4,f4,13,00,84,f5,13,00,01,00,00,\

00,00,00,00

Wie muss ich „v“ umwandeln, damit der exakte Wert in der Registry ankommt?

Teste es mal mit:


const HKEY_LOCAL_MACHINE = &H80000002

strKeyPath = "SOFTWARE\NewKey"

strComputer = "."

iValues = Array(&H01,&Ha2,&H10)

Set oReg=GetObject( _ 

    "winmgmts:{impersonationLevel=impersonate}!\\" & _

   strComputer & "\root\default:StdRegProv")

oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

strKeyPath = "SOFTWARE\NewKey"

BinaryValueName = "Example Binary Value"


oReg.SetBinaryValue HKEY_LOCAL_MACHINE,strKeyPath,_

    BinaryValueName,iValues

Gruss,

tester2k5

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.