Error Invalid memory access ( read error at address 12 )
Posted: Sun Nov 15, 2009 9:41 am
Hello ... A small problem .. I am making this program that's talking to a card on the USB port. It opens and all the code works but when it leaves the Procedure with a "EndProcedure" i get a "Invalid memory access ( read error at address 12 )" Does any one know what it is or how i can get it to work .. i and using 4.40 beta 6 windoes x86
HELP
Thanks John
HELP


Code: Select all
Procedure.l Open_Card()
Result.l = OpenLibrary(0,#PB_Compiler_FilePath + "Drivers\K8061.dll") ;The DLL used To talk To the Controler
;
If Result.l = 0
Debug "----------------------"
Debug "Driver file not Opened"
Debug "----------------------"
card_driver_k8061.l=0
End
EndIf
Debug ""
Debug "----------------------"
Debug "Driver file Opened"
Debug "----------------------"
card_driver_k8061.l=1
SetGadgetState(#Radio_0,2)
Result.l = CallFunction(0, "OpenDevice" ,TEST.l); Open the 8061 Card
Debug ""
Debug "----------------------"
Debug Result.l
Debug "----------------------"
Delay(10000)
EndProcedure