Re: MultiThreading an ActiveX DLL call...
- From: Cybertof <cybertofNOSPAM@xxxxxxxxxxx>
- Date: Wed, 27 Apr 2005 17:48:13 +0200
In article <ukla02ySFHA.3636@xxxxxxxxxxxxxxxxxxxx>,
willy.denoyette@xxxxxxxxxx says...
> Are you sure that you create the instance of your COM object, and call the
> COM method in the same thread procedure?
> Failing to do so will incur thread marshaling overhead!
>
> So the STA threading rules are simple;
> - initialize your thread to enter an STA.
> - call the COM object's methods on the same thread as the one that created
> the object instance.
>
> Willy.
>
Yes, I'm sure, everything is done in the same thread.
As another example, I have removed the 2nd thread creation, and made the
call directly behing a button_click in the main UI Thread.
It's slow when passing the array to the VB6 AX Function, and returning
from the function.
It seems like the array is entirely copied instead of beeing passed
byref. (even if the ref keyword is used during the call...)
Any idea ?
.
- Follow-Ups:
- Re: MultiThreading an ActiveX DLL call...
- From: Willy Denoyette [MVP]
- Re: MultiThreading an ActiveX DLL call...
- References:
- MultiThreading an ActiveX DLL call...
- From: Cybertof
- Re: MultiThreading an ActiveX DLL call...
- From: Willy Denoyette [MVP]
- Re: MultiThreading an ActiveX DLL call...
- From: Cybertof
- Re: MultiThreading an ActiveX DLL call...
- From: Willy Denoyette [MVP]
- Re: MultiThreading an ActiveX DLL call...
- From: Cybertof
- Re: MultiThreading an ActiveX DLL call...
- From: Willy Denoyette [MVP]
- Re: MultiThreading an ActiveX DLL call...
- From: Cybertof
- Re: MultiThreading an ActiveX DLL call...
- From: Willy Denoyette [MVP]
- MultiThreading an ActiveX DLL call...
- Prev by Date: Refactor! for Vis Studio 2k3 (C#) Demo Exists?
- Next by Date: Re: Open New Browser on Error
- Previous by thread: Re: MultiThreading an ActiveX DLL call...
- Next by thread: Re: MultiThreading an ActiveX DLL call...
- Index(es):
Relevant Pages
|