Re: MultiThreading an ActiveX DLL call...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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 ?


.



Relevant Pages

  • Re: MultiThreading an ActiveX DLL call...
    ... >> COM method in the same thread procedure? ... >> So the STA threading rules are simple; ... > It's slow when passing the array to the VB6 AX Function, ... how's the speed compared to a VB6 client calling into your ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: MultiThreading an ActiveX DLL call...
    ... >> Apartment. ... > My array is passe byref, I don't understand why it takes so long time. ... So the STA threading rules are simple; ... the object instance. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Fortran Error Problem
    ... imply that failing to assign a value can cause this error. ... clear that all forms of this error come from failing to dimension the ... Matters like how the array is used ... But assigning to an undimensioned array is usually a ...
    (comp.lang.fortran)
  • Re: references and objects
    ... >I'm failing to find something in the manuals (or at least the bit I'm ... >I want to return an array and 2 scalars. ...
    (perl.beginners)
  • Re: ADSI script for IIS 5.0 can not run in IIS 6.0
    ... Problem fixed by changing the array for ServerBindings from dynamic array to ... > It seems that something happens with the ReDim. ... >> You have given insufficient information on what exactly is failing. ...
    (microsoft.public.inetserver.iis)