Hi
Im having a unexpected problem calling a DLL from PB.
The DLL is provided by the copy protection company eAladdin
and calls for HASP routines.
My code:
DECLARE SUB Hasp BDECL LIB "HASPVB32.DLL" (BYVAL Service AS LONG, BYVAL seed AS LONG,BYVAL lpt AS LONG,BYVAL pass1 AS LONG,BYVAL pass2 AS LONG, retcode1 AS LONG, retcode2 AS LONG, retcode3 AS LONG, retcode4 AS ANY)
FUNCTION Check_Hasp() AS INTEGER
DIM P1 AS LONG, P2 AS LONG, P3 AS LONG, P4 AS LONG
DIM TP1 AS LONG, TP2 AS LONG, TP3 AS LONG, TP4 AS LONG, TP5 AS LONG
TP1=1
TP2=0
TP3=0
TP4=1234
TP5=1234
CALL Hasp(tp1,tp2,tp3,tp4,tp5, P1, P2, P3, P4)
END FUNCTION
FUNCTION DOSOME() Export as integer
Function=1
END FUNCTION
It does not mather wheter I call Check_Hasp or DOSOME, which means not referencing Check_Hasp,
the DLL won't start and gives a File not found Error.
As soon as the Call Hasp function is disabled everything works fine...
No need to say my prototype in VB works fine.
Thanks
Eric Kelderman
------------------
Im having a unexpected problem calling a DLL from PB.
The DLL is provided by the copy protection company eAladdin
and calls for HASP routines.
My code:
DECLARE SUB Hasp BDECL LIB "HASPVB32.DLL" (BYVAL Service AS LONG, BYVAL seed AS LONG,BYVAL lpt AS LONG,BYVAL pass1 AS LONG,BYVAL pass2 AS LONG, retcode1 AS LONG, retcode2 AS LONG, retcode3 AS LONG, retcode4 AS ANY)
FUNCTION Check_Hasp() AS INTEGER
DIM P1 AS LONG, P2 AS LONG, P3 AS LONG, P4 AS LONG
DIM TP1 AS LONG, TP2 AS LONG, TP3 AS LONG, TP4 AS LONG, TP5 AS LONG
TP1=1
TP2=0
TP3=0
TP4=1234
TP5=1234
CALL Hasp(tp1,tp2,tp3,tp4,tp5, P1, P2, P3, P4)
END FUNCTION
FUNCTION DOSOME() Export as integer
Function=1
END FUNCTION
It does not mather wheter I call Check_Hasp or DOSOME, which means not referencing Check_Hasp,
the DLL won't start and gives a File not found Error.
As soon as the Call Hasp function is disabled everything works fine...
No need to say my prototype in VB works fine.
Thanks
Eric Kelderman
------------------
Comment