ParodiusX 0 Posted May 30, 2022 For licensing my software, I use the PKVS described here: https://www.brandonstaggs.com/2007/07/26/implementing-a-partial-serial-number-verification-system-in-delphi/ In VCL works fine but I have problems with it in Firemonkey. When I call PKV_GetKeyByte I get error message 'Range check error'. function PKV_GetKeyByte(const Seed : Int64; a, b, c : Byte) : Byte; begin a := a mod 25; b := b mod 3; if a mod 2 = 0 then result := ((Seed shr a) and $000000FF) xor ((Seed shr b) or c) else result := ((Seed shr a) and $000000FF) xor ((Seed shr b) and c); end; Any help? Thank you very much. Share this post Link to post
Lajos Juhász 293 Posted May 30, 2022 In VCL most probably you had turned off Range check and in FMX left it on. Share this post Link to post
ParodiusX 0 Posted May 31, 2022 Thank you for your answer but unfortunately that’s not the problem. Share this post Link to post
Sherlock 663 Posted May 31, 2022 Well, what are your problems? Any error message would be appreciated. Apart from that, have you tried your FMX build on the same Windows machine? Was it built with the same "bitness" (32-Bit or 64-Bit)? Share this post Link to post
FredS 138 Posted May 31, 2022 3 hours ago, ParodiusX said: that’s not the problem Adding this to the unit worked for me: {$RANGECHECKS OFF} Share this post Link to post
ParodiusX 0 Posted June 1, 2022 My bad. I put the {$RANGECHECKS OFF} directive into wrong unit. I’m really sorry. Thank you very much for your help. Share this post Link to post