>Maybe I am missing something, but happens if you do not get a successful lock within the 25 tries and lnCompteur > 25? I don't see any error-trapping.
We use this routine for 8 years. On all those years, everything was resolved within a fraction of a second. So, if it ever takes 2 minutes, I guess I'll go buy a lotery ticket. :)