开发者

How to specify C# DLL method for [MTAThread]

How to specify [MTAThread] methods for C# DLL ?

[MTAThread]
public int connect(string hostname, int param) ;

Seems don't work. Or this is correct way ? I have executable with main function ([MTA开发者_开发技巧Thread] option) and everything works (same code).


The STAThead and MTAThread attributes are only taken into account when applied on your applications Main startup method. For other threads, you can set the Thread.ApartmentState property.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜