疑难杂症呀,请大家进来看看
我有两台机子,一台装了vs2003,还有一台是只装framework 1.1我把写了一段建议消息队列的程序,在装有vs2003(操作系统(WIn2000))机子上调通了,但在framework 1.1机子上(操作系统XP)始终出现错误,(注,两台机子都装有消息队列,队列名是myqueue)
接收程序:
static void Main(string[] args)
{
string mInfo;
mInfo=".\\Private$\\myqueue";
if (MessageQueue.Exists(mInfo))
{
System.Messaging.MessageQueue mq = new MessageQueue(mInfo);
Console.WriteLine("start");
string[] types = { "System.String" };
((XmlMessageFormatter)mq.Formatter).TargetTypeNames = types;
System.Messaging.Message m=mq.Receive();
string path=(string)m.Body;
Console.WriteLine(path);
}
}
发送程序:
static void Main(string[] args)
{
string mInfo;
mInfo=".\\Private$\\myqueue";
MessageQueue myQueue = new MessageQueue(mInfo);
myQueue.Send("success");
}
大家帮我看看撒
谢谢
接收程序:
static void Main(string[] args)
{
string mInfo;
mInfo=".\\Private$\\myqueue";
if (MessageQueue.Exists(mInfo))
{
System.Messaging.MessageQueue mq = new MessageQueue(mInfo);
Console.WriteLine("start");
string[] types = { "System.String" };
((XmlMessageFormatter)mq.Formatter).TargetTypeNames = types;
System.Messaging.Message m=mq.Receive();
string path=(string)m.Body;
Console.WriteLine(path);
}
}
发送程序:
static void Main(string[] args)
{
string mInfo;
mInfo=".\\Private$\\myqueue";
MessageQueue myQueue = new MessageQueue(mInfo);
myQueue.Send("success");
}
大家帮我看看撒
谢谢
...全文
相关推荐
gmpdwt:小程序实验疑难杂症解决文档地址:
小程序实验源码 存放历次作业的源代码以及基于 docsify 的疑难杂症排除文档系统 代码仅供参考 保守估计 70% 与老师的不相同;抄请留意。 不会更新部署教程,随缘注释;有问题提 issues ,不会提问百度。
MySQL疑难杂症排查
关于MySQL数据库疑难杂症排查,审明:本资源归原作者所有。
系统疑难杂症处理文件,解决系统各种问题
系统疑难杂症处理 解决系统各种问题 系统疑难杂症处理文件,解决系统各种问题
各类电脑疑难杂症处理
内含有各种电脑配件问题的描述与解答。解答详细。
电脑疑难杂症处理工具
疑难杂症处理工具,绿色特别版前段时间中了病毒,杀掉以后用注册表修复工具修复不来,系统控件都被改了,于是写了这个小东西给自己备用.(DLL文件名列表来自非安全)


