Quote Originally Posted by Schmidt View Post
Maybe the new tutorial I've just posted into the codebank, is more helpful in understanding
"how to handle ThreadObjects on COM-STAs" (without going too deep into what happens "underneath those STAs")...

It's doing that in several steps (starting in Step0 with a "monolitic, nonthreaded Mandelbrot-rendering") -
and evolves from there - over AxExe-based Steps - to AxDll-based STA-threading in the last Steps -
ending with an "automatically filled Bin-Folder" for a regfree deployable, portable StdExe...

http://www.vbforums.com/showthread.p...rot-Rendering)

Olaf
Thank you for the example. I'll study your example.

(without going too deep into what happens "underneath those STAs").
I see you use CoMarshalInterThreadInterfaceInStream and CoGetInterfaceAndReleaseStream in the code to marshal an object reference between threads. You also use the message pumping to process the inter-threads communication. You use CreateThread API (free-threading) to create STA, manual synchronization (why cycle with sleep?), no marshaling for parameters. Literally the same things i used in my module.
Note, I am not against this, but you just said the opposite.