Hi James,
So far I am researching the issue and I will reply to you ASAP.
Best regards,
Peter Huang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 24 Aug 2006 07:55 GMT
Hi James,
I understand your scenario that you have an unmanaged app which will
ininitialize as MTA to create the .NET component.
But your component have UI feature which need STA apartment. So the regasm
will only register it as Both which will cause the .NET component running
in MTA if the calling thread is MTA.
If I misunderstood, please feel free to let me know.
Based on my research, I do understand your scenario and I have reported it
to our product team.
So far as a workaround, I suggest you create another thread and initialize
it as STA and call the .NET assembly from this STA thread.
Commonly even if the Win32, we high recommend doing Win32 Windows UI
related programming in the STA thread if it is COM related. So based on my
experience, if we have the UI design request, it is recommended to create a
STA thread for UI related processing.
If you have any concern, please feel free to let me know.
Best regards,
Peter Huang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.