hi guys
Rockey4ND.dll that i use is made for vb
vb example
module :
Declare Function Rockey Lib "Rockey4ND.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, ByVal buffer As Any) As Integer
Global Const RY_FIND = 1
Global Const RY_FIND_NEXT = 2
Global Const RY_OPEN = 3
mainprog :
Private Sub TestBtn_Click()
Dim handle(0 To 15) As Integer
Dim p1, p2, p3, p4, i, j, retcode As Integer
Dim lp1, lp2, v As Long
Dim buffer As String
Dim rc(0 To 3) As Integer
Dim curline As Integer
curline = 0
p1 = &HC44C
p2 = &HC8F8
p3 = 0
p4 = 0
retcode = Rockey(RY_FIND, handle(0), lp1, lp2, p1, p2, p3, p4, buffer)
If (retcode <> 0) Then
List1.List(curline) = "Error Code:" & retcode
Exit Sub
End If
i tried to make it work in dbpro
load dll "Rockey4ND.dll",12
global handle
local p1 , p2, p3, p4, i, j, retcode
local lp1, lp2, v As double integer
local buffer as byte
local rc
local curline
rem fcode 1=call ry_find
global fcode = 1
p1=11111
p2=11111
p3=0
p4=0
retcode = call dll (12,"Rockey",fcode)
if retcode <> 0
print retcode
wait key
end
else
wait key
endif
the code like this works and i get that retcode = 4 when hasp is on pc and 3 when hasp is off pc thats cool
but the problem is that
when i put the call dll (12,"Rockey",fcode,handle< a fourth parameter the program crases i get the window with send report)
the thing is that the correct full syntaax to work is something like this
call dll (12,"Rockey",fcode,handle,lp1,lp2,p1,p2,p3,p4,buffer)
the byref commands in vb maby is the key but i dont understand what or how the hell means exactly or how to make it work almost everything i put after dll(12,"Rockey",fcode,crashes the prog
i put the dll so if u run the code u should get a 3 means not a hasp on pc
if u change value of fcode to 5 u get a 15 > is cant read hasp smthing
also passwords has Uint16bit integer &HC44C < how can i convert it to simple integer i cant say p1 = &HC44C ffs
thank u in advance
all os break