客户端代码:
TcpClientChannel^ channelClient = gcnew TcpClientChannel(); 
ChannelServices::RegisterChannel (channelClient, true);  RemotingConfiguration::RegisterWellKnownClientType( Type::GetType("CommonService.CommonSvice, CommonService"), "tcp://localhost:8000/CommonSvice" ); 
obj = gcnew CommonService::CommonSvice();

if ( obj == nullptr )
{
label1->Text = "不能定位到远程服务";
}
else
{
obj->SendFax( "已连接......" ); 
}程序在 obj->SendFax( "已连接......" );  这一句话在运行时报错:线程间操作无效: 从不是创建控件“listBox1”的线程访问它
listBox1是在服务端窗体上的一个控件。用于显示接收到的消息 。
代码如下:listBox1->Items->Add( temp ); 服务端接收到消息后,刚运行到这一句,客户端就报错了。