回复 3# chzj589 Func _SQLite_Key($hDB, $bKey)
; ProgAndy
If __SQLite_hChk($hDB, $SQLITE_ERROR) = $SQLITE_ERROR Then Return SetError(-1, 0, $SQLITE_ERROR)
$bKey = Binary($bKey)
Local $iLen = BinaryLen($bKey)
Local $tKey = DllStructCreate("byte[" & $iLen & "]")
DllStructSetData($tKey, 1, $bKey)
Local $avRval = DllCall($__g_hDll_SQLite, "int:cdecl", "sqlite3_key", "ptr", $hDB, "ptr", DllStructGetPtr($tKey), "int", $iLen)
If @error Then Return SetError(@error, 0, $SQLITE_ERROR)
Return $avRval[0]
EndFunc
官网找到的这个func |