Thanks... but... using your code I get exactly the same error as before:
“invalid pointer or handle in a function”

could you give me a solution in Lite C?