It needs atleast FPC 2.6.1 (2.6.0 is very old anyway)
If you use 64bit Lazarus, then you need FPC 2.7.1 and compiled with OPT=-dTEST_WIN64_SEH
And you propably want to have this too.
Uses math;
SetExceptionMask(GetExceptionMask + [exOverflow] + [exZeroDivide] + [exInvalidOp]);