COM requires a specific setup for a thread to function correctly.
- Interface passing has to be done by marshaling
- the thread has to be initialized for a specific apartment type
- every create COM object has to be released before the thread has been uninitialized fro COM
- STA thread join has to do message pumping
This handling is tedious and requires specific knowledge. Hence this patch provides wrapper classes which takes care
of the needed environment. These classes have the same interface as the standard threading.Thread classes and could be used
in the same way.
Unit tests are provided using Microsoft Word as COM server.
Log in to post a comment.