CallApplicationFunction() cannot be called from ThreadStart function.