com.jacob.com
Class DispatchProxy
java.lang.Object
com.jacob.com.JacobObject
com.jacob.com.DispatchProxy
public class DispatchProxy
- extends JacobObject
If you need to pass a COM Dispatch object between STA threads, you have to
marshall the interface. This class is used as follows: the STA that creates
the Dispatch object must construct an instance of this class. Another thread
can then call toDispatch() on that instance and get a Dispatch pointer which
has been marshalled. WARNING: You can only call toDispatch() once! If you
need to call it multiple times (or from multiple threads) you need to
construct a separate DispatchProxy instance for each such case!
Field Summary |
int |
m_pStream
Comment for m_pStream |
Constructor Summary |
DispatchProxy(Dispatch localDispatch)
Marshals the passed in dispatch into the stream |
m_pStream
public int m_pStream
- Comment for
m_pStream
DispatchProxy
public DispatchProxy(Dispatch localDispatch)
- Marshals the passed in dispatch into the stream
- Parameters:
localDispatch
-
toDispatch
public Dispatch toDispatch()
- Returns:
- Dispatch the dispatch retrieved from the stream
finalize
public void finalize()
- Overrides:
finalize
in class Object
safeRelease
public void safeRelease()
- Description copied from class:
JacobObject
- Finalizers call this method. This method should release any COM data
structures in a way that it can be called multiple times. This can happen
if someone manually calls this and then a finalizer calls it.
- Overrides:
safeRelease
in class JacobObject
http://jacob-project.sourceforge.net