Other than the hideous indentation, that you forgot to (re)initialize kol, and the unnecessary repeated check, what's the problem?
What's up with kol?
Besides that kol here means something different from the below remarks:
Dunno. I lost a bit of interest. Will contact Vladimir et. al. Will have to do that for Christmas anyway...
But it still works both for 32/64 bit Windows - including wince - and it is stable. (the FPC part, don't know about the mirror components since I rarely used them.)
Also note you can
NOT mix Kol with rtl/fcl/lcl. It is a complete framework. You will loose its size benefits if you do and run into problems