請問如何將 Binary values 怎樣換成 hexadecimal value 寫入registry Binary
SetBinaryValue "HKEY_CURRENT_USER\Software\", "Data", Chr$(&H3) + Chr$(&H4) + Chr$(&H5)
Chr$(&H3) + Chr$(&H4) + Chr$(&H5) = 03 04 05
這法只能演萛數字或字符,但如這些數
”d5,7e,27,dc,d6,f5,bc,5a,fc,,1c,ea,0e,ae,af,eb,25,d9,a6”怎樣計算? 如Unicode碼 keystroke:Alt+0230 “æ ”的 Chr$(&??)是什麼?
SetBinaryValue "HKEY_CURRENT_USER\Software\", "Data", Chr$(&H3) + Chr$(&H4) + Chr$(&H5)
Chr$(&H3) + Chr$(&H4) + Chr$(&H5) = 03 04 05
這法只能演萛數字或字符,但如這些數
”d5,7e,27,dc,d6,f5,bc,5a,fc,,1c,ea,0e,ae,af,eb,25,d9,a6”怎樣計算? 如Unicode碼 keystroke:Alt+0230 “æ ”的 Chr$(&??)是什麼?
文章標籤
全站熱搜

Function SetBinaryValue(SubKey As String, Entry As String, Value As String) Call ParseKey(SubKey, MainKeyHandle) If MainKeyHandle Then rtn = RegOpenKeyEx(MainKeyHandle, SubKey, 0, KEY_WRITE, hKey) 'open the key If rtn = ERROR_SUCCESS Then 'if the key was open successfully then lDataSize = Len(Value) ReDim ByteArray(lDataSize) For i = 1 To lDataSize ByteArray(i) = Asc(Mid$(Value, i, 1)) Next rtn = RegSetValueExB(hKey, Entry, 0, REG_BINARY, ByteArray(1), lDataSize) 'write the value If Not rtn = ERROR_SUCCESS Then 'if the was an error writting the value If DisplayErrorMsg = True Then 'if the user want errors displayed MsgBox ErrorMsg(rtn) 'display the error End If End If rtn = RegCloseKey(hKey) 'close the key Else 'if there was an error opening the key If DisplayErrorMsg = True Then 'if the user wants errors displayed MsgBox ErrorMsg(rtn) 'display the error End If End If End If End Function