Hello, I need help to access a security dongle dll. But after many tries I’m going crazy... Code in VB6: Declare Function UniKey Lib "UniKey.DLL" (ByVal fcode As Integer, ByRef handle As Integer, ByRef lp1 As Long, ByRef lp2 As Long, ByRef p1 As Long, ByRef p2 As Long, ByRef p3 As Long, ByRef p4 As Long, ByRef buffer As Byte) As Integer
Dim handle(15) As Integer
Dim p1, p2, p3, p4, i, j, count, retcode As Long
Dim lp1, lp2 As Long
Dim buffer() As Byte
retcode = UniKey(1, handle(0), lp1, lp2, p1, p2, p3, p4, buffer(0)) Code in VB2008: Declare Function UniKey Lib "UniKey.DLL" (ByVal fcode As Integer, ByRef handle As Integer, ByRef lp1 As Long, ByRef lp2 As Long, ByRef p1 As Integer, ByRef p2 As Integer, ByRef p3 As Integer, ByRef p4 As Integer, ByRef buffer As Byte) As Integer
Dim handle As Integer
Dim p1, p2, p3, p4, i, j, retcode As Integer
Dim lp1, lp2, v As Integer
Dim buffer(4096) As Byte
retcode = UniKey(1, handle, lp1, lp2, p1, p2, p3, p4, buffer(0)) In VB6 and VB2008 works well, and return (retcode) the value 0. With this code by me in Autoit: Dim $fcode, $handler, $lp1, $lp2, $p1, $p2, $p3, $p4, $buffer, $result
$fcode = 1
$handler = 0
$p1 = 1234
$p2 = 1234
$p3 = 1234
$p4 = 1234
$buffer = 0
$result = DllCall("UniKey.dll", "int", "UniKey", "int", $fcode, "int", $handler, "int", $lp1, "int", $lp2, "int", $p1, "int", $p2, "int", $p3, "int", $p4, "byte", $buffer) The Autoit closes with a fatal error. Any suggestion? Best Regards, Pardalito.