Control.Invoke and ByRef args

  • Thread starter Thread starter swartzbill2000
  • Start date Start date
S

swartzbill2000

Hello,
I wish to use Control.Invoke to make an inter-thread call to a sub that
has ByRef args. How can I pass the ByRef args? Syntax like
New Object() {byRefArg1, byRefArg2}
in fact passes by value.
Bill
 
Hello,
I wish to use Control.Invoke to make an inter-thread call to a sub
that has ByRef args. How can I pass the ByRef args? Syntax like
New Object() {byRefArg1, byRefArg2}
in fact passes by value.
Bill

You destroy the return values because you create a temporar array that you
can not access after Invoke returns.


dim o as object()

o = new object(){byRefArg1, byRefArg2}
'invoke here
'Access o(0) and o(1) here



Armin
 
Back
Top