You can use TDispatcherThread (an RPC Services utility class) to handle this job for you or you can write your own class. This section shows how to use TDispatcherThread, as well as what you need to know to write your own class to handle this process.